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

feat(app-shell): Update for v4 #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions app-shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
"private": true,
"dependencies": {},
"devDependencies": {
"@angular/common": "^2.0.0",
"@angular/compiler": "^2.0.0",
"@angular/compiler-cli": "^0.6.2",
"@angular/core": "^2.0.0",
"@angular/platform-browser": "^2.0.0",
"@angular/platform-browser-dynamic": "^2.0.0",
"@angular/platform-server": "^2.0.0",
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/compiler-cli": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/platform-server": "^4.0.0",
"@types/jasmine": "^2.2.34",
"gulp": "^3.9.1",
"gulp-jasmine": "^2.4.1",
Expand All @@ -44,9 +46,9 @@
"rxjs": "^5.0.0-beta.12",
"ts-node": "^1.3.0",
"typescript": "^2.0.3",
"zone.js": "^0.6.25"
"zone.js": "^0.8.4"
},
"peerDependencies": {
"@angular/core": "^2.0.0"
"@angular/core": "^4.0.0"
}
}
4 changes: 2 additions & 2 deletions app-shell/src/app/prerender.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import {OpaqueToken} from '@angular/core';
import {InjectionToken} from '@angular/core';

export const IS_PRERENDER = new OpaqueToken('IsPrerender');
export const IS_PRERENDER = new InjectionToken<boolean>('IsPrerender');
8 changes: 4 additions & 4 deletions app-shell/src/app/shell.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function () {
.createComponent(NoRenderTestComponent);
fixture.detectChanges();
expect(fixture.debugElement.childNodes.length).toBe(1);
expect(fixture.debugElement.childNodes[0].nativeNode.data).toBe('template bindings={}');
expect(fixture.debugElement.childNodes[0].nativeNode.type).toBe('comment');
});
it('should render the element at runtime', () => {
const fixture = TestBed
Expand All @@ -31,7 +31,7 @@ export default function () {
.createComponent(NoRenderTestComponent);
fixture.detectChanges();
expect(fixture.debugElement.childNodes.length).toBe(2);
expect(fixture.debugElement.childNodes[0].nativeNode.data).toBe('template bindings={}');
expect(fixture.debugElement.childNodes[0].nativeNode.type).toBe('comment');
expect(fixture.debugElement.childNodes[1].nativeNode.name).toBe('div');
});
});
Expand All @@ -52,7 +52,7 @@ export default function () {
.createComponent(RenderTestComponent);
fixture.detectChanges();
expect(fixture.debugElement.childNodes.length).toBe(2);
expect(fixture.debugElement.childNodes[0].nativeNode.data).toBe('template bindings={}');
expect(fixture.debugElement.childNodes[0].nativeNode.type).toBe('comment');
expect(fixture.debugElement.childNodes[1].nativeNode.name).toBe('div');
});
it('should NOT render the element at runtime', () => {
Expand All @@ -64,7 +64,7 @@ export default function () {
.createComponent(RenderTestComponent);
fixture.detectChanges();
expect(fixture.debugElement.childNodes.length).toBe(1);
expect(fixture.debugElement.childNodes[0].nativeNode.data).toBe('template bindings={}');
expect(fixture.debugElement.childNodes[0].nativeNode.type).toBe('comment');
});
});
}