-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdirectives.js
More file actions
24 lines (23 loc) · 751 Bytes
/
directives.js
File metadata and controls
24 lines (23 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
app.directive('item', function() {
return {
restrict: 'E',
scope: {
title: "@"
},
transclude: true,
template: '<input id="{{title}}" class="css-checkbox" type="checkbox" ng-click="change(title)"><label for="{{title}}" class="css-label">{{title}}</label> <span ng-transclude></span><br />',
link: function(scope, element, attrs) {
scope.$parent.add(scope.title);
scope.change = function(title) {
scope.$parent.change(scope.title);
}
},
}
});
app.directive('tasks', function() {
return {
restrict: 'E',
transclude: true,
template: '<div class="alert alert-info" ng-transclude></div>'
}
})