找不到模块angular2_material / material

时间:2015-10-17 01:22:03

标签: angular typescript angular-material

我正在尝试将angular2与angular2_material一起使用,我得到了这个错误。

找不到模块angular2_material / material

我查看了这个链接:https://github.com/urish/angular2-material-build,但不理解为有效。我试图在node_modules中包含文件夹angular2_material。

我也尝试过查看http://plnkr.co/edit/vSS7yMroAeTDHALG8eEg?p=preview。不明白,因为在客户端应用程序中工作:

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)

此代码是打字稿还是不打字?

1 个答案:

答案 0 :(得分:1)

angular2_material尚不可用。另请参阅https://github.com/angular/material2/issues/105

  

一旦准备好几件事,我们很快就会将alpha.0发布到npm。该公告可能会在推特上发布,敬请关注!