材料设计 – 角度2.0 alpha是否与角/材料项目中的组件配合使用?
发布时间:2020-12-17 08:09:24 所属栏目:安全 来源:网络整理
导读:我一直在试图让这个工作,但还没有能够。如有可能,请点击样品。 该团队正在为2.0的角度材料端口工作,您可以找到源代码 here。 我创建了一个快速演示,演示如何与Angular 2一起使用它: import {Component,View,bootstrap} from 'angular2/angular2';import
我一直在试图让这个工作,但还没有能够。如有可能,请点击样品。
该团队正在为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工作。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |