是否与角/材料项目的组成部分转角2.0阿尔法的工作? [英] Does angular 2.0 alpha work with the components in angular/material Project?
本文介绍了是否与角/材料项目的组成部分转角2.0阿尔法的工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直试图让这个工作,但一直没能来。如果有可能,请指向一个样本。
I've been trying to get this to work, but haven't been able to. If it's possible, please point to a sample.
推荐答案
该小组的工作角料的2.0端口上,你可以找到源$ C $ C的这里。
The team is working on a port of Angular Material for 2.0, and you can find the source code here.
我创建了一个快速演示展示了如何使用它连同角2:
I created a quick demo showing how to use it together with 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);
请参阅在这个plunker 。
您可以在的angular2回购额外的例子。
注意,这仍然是阿尔法code,这是没有充分发挥作用。例如,我不能让MdButton,因为这个问题。
Be aware that this is still alpha code and it is not fully functional. For example, I couldn't get MdButton to work because of this issue.
这篇关于是否与角/材料项目的组成部分转角2.0阿尔法的工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文