Reputation: 2958
I've been trying to get this to work, but haven't been able to. If it's possible, please point to a sample.
Upvotes: 18
Views: 12752
Reputation: 324
I know this question is old, but I did discover today they have a link in the angular/material README that points to a repository they created specifically for the angular2 target of angular/material: https://github.com/angular/material2
It's still in alpha0.
As a suggestion, perhaps it might help to use something like http://www.getmdl.io/ until material2 gets off the ground. It might allow you to prototype sooner.
Upvotes: 1
Reputation: 9033
The team is working on a port of Angular Material for 2.0, and you can find the source code here.
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);
See in action in this plunker.
You can find additional examples in the angular2 repo.
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.
Upvotes: 13
Reputation: 1469
Current version of angular-material will not work with angular 2.0, but i am sure there will be new branch(or version) which will be compatible with angualar 2.0.
Upvotes: 5