(function(module) {module.controller("myctrl",["$scope", function($scope) { console.log("A"); $scope.A = "A"; }]); module.factory("thefactory",["$http","xyz", function($http, xyz) { console.log("B"); }]); module.directive("my-directive", function() { return { template: "

Hello World

" }; }); module.directive("myPane", function() { return { require: '^myTabs', restrict: 'E', transclude: true,"controller":["$scope","ttt", function($scope, ttt) { console.log("hah"); }], scope: { title: '@' }, link: function(scope, element, attrs, tabsCtrl) { tabsCtrl.addPane(scope); }, templateUrl: 'paneid', }; });module.directive("myTabs", function() { return { restrict: "E", transclude: true, scope: {},"controller":["$scope", function($scope) { var panes = $scope.panes = []; $scope.select = function(pane) { angular.forEach(panes, function(pane) { pane.selected = false; }); pane.selected = true; }; this.addPane = function(pane) { if (panes.length == 0) { $scope.select(pane); } panes.push(pane); }; }], "templateUrl": 'tabstemplateurl', }; }); module.run(['$templateCache', function($templateCache) { $templateCache.put("paneid","
\n
\n"); $templateCache.put("tabstemplateurl","
\n
\n
\n"); }]); })(angular.module("mod1",[])); Added by mini