The problem is that the material design plugin for bootstrap works by applying transformations to the DOM, and it is not designed to work automatically with frameworks such as Angular.
The material structure requires you to initialize the script components as follows:
<script> $.material.init(); </script>
This means that the object โmaterializesโ when the page loads. Since the Angular.js application is single-page, the style applies only to elements already present on the page (try adding a new component, also without using views: you should get the same result).
You get the required behavior (not fully functional) if you include scripts on the view pages because Angular.js, under the hood, loads the view page as it was a regular page, then takes the contents of dom and merges the view tree with a one-page tree.
I suggest you try adding the call to $ .material.init () after loading the view. Be careful, as there are problems with calling init several times, due to library ripples. As stated here ( https://github.com/FezVrasta/bootstrap-material-design/issues/184 ), you should avoid ripples in order to attach event handlers again:
// add the "done" boolean inside ripples.js window.ripples = { init: function(withRipple) { /*bla bla*/ }, done: false } // Then, where you run ripples.init... (aka, material.js, or maybe directly inside the init function of ripples.js) if (!window.ripples.done) { ripples.init(); ripples.done = true; }
source share