1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-21 21:51:48 +00:00

refactor tags directive(tags => tag-list, tag-item) & improve search UX

This commit is contained in:
Rokt33r
2015-06-11 02:02:25 +09:00
parent 8e7109161a
commit 9762da28a4
7 changed files with 85 additions and 42 deletions

View File

@@ -0,0 +1,16 @@
/* global angular */
angular.module('codexen')
.directive('tagItem', function () {
return {
restrict: 'A',
template: '#<span ng-bind="tag.name"></span>',
scope: {
tag: '=tagItem'
},
link: function (scope, el) {
el.on('click', function () {
scope.$emit('tagSelected', scope.tag)
})
}
}
})