-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnippet.txt
54 lines (43 loc) · 1.34 KB
/
snippet.txt
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
const arrWords = [
{ id: 1, en: 'action', vn: 'hành động', memorized: true },
{ id: 2, en: 'actor', vn: 'diễn viên', memorized: false },
{ id: 3, en: 'activity', vn: 'hoạt động', memorized: true },
{ id: 4, en: 'active', vn: 'chủ động', memorized: true },
{ id: 5, en: 'bath', vn: 'tắm', memorized: false },
{ id: 6, en: 'bedroom', vn: 'phòng ngủ', memorized: true }
];
---- CARD COMPONENT ----
import { Component } from '@angular/core';
@Component({
selector: 'app-card',
template: `
<div class="card">
<p>Khoa Pham Training</p>
</div>
`,
styles: [`
.card {
padding: 5px;
margin: 5px;
background: #fff;
border-radius: 2px;
display: inline-block;
width: 300px;
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
`]
})
export class CardComponent {}
---- CARD COMPONENT ----
---- Express middleware ----
app.use((req, res, next) => {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'Content-Type,X-Requested-With');
next();
});
----CONTACTS ----
[
{ id: 1, name: 'Teo', phoneNumber: '0123' },
{ id: 2, name: 'Ti', phoneNumber: '0456' },
{ id: 3, name: 'Tun', phoneNumber: '0789' },
]