UNPKG

angular-material-npfixed

Version:

The Angular Material project is an implementation of Material Design in Angular.js. This project provides a set of reusable, well-tested, and accessible Material Design UI components. Angular Material is supported internally at Google by the Angular.js, M

31 lines (22 loc) 809 B
angular.module('appUsingTemplateCache', ['ngMaterial']) .controller('DemoCtrl', function($scope) {}) .config(function($mdIconProvider) { // Register icon IDs with sources. Future $mdIcon( <id> ) lookups // will load by url and retrieve the data via the $templateRequest $mdIconProvider .iconSet('core', 'img/icons/sets/core-icons.svg',24) .icon('social:cake', 'img/icons/cake.svg',24); }) .run(function($templateRequest) { var urls = [ 'img/icons/sets/core-icons.svg', 'img/icons/cake.svg', 'img/icons/android.svg' ]; // Pre-fetch icons sources by URL and cache in the $templateCache... // subsequent $templateRequest calls will look there first. angular.forEach(urls, function(url) { $templateRequest(url); }); }) ;