私は2つの別々のファイルに2つのモジュールを持っています:
first.js
var app = angular.module('first',['ngGrid']);
app.controller('firstTest',function($scope))
{
...
});
second.js
var app = angular.module('second',['ngGrid']);
app.controller('secondTest',function($scope))
{
...
});
これらの 2 つのモジュールをナビゲーション タイプ ビューで再度使用したいと思います。
tabs.js
var app = angular.module('myTabs',['first','second']);
$scope.tabs = [
{title: "first", content:first.firstTest},
{title: "second", content:second.secondTest},
];
$scope.navType='pills';
});
何が起こるかというと、次のエラーが発生します。
unknown provider firstProvider <- first
だから私が持っている質問は、
1)これはタブ付きナビゲーションを行う正しい方法ですか2)とモジュール
の注入を処理する適切な手法は何ですか?first
second