Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 655c52a

Browse files
s-lightNarretz
authored andcommitted
docs(guide/Directives): let myTabs directive ctrl use inline array notation
modified `docsTabsExample` myTabs directive ctrl at [Creating Directives that Communicate Example](https://docs.angularjs.org/guide/directive#creating-directives-that-communicate) so that it uses [Inline Array Annotation](https://docs.angularjs.org/guide/di#inline-array-annotation) and is compatible with [Using Strict Dependency Injection](https://docs.angularjs.org/guide/di#using-strict-dependency-injection) Closes #12767
1 parent fa3ddba commit 655c52a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/content/guide/directive.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ to which tab is active.
902902
restrict: 'E',
903903
transclude: true,
904904
scope: {},
905-
controller: function($scope) {
905+
controller: ['$scope', function($scope) {
906906
var panes = $scope.panes = [];
907907

908908
$scope.select = function(pane) {
@@ -918,7 +918,7 @@ to which tab is active.
918918
}
919919
panes.push(pane);
920920
};
921-
},
921+
}],
922922
templateUrl: 'my-tabs.html'
923923
};
924924
})

0 commit comments

Comments
 (0)