Skip to content
This repository was archived by the owner on Oct 12, 2021. It is now read-only.

Commit 120a3f2

Browse files
author
laco0416
committed
feat(app-shell): Update for v4
1 parent 454c85c commit 120a3f2

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

app-shell/package.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@
2525
"private": true,
2626
"dependencies": {},
2727
"devDependencies": {
28-
"@angular/common": "^2.0.0",
29-
"@angular/compiler": "^2.0.0",
30-
"@angular/compiler-cli": "^0.6.2",
31-
"@angular/core": "^2.0.0",
32-
"@angular/platform-browser": "^2.0.0",
33-
"@angular/platform-browser-dynamic": "^2.0.0",
34-
"@angular/platform-server": "^2.0.0",
28+
"@angular/animations": "^4.0.0",
29+
"@angular/common": "^4.0.0",
30+
"@angular/compiler": "^4.0.0",
31+
"@angular/compiler-cli": "^4.0.0",
32+
"@angular/core": "^4.0.0",
33+
"@angular/http": "^4.0.0",
34+
"@angular/platform-browser": "^4.0.0",
35+
"@angular/platform-browser-dynamic": "^4.0.0",
36+
"@angular/platform-server": "^4.0.0",
3537
"@types/jasmine": "^2.2.34",
3638
"gulp": "^3.9.1",
3739
"gulp-jasmine": "^2.4.1",
@@ -44,9 +46,9 @@
4446
"rxjs": "^5.0.0-beta.12",
4547
"ts-node": "^1.3.0",
4648
"typescript": "^2.0.3",
47-
"zone.js": "^0.6.25"
49+
"zone.js": "^0.8.4"
4850
},
4951
"peerDependencies": {
50-
"@angular/core": "^2.0.0"
52+
"@angular/core": "^4.0.0"
5153
}
5254
}

app-shell/src/app/prerender.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import {OpaqueToken} from '@angular/core';
1+
import {InjectionToken} from '@angular/core';
22

3-
export const IS_PRERENDER = new OpaqueToken('IsPrerender');
3+
export const IS_PRERENDER = new InjectionToken<boolean>('IsPrerender');

app-shell/src/app/shell.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function () {
2020
.createComponent(NoRenderTestComponent);
2121
fixture.detectChanges();
2222
expect(fixture.debugElement.childNodes.length).toBe(1);
23-
expect(fixture.debugElement.childNodes[0].nativeNode.data).toBe('template bindings={}');
23+
expect(fixture.debugElement.childNodes[0].nativeNode.type).toBe('comment');
2424
});
2525
it('should render the element at runtime', () => {
2626
const fixture = TestBed
@@ -31,7 +31,7 @@ export default function () {
3131
.createComponent(NoRenderTestComponent);
3232
fixture.detectChanges();
3333
expect(fixture.debugElement.childNodes.length).toBe(2);
34-
expect(fixture.debugElement.childNodes[0].nativeNode.data).toBe('template bindings={}');
34+
expect(fixture.debugElement.childNodes[0].nativeNode.type).toBe('comment');
3535
expect(fixture.debugElement.childNodes[1].nativeNode.name).toBe('div');
3636
});
3737
});
@@ -52,7 +52,7 @@ export default function () {
5252
.createComponent(RenderTestComponent);
5353
fixture.detectChanges();
5454
expect(fixture.debugElement.childNodes.length).toBe(2);
55-
expect(fixture.debugElement.childNodes[0].nativeNode.data).toBe('template bindings={}');
55+
expect(fixture.debugElement.childNodes[0].nativeNode.type).toBe('comment');
5656
expect(fixture.debugElement.childNodes[1].nativeNode.name).toBe('div');
5757
});
5858
it('should NOT render the element at runtime', () => {
@@ -64,7 +64,7 @@ export default function () {
6464
.createComponent(RenderTestComponent);
6565
fixture.detectChanges();
6666
expect(fixture.debugElement.childNodes.length).toBe(1);
67-
expect(fixture.debugElement.childNodes[0].nativeNode.data).toBe('template bindings={}');
67+
expect(fixture.debugElement.childNodes[0].nativeNode.type).toBe('comment');
6868
});
6969
});
7070
}

0 commit comments

Comments
 (0)