forked from cerebral/overmind
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpassprop.ts
More file actions
41 lines (39 loc) · 901 Bytes
/
passprop.ts
File metadata and controls
41 lines (39 loc) · 901 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
export default () => [
{
fileName: 'components/todo.component.ts',
code: `
import { Component, Input, ChangeDetectionStrategy } from '@angular/core'
import { Todo } from '../overmind/state'
@Component({
selector: 'todos-todo',
template: \`
<li *track>{{ todo.title }}</li>
\`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TodoComponent {
@Input() todo: Todo
}
`,
},
{
fileName: 'components/todos.component.ts',
code: `
import { Component, ChangeDetectionStrategy } from '@angular/core'
import { Store } from '../overmind'
@Component({
selector: 'todos-list',
template: \`
<ul *track>
<todos-todo *ngFor="let todo of state.todos;" [todo]="todo"></todos-todo>
</ul>
\`,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ListComponent {
state = this.store.select()
constructor(private store: Store) {}
}
`,
},
]