私はもう試した:
import {Component, Template, bootstrap} from 'angular2/angular2';
import {Immutable} from 'immutable/immutable';
@Component({
selector: 'my-app'
})
@Template({
inline: '<h1>Hello {{ name }}</h1>'
})
class MyAppComponent {
constructor() {
this.name = 'Alice';
this.wishes = Immutable.List(['a dog', 'a balloon', 'and so much more']);
console.log(this.wishes);
}
}
bootstrap(MyAppComponent);
しかし、その後 Immutable は未定義になってしまいます。それから私は試しました:
import {Component, Template, bootstrap} from 'angular2/angular2';
import {Immutable} from 'immutable/immutable';
@Component({
selector: 'my-app'
})
@Template({
inline: '<h1>Hello {{ name }}</h1>'
})
class MyAppComponent {
constructor(im: Immutable) {
this.name = 'Alice';
this.wishes = im.List(['a dog', 'a balloon', 'and so much more']);
console.log(this.wishes);
}
}
しかし、私は得るCannot resolve all parameters for MyAppComponent
。誰でもこれで私を助けることができますか? immutable
はい、フォルダを に追加しましたSystem.paths
。Immutable は ES6 のような方法でインポートできないのでしょうか?