0.1.29 • Published 7 years ago
produto-2-module v0.1.29
produto-2-module
Installation
To install this library, run:
$ npm install produto-2-module --save
Consuming your library
Once you have published your library to npm, you can import your library in any Angular application by running:
$ npm install produto-2-module
and then from your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import your library
import { ProdutoModule } from './../../produto-2-module/src/index';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Specify your library as an import
ProdutoModule,
LibraryModule
],
providers:[
// Specify yours providers
ProdutoModule.forRoot().providers
],
bootstrap: [AppComponent]
})
export class AppModule { }
It's a sample of a child project that can be change in package.json and the parent project will work as core and this module will have your own behavior, injecting menus itens and services. The parent project is hosted here https://github.com/Rafaelnanes/angularjs2-frontend.
Development
To generate all *.js
, *.js.map
and *.d.ts
files:
$ npm run tsc
To lint all *.ts
files:
$ npm run lint
License
MIT © Rafael Nanes