找不到模块 angular2_material/material [英] Cannot find module angular2_material/material

查看:28
本文介绍了找不到模块 angular2_material/material的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 angular2 与 angular2_material 一起使用,但出现此错误.

找不到模块angular2_material/material

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

我试着看看这个 http://plnkr.co/edit/vSS7yMroAeTDHALG8eEg?p=也预览.不理解在客户端应用程序 js 中工作:

import {ComponentAnnotation as Component, ViewAnnotation as View, bootstrap} from 'angular2/angular2';从'angular2_material/material'导入{MdInput,MdInputContainer};@成分({选择器:'测试应用'})@看法({模板:`<h1>AngularJs 2 Material Design Demo</h1><md-输入-容器><label>你的名字</label><输入#newname/></md-input-container><p>你好,{{newname.value}}</p>`,指令:[MdInputContainer, MdInput]})类测试应用{构造函数(){this.title = 'AngularJs 2 Material Design Demo';}}引导程序(测试应用程序)

这段代码是不是打字稿?

解决方案

angular2_material 尚不可用.另见https://github.com/angular/material2/issues/105><块引用>

一旦准备好更多内容,我们很快就会向 npm 发布 alpha.0.该公告可能会在 Twitter 上发布,敬请期待!

I am trying to use angular2 with angular2_material and I get this error.

Cannot find module angular2_material/material

I looked at this link: https://github.com/urish/angular2-material-build, but no understand as working. I tried to include the folder angular2_material in node_modules.

I tried looking at this http://plnkr.co/edit/vSS7yMroAeTDHALG8eEg?p=preview too. Not understand as worked in client aplication js this:

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)

This code is typescript or not?

解决方案

angular2_material is not yet useable. See also https://github.com/angular/material2/issues/105

We'll soon be publishing an alpha.0 to npm once a few more things are ready. The announcement will probably be on Twitter, so stay tuned!

这篇关于找不到模块 angular2_material/material的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆