Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
75cfb22c
Commit
75cfb22c
authored
Mar 14, 2017
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert `<svg-icon>` to a component
parent
67c59014
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
13 deletions
+9
-13
app.js
src/sidebar/app.js
+1
-1
svg-icon.js
src/sidebar/directive/svg-icon.js
+7
-11
svg-icon-test.js
src/sidebar/directive/test/svg-icon-test.js
+1
-1
No files found.
src/sidebar/app.js
View file @
75cfb22c
...
@@ -152,6 +152,7 @@ module.exports = angular.module('h', [
...
@@ -152,6 +152,7 @@ module.exports = angular.module('h', [
.
component
(
'sidebarTutorial'
,
require
(
'./directive/sidebar-tutorial'
).
component
)
.
component
(
'sidebarTutorial'
,
require
(
'./directive/sidebar-tutorial'
).
component
)
.
component
(
'shareDialog'
,
require
(
'./directive/share-dialog'
))
.
component
(
'shareDialog'
,
require
(
'./directive/share-dialog'
))
.
component
(
'sortDropdown'
,
require
(
'./directive/sort-dropdown'
))
.
component
(
'sortDropdown'
,
require
(
'./directive/sort-dropdown'
))
.
component
(
'svgIcon'
,
require
(
'./directive/svg-icon'
))
.
component
(
'timestamp'
,
require
(
'./directive/timestamp'
))
.
component
(
'timestamp'
,
require
(
'./directive/timestamp'
))
.
directive
(
'excerpt'
,
require
(
'./directive/excerpt'
).
directive
)
.
directive
(
'excerpt'
,
require
(
'./directive/excerpt'
).
directive
)
...
@@ -164,7 +165,6 @@ module.exports = angular.module('h', [
...
@@ -164,7 +165,6 @@ module.exports = angular.module('h', [
.
directive
(
'markdown'
,
require
(
'./directive/markdown'
))
.
directive
(
'markdown'
,
require
(
'./directive/markdown'
))
.
directive
(
'spinner'
,
require
(
'./directive/spinner'
))
.
directive
(
'spinner'
,
require
(
'./directive/spinner'
))
.
directive
(
'statusButton'
,
require
(
'./directive/status-button'
))
.
directive
(
'statusButton'
,
require
(
'./directive/status-button'
))
.
directive
(
'svgIcon'
,
require
(
'./directive/svg-icon'
))
.
directive
(
'tagEditor'
,
require
(
'./directive/tag-editor'
))
.
directive
(
'tagEditor'
,
require
(
'./directive/tag-editor'
))
.
directive
(
'threadList'
,
require
(
'./directive/thread-list'
))
.
directive
(
'threadList'
,
require
(
'./directive/thread-list'
))
.
directive
(
'topBar'
,
require
(
'./directive/top-bar'
))
.
directive
(
'topBar'
,
require
(
'./directive/top-bar'
))
...
...
src/sidebar/directive/svg-icon.js
View file @
75cfb22c
...
@@ -21,15 +21,11 @@ function SvgIconController($element) {
...
@@ -21,15 +21,11 @@ function SvgIconController($element) {
$element
[
0
].
innerHTML
=
icons
[
this
.
name
];
$element
[
0
].
innerHTML
=
icons
[
this
.
name
];
}
}
module
.
exports
=
function
()
{
module
.
exports
=
{
return
{
bindToController
:
true
,
controllerAs
:
'vm'
,
controllerAs
:
'vm'
,
restrict
:
'E'
,
controller
:
SvgIconController
,
controller
:
SvgIconController
,
scope
:
{
bindings
:
{
/** The name of the icon to load. */
/** The name of the icon to load. */
name
:
'<'
,
name
:
'<'
,
},
},
};
};
};
src/sidebar/directive/test/svg-icon-test.js
View file @
75cfb22c
...
@@ -7,7 +7,7 @@ var util = require('./util');
...
@@ -7,7 +7,7 @@ var util = require('./util');
describe
(
'svgIcon'
,
function
()
{
describe
(
'svgIcon'
,
function
()
{
before
(
function
()
{
before
(
function
()
{
angular
.
module
(
'app'
,
[])
angular
.
module
(
'app'
,
[])
.
directive
(
'svgIcon'
,
require
(
'../svg-icon'
));
.
component
(
'svgIcon'
,
require
(
'../svg-icon'
));
});
});
beforeEach
(
function
()
{
beforeEach
(
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment