Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how dynamically initialize components of materialise design lite (google) for SPA?

how dynamically initialize components of materialise design lite (google) for SPA ? As I am dynamically initializing the components in a view the JS is not initializing. As i have tried with many solutions using componentHandler.

like image 356
Sachidananda Panigrahi Avatar asked Sep 03 '15 06:09

Sachidananda Panigrahi


1 Answers

To initialize the javascript components of MDL not starting to window.load you must update the DOM component:

componentHandler.upgradeDom();

For more information https://github.com/google/material-design-lite/issues/871

like image 197
MindTheGap Avatar answered Oct 16 '22 05:10

MindTheGap