Created
August 4, 2015 05:34
-
-
Save joeeames/d10c445471cb955cc948 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Injectable} from 'angular2/angular2'; | |
//@Injectable() | |
export class TodoItemsService { | |
items: array = []; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component, View, coreDirectives, EventEmitter} from 'angular2/angular2'; | |
import {TodoItemsService} from 'services/TodoItemsService'; | |
@Component({ | |
selector: 'todo-list', | |
}) | |
@View({ | |
templateUrl: 'components/todo-list.html', | |
directives: [coreDirectives] | |
}) | |
export class TodoList { | |
constructor(todoItems: TodoItemsService) { | |
this.items = todoItems.items; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment