forked from PatrickJS/angular-webpack-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.ts
More file actions
73 lines (63 loc) · 1016 Bytes
/
bootstrap.ts
File metadata and controls
73 lines (63 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Angular 2
import {bootstrap} from 'angular2/angular2';
import {Component, View} from 'angular2/angular2';
@Component({
selector: 'ac-word'
})
@View({
template: `
<span>
Hello from Angular Class
</span>
`
})
class AcWord {
constructor() {
console.log('Angular Class Word component');
}
}
@Component({
selector: 'ac-box'
})
@View({
directives: [
AcWord
],
template: `
<div>
<ac-word></ac-word>
</div>
`
})
class AcBox {
constructor() {
console.log('Angular Class Box component');
}
}
@Component({
selector: 'app'
})
@View({
// We need to tell Angular's compiler which directives are in our template.
// Doing so will allow Angular to attach our behavior to an element
directives: [
AcBox
],
template: `
<header>
AngularClass
</header>
<main>
<ac-box></ac-box>
</main>
<footer>
© AngularClass 2015
</footer>
`
})
class App {
constructor() {
console.log('Angular App component');
}
}
bootstrap(App, []);