材料设计 – 角度2.0 alpha是否与角/材料项目中的组件配合使用?

前端之家收集整理的这篇文章主要介绍了材料设计 – 角度2.0 alpha是否与角/材料项目中的组件配合使用?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我一直在试图让这个工作,但还没有能够。如有可能,请点击样品。
该团队正在为2.0的角度材料端口工作,您可以找到源代码 here

我创建了一个快速演示,演示如何与Angular 2一起使用它:

import {Component,View,bootstrap} from 'angular2/angular2';
import {MdInput,MdInputContainer} from 'angular2_material/material';

// Defines a new HTML tag <hello-ngconf>
@Component({
    selector: 'material-demo'
})
@View({
    template: `
    <md-input-container>
      <label>Your name</label>
      <input #newname />
    </md-input-container>
    <p>
      Hello,{{newname.value}}
    </p>
    `,directives: [MdInputContainer,MdInput]
})
class MaterialDemoComponent {
}

bootstrap(MaterialDemoComponent);

this plunker看到行动。

您可以在the angular2 repo找到其他示例。

请注意,这仍然是alpha代码,它不是完全功能。例如,由于this issue,我无法让MdButton工作。

猜你在找的Angularjs相关文章