Using $templateCache for quickly retrieval from the cache after first time used. $templateCache mainly can use two methods: get(id) put(id, "your html code here") angular.module('app', []) .directive('myButton', function () { return { templateUr…
ng-html2js takes .html templates and converts them into strings stored in AngularJS's template cache. This allows you to bundle all of your templates into a single JavaScript file for simpler deployment and faster loading. 1. Install grunt. 2. Instal…