ng-factory
Version:
AngularJS industrialized development
23 lines (15 loc) • 351 B
JavaScript
;
angular.module('ngFactory')
.provider('$hljs', function() {
this.$get = function($window) {
return $window.hljs;
};
})
.directive('hljs', function($hljs) {
return {
restrict: 'A',
link: function(scope, element, attr, controller) {
$hljs.highlightBlock(element[0]);
}
};
});