Suppose I have a previous bootstrape version downloaded, and I have an angular directive that loads some css bundle (including another version of bootstrap) that I want to use only in a div or in another tag of my choice (mostly those in which I use the directive).
.directive('directivename' , ['$ocLazyLoad',function($ocLazyLoad){ return { restrict : 'A', controller : function($ocLazyLoad,$scope,$q) { $ocLazyLoad.load('http://somepath/bootstrap/css/bootstrap.css',{cache: false}).then(function(response) { $ocLazyLoad.load('http://somepath/bootstrap/js/bootstrap.min.js',{cache: false}).then(function(response) { }); }); } } }])
and apply it so that these css and js only work for this div:
<div class="row" directivename></div>
How can I handle this in angularJS?
source share