forked from SekibOmazic/angular2-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhello.html
54 lines (43 loc) · 1.23 KB
/
hello.html
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
<style>@import "lib/bootstrap.css"</style>
<style>
.drag {
top: 100px;
left:200px;
cursor:pointer;
position: absolute;
width: 100px;
height: 100px;
border: 1px solid red;
background-color: lightgray;
}
</style>
<div class="container">
<div class="row">
<h2>How components communicate? </h2>
<p>Just learning Angular2 and want to show how two components can interact. <strong>Feedback welcome.</strong></p>
</div>
<div class="row">
<div class="col-lg-6">
<h4>By events</h4>
<gadget-input (store)="gadget.onAddItem($event)"></gadget-input>
<gadget-list #gadget></gadget-list>
</div>
<div class="col-lg-6">
<h4>By service</h4>
<friend-input></friend-input>
<friend-list></friend-list>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<h4>By injecting one component into another</h4>
<pet-list>
<pet-input></pet-input>
</pet-list>
</div>
<div class="col-lg-6">
<h4>By other means?</h4>
<p>TO DO</p>
</div>
</div>
</div>