-
Notifications
You must be signed in to change notification settings - Fork 131
/
no-directive-replace.js
40 lines (34 loc) · 1.22 KB
/
no-directive-replace.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// example - valid: true
angular.module('myModule').directive('helloWorld', function() {
return {
template: '<h2>Hello World!</h2>'
};
});
// example - valid: true, options: [{"ignoreReplaceFalse": true}]
angular.module('myModule').directive('helloWorld', function() {
return {
template: '<h2>Hello World!</h2>',
replace: false
};
});
// example - valid: false, errorMessage: "Directive definition property replace is deprecated."
angular.module('myModule').directive('helloWorld', function() {
return {
template: '<h2>Hello World!</h2>',
replace: true
};
});
// example - valid: false, errorMessage: "Directive definition property replace is deprecated."
angular.module('myModule').directive('helloWorld', function() {
var directiveDefinition = {};
directiveDefinition.templateUrl = 'helloWorld.html';
directiveDefinition.replace = true;
return directiveDefinition;
});
// example - valid: false, options: [{"ignoreReplaceFalse": false}], errorMessage: "Directive definition property replace is deprecated."
angular.module('myModule').directive('helloWorld', function() {
return {
template: '<h2>Hello World!</h2>',
replace: true
};
});