Material Design Lite not fully working with Angular2

I have a simple HTML template built with MDL.

When I place the template into Angular2 App. Elements' actions and clicks are not working

E.g : Showing dropdowns or clicking tabs etc are not working.

I cant see any errors in Developer Console and would like clarification on why this error is happening.

Answers


Call componentHandler.upgradeDom(); in ngAfterViewInit() and each time later when the DOM was modified:

ngAfterViewInit() {
  componentHandler.upgradeDom();
}

See also Material Design Lite tooltips not working with Angular 2


Need Your Help

Error while importing library in android studio

java android chatbot alice

i'm using android studio to make a chatbot but i get error while importing alice libraries " Can't resolve alicebot"

Unsafe code in C#

c# unsafe

What are the limitations of unsafe code, in C#? For example, can I do virtually arbitrary pointer casts and arithmetic as if I were using C or C++?