angularIO.directive('ngioCheatsheet', function() { return { controllerAs: '$ctrl', controller: function($http, $attrs, $sce) { var $ctrl = this; $http.get($attrs.src).then(function(response) { $ctrl.currentEnvironment = response.data.currentEnvironment; $ctrl.version = response.data.version; $ctrl.sections = response.data.sections; }); $ctrl.getSafeHtml = function(html) { return $sce.trustAsHtml(html); }; }, template: '
{{section.name}} | \n' + '\n' + ' |
---|---|
{{child.syntax}} | \n' +
' \n' + ' |