Skip to content

Commit b403934

Browse files
committed
Merge pull request #1 from NathanWalker/master
fix(Setup): ng2-cli-test-lib 3d party lib now works. :)
2 parents b8d88c4 + a557e89 commit b403934

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
"version": "0.0.0",
44
"license": "Apache-2.0",
55
"dependencies": {
6+
"angular-cli": "0.0.20",
67
"angular2": "2.0.0-beta.0",
78
"angular2-phoenix-channels": "0.0.1",
89
"es6-promise": "^3.0.2",
910
"es6-shim": "^0.33.3",
11+
"ng2-cli-test-lib": "^1.0.7",
1012
"reflect-metadata": "0.1.2",
1113
"rxjs": "5.0.0-beta.0",
1214
"systemjs": "0.19.4",

src/app/angular-cli-test.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
<p>
22
angular-cli-test Works!
3-
</p>
3+
</p>
4+
5+
<test></test>
6+
7+
<div>{{'does this work? ... you bet!' | uppercase}}</div>

src/app/angular-cli-test.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
import {Component} from 'angular2/core';
2-
import ng2test from "ng2-cli-test-lib";
1+
import {Component, ViewEncapsulation} from 'angular2/core';
2+
import ng2test from 'ng2-cli-test-lib/ng2-cli-test-lib';
3+
import {TestService, TestService2} from 'ng2-cli-test-lib/ng2-cli-test-lib';
34

45
@Component({
56
selector: 'angular-cli-test-app',
6-
providers: [ng2test.providers],
7+
viewProviders: [ng2test.providers],
78
templateUrl: 'app/angular-cli-test.html',
8-
directives: [],
9-
pipes: []
9+
styles: ng2test.styles,
10+
directives: [ng2test.directives],
11+
pipes: [ng2test.pipes],
12+
encapsulation: ViewEncapsulation.None
1013
})
1114
export class AngularCliTestApp {
1215
defaultMeaning: number = 42;
1316

17+
constructor(private test1: TestService, private test2: TestService2) {
18+
19+
}
20+
1421
meaningOfLife(meaning) {
1522
return `The meaning of life is ${meaning || this.defaultMeaning}`;
1623
}

src/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@
2222
app: {
2323
format: 'register',
2424
defaultExtension: 'js'
25+
},
26+
'ng2-cli-test-lib': {
27+
defaultExtension: 'js'
2528
}
29+
},
30+
map: {
31+
'ng2-cli-test-lib': 'node_modules/ng2-cli-test-lib'
2632
}
2733
});
2834
System.import('app.js').then(null, console.error.bind(console));

0 commit comments

Comments
 (0)