I've been trying to get this to work, but haven't been able to. If it's possible, please point to a sample.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With