Commit 75cfb22c authored by Robert Knight's avatar Robert Knight

Convert `<svg-icon>` to a component

parent 67c59014
......@@ -152,6 +152,7 @@ module.exports = angular.module('h', [
.component('sidebarTutorial', require('./directive/sidebar-tutorial').component)
.component('shareDialog', require('./directive/share-dialog'))
.component('sortDropdown', require('./directive/sort-dropdown'))
.component('svgIcon', require('./directive/svg-icon'))
.component('timestamp', require('./directive/timestamp'))
.directive('excerpt', require('./directive/excerpt').directive)
......@@ -164,7 +165,6 @@ module.exports = angular.module('h', [
.directive('markdown', require('./directive/markdown'))
.directive('spinner', require('./directive/spinner'))
.directive('statusButton', require('./directive/status-button'))
.directive('svgIcon', require('./directive/svg-icon'))
.directive('tagEditor', require('./directive/tag-editor'))
.directive('threadList', require('./directive/thread-list'))
.directive('topBar', require('./directive/top-bar'))
......
......@@ -21,15 +21,11 @@ function SvgIconController($element) {
$element[0].innerHTML = icons[this.name];
}
module.exports = function () {
return {
bindToController: true,
module.exports = {
controllerAs: 'vm',
restrict: 'E',
controller: SvgIconController,
scope: {
bindings: {
/** The name of the icon to load. */
name: '<',
},
};
};
......@@ -7,7 +7,7 @@ var util = require('./util');
describe('svgIcon', function () {
before(function () {
angular.module('app', [])
.directive('svgIcon', require('../svg-icon'));
.component('svgIcon', require('../svg-icon'));
});
beforeEach(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment