Monthly Archives: May 2016

add css to template

http://stackoverflow.com/questions/17695156/angular-js-load-css-and-js-files-dynamically Just write a service to add CSS and JS files to the <head> Here is a example service which is used to dynamically load CSS files.You can modify it easily to load JS files. https://github.com/Yappli/angular-css-injector use angular-css: https://github.com/door3/angular-css Imho, … Continue reading

Posted in Angularjs, Uncategorized | Leave a comment

how to know the template exist or not?

http://stackoverflow.com/questions/30703179/how-to-test-existence-of-template-in-templatecache describe(‘The popup template’, function() { var $templateCache; beforeEach(inject(function($injector) { $templateCache = $injector.get(‘$templateCache’); }); it(‘should use a template that exists’, function() { // If you are using something such as chai expect($templateCache.get(‘your/template/url.html’)).to.be.ok; // If you aren’t use an assertion library … Continue reading

Posted in Angularjs | Leave a comment