ディレクティブ付きのモジュールとコントローラー付きのモジュールであるアプリケーションがあります。
angular.module('ValidationWidgets', [])
.directive('validationfield', function () {
....
});
angular.module('MyPage', ['ValidationWidgets'])
.controller('MyFirstController', function ($scope) {
....
});
.controller('MyFirstController', function ($scope) {
見た目が悪いので、appモジュールで多くのコントローラーを宣言するためのかなりの構文はありますか?
私は次のようなものを書きたいです:
var myPage = angular.module('MyPage', ['ValidationWidgets']);
myPage.controllers.MyFirstController = function($scope) {
...
}