我一直在试图让这个工作,但还没有能够。如有可能,请点击样品。
该团队正在为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工作。