【发布时间】:2016-01-15 20:55:07
【问题描述】:
我正在尝试将 angular2 与 angular2_material 一起使用,但出现此错误。
找不到模块 angular2_material/material
我查看了此链接:https://github.com/urish/angular2-material-build,但无法理解为有效。我试图在 node_modules 中包含文件夹 angular2_material。
我也试过看这个http://plnkr.co/edit/vSS7yMroAeTDHALG8eEg?p=preview。不明白在客户端应用程序 js 中工作:
import {ComponentAnnotation as Component, ViewAnnotation as View, bootstrap} from 'angular2/angular2';
import {MdInput, MdInputContainer} from 'angular2_material/material';
@Component({
selector: 'test-app'
})
@View({
template:`
<h1>AngularJs 2 Material Design Demo</h1>
<md-input-container>
<label>Your name</label>
<input #newname />
</md-input-container>
<p>
Hello, {{newname.value}}
</p>
`,
directives: [MdInputContainer, MdInput]
})
class TestApp {
constructor(){
this.title = 'AngularJs 2 Material Design Demo';
}
}
bootstrap(TestApp)
这段代码是不是打字稿?
【问题讨论】:
标签: angular typescript angular-material