0.7.1 • Published 7 years ago
ng-storyblok v0.7.1
Status
ng-storyblok is still under development and should not be used in production until we pulish version 1.0. For detail information have a look at our 1.0 milestone
Installation & Setup
Install the CLI
npm install -g angular-cli
Create a new project
ng new my-project
The new command creates a project with a build system for your Angular app.
Install ng-storyblok
npm install --save ng-storyblok
Import the ng-storyblok NgModule
When importing the module you have to provide a configuration to the forRoot
method. The config must at least contain the public access token you can find in your storyblok backend.
src/app/app.module.ts
import { SBModule } from 'ng-storyblok';
// other imports
export function storyblockConfigFactory() {
return {
accessToken: '[[PUBLIC-SB-TOKEN]]'
};
}
@NgModule({
imports: [
SBModule.forRoot(storyblockConfigFactory)
],
...
})
export class MyAppModule { }
Getting started
See our Getting Started Guide in your docs for more information.
Demo
Have a look at out ng-storyblok-demo project to see a full Angular2 App with ng-storyblok integration.