-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathtest.js
More file actions
39 lines (35 loc) · 958 Bytes
/
test.js
File metadata and controls
39 lines (35 loc) · 958 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
angular.module('myApp', [])
.controller('myController', function($scope) {
$scope.call1();
$scope.read1;
$scope.write1 = 42;
function f(){
$scope.call2();
$scope.read2;
$scope.write2 = 42;
}
function g($scope){
$scope.notAScopeCall3();
$scope.notAScopeRead3;
$scope.notAScopeWrite3 = 42;
}
var scope = $scope;
scope.call4();
$scope.read14
$scope.write4 = 42;
function h(){
scope.call5();
scope.read5;
scope.write5 = 42;
}
})
angular.module('myApp', [])
.directive('myDirective', function() {
return {
link: function linkFunction(scope, element, attrs) { // A scope is injected here
scope.call6()
scope.read6;
scope.write6 = 42;
}
};
});