...
Code Block | ||||
---|---|---|---|---|
| ||||
npm i -g @angular/cli |
Code Block | ||||
---|---|---|---|---|
| ||||
ng new webapp --createApplication=false Would you like to add Angular routing? No Which stylesheet format would you like to use? Sass |
Code Block | ||||
---|---|---|---|---|
| ||||
ng generate library <name-of-library> --prefix=plug |
Code Block | ||||
---|---|---|---|---|
| ||||
npm install @saga/plugin --save |
Code Block | ||||
---|---|---|---|---|
| ||||
npm install @angular/material @angular/cdk --save |
Code Block | ||||
---|---|---|---|---|
| ||||
"build": "ng build" "build-prod": "ng build --prod" |
Code Block | ||||
---|---|---|---|---|
| ||||
"@saga/plugin": "^x.y.z" |
the same version as the package.json located in webapp
import the following modules
Code Block | ||||
---|---|---|---|---|
| ||||
import {PluginModule} from '@saga/plugin'; import {CommonModule} from '@angular/common'; import {FormsModule} from '@angular/forms'; |
Then update the @NgModule by adding a new provider and the modules to the section imports
Code Block | ||||
---|---|---|---|---|
| ||||
providers: [{ provide: '<NameOfRecognizer>Component', useValue: [{ name: '<NameOfRecognizer>Component', component: <NameOfRecognizer>Component }], multi: true }], imports: [ CommonModule, FormsModule, PluginModule ] |
...