techhive-fires
Version:
How to build libraries with Angular (2, 4, 5...)
22 lines (19 loc) • 449 B
text/typescript
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HelloComponent } from './hello/hello.component';
import { HelloService } from './HelloService.service';
({
imports: [
CommonModule
],
declarations: [HelloComponent],
exports: [HelloComponent]
})
export class TestModule {
static forRoot() {
return {
ngModule: TestModule,
providers: [HelloService]
}
}
}