Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
update(flexbox): add deprecated warning with forRoot() usages (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBurleson authored and tinayuangao committed Feb 8, 2017
1 parent 86010bf commit 645a2dc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/lib/flexbox/_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import 'rxjs/add/operator/filter';
import 'rxjs/add/operator/map';

import {NgModule} from '@angular/core';

import {ModuleWithProviders, NgModule} from '@angular/core';
import {MediaMonitor} from '../media-query/media-monitor';
import {MediaQueriesModule} from '../media-query/_module';

Expand Down Expand Up @@ -56,4 +55,12 @@ const ALL_DIRECTIVES = [
exports: [MediaQueriesModule, ...ALL_DIRECTIVES],
providers: [ MediaMonitor ]
})
export class FlexLayoutModule { }
export class FlexLayoutModule {
/** @deprecated */
static forRoot(): ModuleWithProviders {
console.warn('FlexLayoutModule.forRoot() has been deprecated and is no longer needed.');
return {
ngModule: FlexLayoutModule
};
}
}

0 comments on commit 645a2dc

Please sign in to comment.