我需要将一个自定义的Angular 2模块分享给我们公司内的其他项目。
例如:
@NgModule({
declarations: [
AppComponent,
BannerInlineComponent,
WelcomeComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule
],
providers: [],
bootstrap: [AppComponent]
})
export class SpecialModule { }
npm install my-special --save
使用:
import { SpecialModule } from 'my-special';