我试图将angular2与angular2_material结合使用,并得到了这个错误。
找不到模块angular2 2_material/material
我看了一下这个链接:https://github.com/urish/angular2-material-build,但不理解它的工作原理。我试图将文件夹angular2_material包含在node_modules中。
我也试过看这个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)这段代码是打字稿还是不?
发布于 2016-03-06 21:18:52
angular2_material还不能使用。另见https://github.com/angular/material2/issues/105
一旦更多的事情准备就绪,我们很快就会将字母0发布到npm。公告可能会在Twitter上发布,所以请继续关注!
https://stackoverflow.com/questions/33181745
复制相似问题