Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 1 | import {ModuleWithProviders, NgModule} from '@angular/core'; |
| 2 | import {CommonModule} from '@angular/common'; |
| 3 | import {BrowserModule} from "@angular/platform-browser"; |
| 4 | import {HttpClientModule} from "@angular/common/http"; |
| 5 | import {FeatureFlagService} from "./service/featureFlag.service"; |
| 6 | import {BasicFeatureFlagDirective} from "./directive/basic/basic.featureFlag.directive"; |
| 7 | |
| 8 | |
| 9 | @NgModule({ |
| 10 | imports: [ |
| 11 | BrowserModule, |
| 12 | HttpClientModule, |
| 13 | CommonModule |
| 14 | ], |
| 15 | declarations: [ |
| 16 | BasicFeatureFlagDirective |
| 17 | ], |
| 18 | exports: [ |
| 19 | BasicFeatureFlagDirective |
| 20 | ], |
| 21 | providers: [ |
| 22 | FeatureFlagService |
| 23 | ] |
| 24 | }) |
| 25 | export class FeatureFlagModule { |
| 26 | static forRoot(): ModuleWithProviders { |
| 27 | return { |
| 28 | ngModule: FeatureFlagModule, |
| 29 | providers: [] |
| 30 | }; |
| 31 | } |
| 32 | } |