Skip to content

Commit e961400

Browse files
author
borysn
committed
angular2 rc.5 updates
1 parent 5e380c4 commit e961400

File tree

4 files changed

+46
-36
lines changed

4 files changed

+46
-36
lines changed

src/main/web/app/app.component.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
'use strict';
22

33
import {Component} from '@angular/core';
4-
import {HTTP_PROVIDERS} from '@angular/http';
54
import {ROUTER_DIRECTIVES} from '@angular/router';
65

7-
import {HelloComponent} from './hello/hello.component';
8-
import {Bootstrap4Component} from './bootstrap4/bootstrap4.component';
9-
import {HomeComponent} from './home/home.component';
10-
116
@Component({
127
selector: 'spring-boot-angular2',
138
template: '<router-outlet></router-outlet>',
14-
directives: [ROUTER_DIRECTIVES],
15-
providers: [HTTP_PROVIDERS],
16-
precompile: [HomeComponent, HelloComponent, Bootstrap4Component]
9+
directives: [ROUTER_DIRECTIVES]
1710
})
1811
export class AppComponent {}

src/main/web/app/app.module.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'use strict';
2+
3+
import {NgModule, CUSTOM_ELEMENTS_SCHEMA, provide} from '@angular/core';
4+
import {LocationStrategy, HashLocationStrategy, APP_BASE_HREF} from '@angular/common';
5+
import {BrowserModule} from '@angular/platform-browser';
6+
import {HTTP_PROVIDERS} from '@angular/http';
7+
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
8+
9+
import {appRouterProviders} from './app.routes';
10+
import {AppComponent} from './app.component';
11+
import {HelloComponent} from './hello/hello.component';
12+
import {Bootstrap4Component} from './bootstrap4/bootstrap4.component';
13+
import {HomeComponent} from './home/home.component';
14+
15+
@NgModule({
16+
declarations: [AppComponent, HelloComponent, Bootstrap4Component, HomeComponent],
17+
imports: [BrowserModule, FormsModule, ReactiveFormsModule],
18+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
19+
providers: [
20+
HTTP_PROVIDERS,
21+
appRouterProviders,
22+
provide(APP_BASE_HREF, {useValue: '/'}),
23+
provide(LocationStrategy, {useClass: HashLocationStrategy})
24+
],
25+
bootstrap: [AppComponent]
26+
})
27+
export class AppModule {}

src/main/web/app/main.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
'use strict';
22

3-
import {bootstrap} from '@angular/platform-browser-dynamic';
4-
import {provide} from '@angular/core';
5-
import {provideForms, disableDeprecatedForms} from '@angular/forms';
6-
import {LocationStrategy, HashLocationStrategy, APP_BASE_HREF} from '@angular/common';
3+
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
4+
import {AppModule} from './app.module';
75

8-
import {AppComponent} from './app.component';
9-
import {appRouterProviders} from './app.routes';
10-
11-
bootstrap(AppComponent, [
12-
appRouterProviders,
13-
[disableDeprecatedForms(), provideForms()],
14-
provide(APP_BASE_HREF, {useValue: '/'}),
15-
provide(LocationStrategy, {useClass: HashLocationStrategy})
16-
]).catch(err => console.error(err));
6+
platformBrowserDynamic().bootstrapModule(AppModule);

src/main/web/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@
1313
"typings": "typings"
1414
},
1515
"dependencies": {
16-
"@angular/common": "2.0.0-rc.4",
17-
"@angular/compiler": "2.0.0-rc.4",
18-
"@angular/core": "2.0.0-rc.4",
19-
"@angular/forms": "0.2.0",
20-
"@angular/http": "2.0.0-rc.4",
21-
"@angular/platform-browser": "2.0.0-rc.4",
22-
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
23-
"@angular/router": "3.0.0-beta.2",
24-
"@angular/upgrade": "2.0.0-rc.4",
25-
"angular2-in-memory-web-api": "0.0.14",
16+
"@angular/common": "2.0.0-rc.5",
17+
"@angular/compiler": "2.0.0-rc.5",
18+
"@angular/core": "2.0.0-rc.5",
19+
"@angular/forms": "0.3.0",
20+
"@angular/http": "2.0.0-rc.5",
21+
"@angular/platform-browser": "2.0.0-rc.5",
22+
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
23+
"@angular/router": "3.0.0-rc.1",
24+
"@angular/upgrade": "2.0.0-rc.5",
25+
"angular2-in-memory-web-api": "0.0.15",
2626
"bootstrap": "^4.0.0-alpha.2",
2727
"es6-shim": "^0.35.1",
2828
"font-awesome": "^4.6.3",
2929
"jquery": "^2.2.4",
3030
"moment": "^2.14.1",
3131
"ng2-bootstrap": "^1.0.24",
32-
"reflect-metadata": "^0.1.3",
33-
"rxjs": "5.0.0-beta.10",
34-
"symbol-observable": "^1.0.1",
35-
"systemjs": "0.19.35",
36-
"tether": "^1.3.3",
32+
"reflect-metadata": "^0.1.8",
33+
"rxjs": "5.0.0-beta.11",
34+
"symbol-observable": "^1.0.2",
35+
"systemjs": "0.19.36",
36+
"tether": "^1.3.4",
3737
"zone.js": "^0.6.12"
3838
},
3939
"devDependencies": {

0 commit comments

Comments
 (0)