Skip to content

Commit de08137

Browse files
committed
refactor(): prepare for RC5 NgModule pattern
1 parent a85a507 commit de08137

4 files changed

Lines changed: 31 additions & 11 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { BrowserModule } from '@angular/platform-browser';
2+
import { NgModule, ApplicationRef } from '@angular/core';
3+
import { CommonModule } from '@angular/common';
4+
import { FormsModule } from '@angular/forms';
5+
import { environment } from './environments/environment';
6+
import { AppComponent } from './app.component';
7+
8+
@NgModule({
9+
declarations: [AppComponent],
10+
imports: [BrowserModule, CommonModule, FormsModule],
11+
entryComponents: [AppComponent]
12+
})
13+
export class AppModule {
14+
constructor(appRef: ApplicationRef) {
15+
appRef.bootstrap(AppComponent);
16+
}
17+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from './environments/environment';
22
export * from './app.component';
3+
export * from './app.module';
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import { bootstrap } from '@angular/platform-browser-dynamic';
1+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
22
import { enableProdMode } from '@angular/core';
3-
import { AppComponent, environment } from './app/';<% if(isMobile) { %>
3+
import { AppModule, environment } from './app/';<% if(isMobile) { %>
44
import { APP_SHELL_RUNTIME_PROVIDERS } from '@angular/app-shell';<% } %>
55

66
if (environment.production) {
77
enableProdMode();
88
}
99

10-
bootstrap(AppComponent<% if(isMobile) { %>, [ APP_SHELL_RUNTIME_PROVIDERS ]<% } %>);
10+
platformBrowserDynamic().bootstrapModule(AppModule<% if(isMobile) { %>, [
11+
APP_SHELL_RUNTIME_PROVIDERS
12+
]<% } %>);

addon/ng2/blueprints/ng2/files/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
},
1313
"private": true,
1414
"dependencies": {
15-
"@angular/common": "2.0.0-rc.4",
16-
"@angular/compiler": "2.0.0-rc.4",
17-
"@angular/core": "2.0.0-rc.4",
18-
"@angular/forms": "0.2.0",
19-
"@angular/http": "2.0.0-rc.4",
20-
"@angular/platform-browser": "2.0.0-rc.4",
21-
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
22-
"@angular/router": "3.0.0-beta.2",
15+
"@angular/common": "github:angular/common-builds",
16+
"@angular/compiler": "github:angular/compiler-builds",
17+
"@angular/core": "github:angular/core-builds",
18+
"@angular/forms": "github:angular/forms-builds",
19+
"@angular/http": "github:angular/http-builds",
20+
"@angular/platform-browser": "github:angular/platform-browser-builds",
21+
"@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds",
22+
"@angular/router": "github:angular/router-builds",
2323
"core-js": "^2.4.0",
2424
"reflect-metadata": "0.1.3",
2525
"rxjs": "5.0.0-beta.6",

0 commit comments

Comments
 (0)