Skip to content

Commit e20df8e

Browse files
committed
upgrade to angular 4
1 parent 700bf78 commit e20df8e

File tree

13 files changed

+44
-70
lines changed

13 files changed

+44
-70
lines changed

src/PhotoGallery/PhotoGallery.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<VersionPrefix>1.1.0</VersionPrefix>
@@ -14,6 +14,10 @@
1414
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;dnxcore50;portable-net45+win8</PackageTargetFallback>
1515
</PropertyGroup>
1616

17+
<ItemGroup>
18+
<Content Include="wwwroot\tsconfig.json" />
19+
</ItemGroup>
20+
1721
<ItemGroup>
1822
<None Update="wwwroot\**\*;Views\**\*">
1923
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>

src/PhotoGallery/Views/Shared/_Layout.cshtml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@
1717
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.20/system-polyfills.js"></script>
1818
<script src="https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>*@
1919

20-
<!-- 1. Load libraries -->
2120
<!-- Polyfill(s) for older browsers -->
22-
<script src="~/lib/core-js/client/shim.js"></script>
21+
<script src="~/lib/core-js/client/shim.min.js"></script>
2322
<script src="~/lib/zone.js/dist/zone.js"></script>
24-
<script src="~/lib/reflect-metadata/Reflect.js"></script>
2523
<script src="~/lib/systemjs/dist/system.src.js"></script>
2624

2725
<!-- 2. Configure SystemJS -->

src/PhotoGallery/package.json

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,35 @@
66
"repository": "https://github.com/chsakell/aspnet5-angular2-typescript",
77
"private": true,
88
"dependencies": {
9-
"@angular/common": "~2.2.0",
10-
"@angular/compiler": "~2.2.0",
11-
"@angular/core": "~2.2.0",
12-
"@angular/forms": "~2.2.0",
13-
"@angular/http": "~2.2.0",
14-
"@angular/platform-browser": "~2.2.0",
15-
"@angular/platform-browser-dynamic": "~2.2.0",
16-
"@angular/router": "~3.2.0",
17-
"@angular/upgrade": "~2.2.0",
9+
"@angular/common": "4.0.2",
10+
"@angular/compiler": "4.0.2",
11+
"@angular/core": "4.0.2",
12+
"@angular/forms": "4.0.2",
13+
"@angular/http": "4.0.2",
14+
"@angular/platform-browser": "4.0.2",
15+
"@angular/platform-browser-dynamic": "4.0.2",
16+
"@angular/router": "4.0.2",
1817

1918
"body-parser": "1.14.1",
2019
"bootstrap": "3.3.5",
2120
"es6-shim": "^0.35.0",
2221
"fancybox": "3.0.0",
2322
"jquery": "2.1.4",
2423

25-
"angular-in-memory-web-api": "~0.1.15",
24+
"angular-in-memory-web-api": "~0.2.4",
25+
"systemjs": "0.19.40",
2626
"core-js": "^2.4.1",
27-
"reflect-metadata": "^0.1.8",
28-
"rxjs": "5.0.0-beta.12",
29-
"systemjs": "0.19.39",
30-
"zone.js": "^0.6.25"
27+
"rxjs": "5.0.1",
28+
"zone.js": "^0.8.5",
29+
"reflect-metadata": "^0.1.8"
3130
},
3231
"devDependencies": {
33-
"@types/node": "^6.0.45",
32+
"@types/node": "^6.0.46",
3433
"del": "2.1.0",
35-
"gulp": "3.9.1",
36-
"gulp-typescript": "3.1.3",
34+
"gulp": "^3.9.1",
35+
"gulp-typescript": "^3.1.6",
3736
"gulp-watch": "4.3.11",
3837
"merge": "1.2.0",
39-
"typescript": "^2.0.10",
40-
"typings": "^1.3.3"
41-
},
42-
"scripts": {
43-
"postinstall": "typings install"
38+
"typescript": "^2.2.2"
4439
}
4540
}

src/PhotoGallery/typings.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/PhotoGallery/wwwroot/app/app.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
/// <reference path="../../typings/globals/es6-shim/index.d.ts" />
2-
3-
import { Component, OnInit } from '@angular/core';
1+
import { Component, OnInit } from '@angular/core';
42
import { Location } from '@angular/common';
53
import 'rxjs/add/operator/map';
64
import {enableProdMode} from '@angular/core';

src/PhotoGallery/wwwroot/app/components/account/login.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class LoginComponent implements OnInit {
2424
var _authenticationResult: OperationResult = new OperationResult(false, '');
2525

2626
this.membershipService.login(this._user)
27-
.subscribe(res => {
27+
.subscribe((res:any) => {
2828
_authenticationResult.Succeeded = res.Succeeded;
2929
_authenticationResult.Message = res.Message;
3030
},

src/PhotoGallery/wwwroot/app/components/account/register.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class RegisterComponent implements OnInit {
2525
register(): void {
2626
var _registrationResult: OperationResult = new OperationResult(false, '');
2727
this.membershipService.register(this._newUser)
28-
.subscribe(res => {
28+
.subscribe((res:any) => {
2929
_registrationResult.Succeeded = res.Succeeded;
3030
_registrationResult.Message = res.Message;
3131

src/PhotoGallery/wwwroot/app/components/album-photos.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class AlbumPhotosComponent extends Paginated implements OnInit {
6464
() => console.log(this._photos));
6565
}
6666

67-
search(i): void {
67+
search(i: any): void {
6868
super.search(i);
6969
this.getAlbumPhotos();
7070
};

src/PhotoGallery/wwwroot/app/components/albums.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class AlbumsComponent extends Paginated implements OnInit {
4242
});
4343
}
4444

45-
search(i): void {
45+
search(i: any): void {
4646
super.search(i);
4747
this.getAlbums();
4848
};

src/PhotoGallery/wwwroot/app/components/photos.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class PhotosComponent extends Paginated implements OnInit {
3535
error => console.error('Error: ' + error));
3636
}
3737

38-
search(i): void {
38+
search(i: any): void {
3939
super.search(i);
4040
this.getPhotos();
4141
};

0 commit comments

Comments
 (0)