File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
addon/ng2/blueprints/ng2/files/src/client Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { bootstrap } from 'angular2/platform/browser' ;
2
+ import { provide } from 'angular2/core' ;
3
+ import { Environment } from './app/environment' ;
2
4
import { < %= jsComponentName % > App } from './app/<%= htmlComponentName %>' ;
3
5
4
- bootstrap ( < %= jsComponentName % > App , [ ] ) ;
6
+ bootstrap ( < %= jsComponentName % > App ,
7
+ [ provide ( Environment , { useValue : new Environment ( ) } ) ] ) ;
Original file line number Diff line number Diff line change
1
+ export const environmentConfig = {
2
+ production : false ,
3
+ } ;
Original file line number Diff line number Diff line change
1
+ import { enableProdMode } from 'angular2/core' ;
2
+ import { environmentConfig } from './environment.config' ;
3
+
4
+ export class Environment {
5
+ config = environmentConfig ;
6
+ constructor ( ) {
7
+ if ( this . config . production ) {
8
+ enableProdMode ( ) ;
9
+ }
10
+ }
11
+ }
You can’t perform that action at this time.
0 commit comments