Skip to content

Commit 6acaa4b

Browse files
committed
[it-IT] PR johnpapa#216
Updated as PR johnpapa#216 "fix Y075/controllerAs example to account for the isolated scope".
1 parent e233241 commit 6acaa4b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

i18n/it-IT.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,12 +1214,12 @@ Nonostante questa guida spieghi i *cosa*, *come* e *perché*, trovo che sia di a
12141214
},
12151215
link: linkFunc,
12161216
controller : ExampleController,
1217-
controllerAs: 'vm'
1217+
controllerAs: 'vm',
1218+
bindToController: true // because the scope is isolated
12181219
};
12191220
return directive;
12201221

12211222
function linkFunc(scope, el, attr, ctrl) {
1222-
console.log('LINK: scope.max = %i', scope.max);
12231223
console.log('LINK: scope.vm.min = %i', scope.vm.min);
12241224
console.log('LINK: scope.vm.max = %i', scope.vm.max);
12251225
}
@@ -1232,8 +1232,7 @@ Nonostante questa guida spieghi i *cosa*, *come* e *perché*, trovo che sia di a
12321232
var vm = this;
12331233

12341234
vm.min = 3;
1235-
vm.max = $scope.max;
1236-
console.log('CTRL: $scope.max = %i', $scope.max);
1235+
console.log('CTRL: $scope.vm.max = %i', $scope.vm.max);
12371236
console.log('CTRL: vm.min = %i', vm.min);
12381237
console.log('CTRL: vm.max = %i', vm.max);
12391238
}

0 commit comments

Comments
 (0)