mercredi 7 octobre 2015

Material Design Lite's Checkbox design not reflecting sometime

I am using Material Design lite 1.0.4, and Angular.js 1.1.3. I have created a partial file which contains checkboxes and including that partial file using:

<div data-ng-include data-src="'views/partials/filter.html'"></div>

Now the problem is, when I refresh page it displays old checkboxes sometime and sometime the material ones. The behavior is unpredictable. Sometime it work smooth on refresh.

This is one of the checkbox code:

<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect">
    <input type="checkbox" class="mdl-checkbox__input" checked />
    <span class="mdl-checkbox__label"> less than 4000</span>
</label>

The code works fine when I don't use ng-include, and write the code directly in html file. But I have to use ng-include since the partial will be included on multiple pages and that too depending on certain condition (Do not want to load template if not needed).




Aucun commentaire:

Enregistrer un commentaire