我开始学习 angular2 和流星,来自http://angular-meteor.com/tutorials/angular2/3-way-data-binding
在第 3 课中,我在控制台中有 2 个错误:
refreshingclient/app.ts (18, 11): Generic type 'Array<T>' requires 1 type argument(s).
client/app.ts (20, 19): Cannot find name 'zone'.
当我从命令行向 Mongo 添加一些文档时,它们不会出现在页面上。
和我的 app.ts 文件:
/// <reference path="../typings/angular2-meteor.d.ts" />
import {Component, View, NgFor} from 'angular2/angular2';
import {Parties} from 'collections/parties';
import {bootstrap} from 'angular2-meteor';
@Component({
selector: 'app'
})
@View({
templateUrl: 'client/app.html',
directives: [NgFor]
})
class Socially {
parties: Array;
constructor() {
Tracker.autorun(zone.bind(() => {
this.parties = Parties.find().fetch();
}));
}
}
bootstrap(Socially);
问题是什么?