Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bd8613 commit 7f6322dCopy full SHA for 7f6322d
src/ng/directive/ngInit.js
@@ -29,14 +29,15 @@
29
* @param {expression} ngInit {@link guide/expression Expression} to eval.
30
*
31
* @example
32
- <example>
+ <example module="initExample">
33
<file name="index.html">
34
<script>
35
- function Ctrl($scope) {
36
- $scope.list = [['a', 'b'], ['c', 'd']];
37
- }
+ angular.module('initExample', [])
+ .controller('ExampleController', ['$scope', function($scope) {
+ $scope.list = [['a', 'b'], ['c', 'd']];
38
+ }]);
39
</script>
- <div ng-controller="Ctrl">
40
+ <div ng-controller="ExampleController">
41
<div ng-repeat="innerList in list" ng-init="outerIndex = $index">
42
<div ng-repeat="value in innerList" ng-init="innerIndex = $index">
43
<span class="example-init">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>
0 commit comments