ngx-rm-base-angular v0.0.1
NgxRmBaseAngular
This library was generated with Angular CLI version 11.2.8.
Usage
add
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import {RmsAppInjector} from '@rms/ngx-rm-base-angular';
import { AppModule } from './app/app.module';
platformBrowserDynamic().bootstrapModule(AppModule).then((moduleRef) => {
RmsAppInjector.setInjector(moduleRef.injector);
}).catch(err => console.log(err));
to src/main.ts.
Import it in AppModule
import {NgxRmBaseAngularModule} from '@rms/ngx-rm-base-angular';
import { environment } from '../environments/environment';
imports: [
NgxRmBaseAngularModule.forRoot(environment.logLevel)
]
Provide your StorageService which implements the RMSStorageService
import {RMS_STORAGE_SERVICE} from '@rms/ngx-rm-base-angular';
...
providers: [
...
{provide: RMS_STORAGE_SERVICE, useExisting: StorageService}
]
Code scaffolding
Run ng generate component component-name --project ngx-rm-base-angular
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-rm-base-angular
.
Note: Don't forget to add
--project ngx-rm-base-angular
or else it will be added to the default project in yourangular.json
file.
Build
Run ng build ngx-rm-base-angular
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
After building your library with ng build ngx-rm-base-angular
, go to the dist folder cd dist/ngx-rm-base-angular
and run npm publish
.
Running unit tests
Run ng test ngx-rm-base-angular
to execute the unit tests via Karma.
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
2 years ago