Skip to content

Instantly share code, notes, and snippets.

@joeeames
Created August 4, 2015 05:34
Show Gist options
  • Save joeeames/d10c445471cb955cc948 to your computer and use it in GitHub Desktop.
Save joeeames/d10c445471cb955cc948 to your computer and use it in GitHub Desktop.
import {Injectable} from 'angular2/angular2';
//@Injectable()
export class TodoItemsService {
items: array = [];
}
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