Skip to content

Commit

Permalink
Use dependency injection
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinEberhardt authored and samccone committed Jan 5, 2016
1 parent 60c55a8 commit cbfa0c8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions examples/angular2/app/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/angular2/app/app.ts
Expand Up @@ -9,8 +9,8 @@ export default class TodoApp {
todoStore: TodoStore;
newTodoText = '';

constructor() {
this.todoStore = new TodoStore();
constructor(todoStore: TodoStore) {
this.todoStore = todoStore;
}

stopEditing(todo: Todo, editedTitle: string) {
Expand Down
3 changes: 2 additions & 1 deletion examples/angular2/app/bootstrap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion examples/angular2/app/bootstrap.ts
@@ -1,4 +1,5 @@
import {bootstrap} from 'angular2/platform/browser';
import TodoApp from './app'
import {TodoStore} from './services/store';

bootstrap(TodoApp);
bootstrap(TodoApp, [TodoStore]);

0 comments on commit cbfa0c8

Please sign in to comment.