I'm having some issues starting an Angular2 project using the angular2-mdl package.
My project setup is using angular-cli (webpack) - https://github.com/angular/angular-cli
I am trying to integrate Google Material Design Lite (https://getmdl.io/started/index.html) using the angular2-mdl package (https://www.npmjs.com/package/angular2-mdl).
The angular2-mdl setup steps are fairly simple:
npm install angular2-mdl --save
Apparently that is it... and it should work. But it doesn't. I've got to a point where the components using MDL are styled correctly, but the JavaScript for animations doesn't fire at all. I understand this is because MDL is scanning the page for DOM elements before Angular loads them in, so have tried the 'refresh DOM' fix as advertised on SO but it's not working for me:
ngAfterViewInit(){
console.log("HeaderComponent.ngAfterViewInit");
componentHandler.upgradeAllRegistered();
}
There are no errors in the console, the styling works and the javascript does not. I'm wondering if anyone has experience with this setup / similar issues?
P.s. I'm new to Angular2 and really not enjoying the differences every environment setup seems to have... with some using webpack, some using systemjs, loads of different generator tools etc... am I alone here?!
Thanks