David,
Really just trying to use your Youtube version, so I did the copy and change some lines of code here, but failed to run, would you be able to give some hints of what happened. Really appreciated!
import {Component, TemplateConfig, bootstrap, Foreach} from 'angular2/angular2';
import {bind} from 'angular2/di';
import {AngularFire, FirebaseArray} from 'firebase/AngularFire';
@component({
selector: 'todo-app',
componentServices: [
AngularFire, bind(Firebase).toValue(new Firebase('https://webapi.firebaseio-demo.com/test'))
],
template: new TemplateConfig({
url: 'todo.html',
directives: [Foreach]
})
})
class TodoApp {
todoService: FirebaseArray;
todoEdit: any;
constructor(sync: AngularFire) {
this.todoService = sync.asArray();
this.todoEdit = null;
Believe the rest of the code shall be exactly same as the Github version. Here is the console error logs:
Error during instantiation of Token(AppComponentAnnotatedType)!. ORIGINAL ERROR: TypeError: undefined is not a function
application.js:107 Uncaught (in promise) InstantiationError {keys: Array[3], constructResolvingMessage: function, message: "Error during instantiation of Token(AppComponentAn…NAL ERROR: TypeError: undefined is not a function", addKey: function, toString: function}
VM3745:323
3308lang.js:64 RangeError: Maximum call stack size exceeded