如果我要使用AngularJs模板URL
templateUrl: 'Content/Custom/Login.html'
只有當用戶在Home/Index
控制器會工作。如果用戶將在另一個控制器,如Home/About
,它不應該。
http://localhost:7602/Home/Content/Custom/Login.html無法加載 資源:
因爲模板位於
http://localhost:7602/Content/Custom/Login.html
如何解決這一問題?什麼是模板聲明的正確方法?
$mdDialog.show({
controller: DialogController,
templateUrl: 'Content/Custom/Login.html',
parent: angular.element(document.body),
targetEvent: ev,
clickOutsideToClose: true,
fullscreen: useFullScreen
})
.then(function (answer) {
$scope.status = 'You said the information was "' + answer + '".';
}, function() {
$scope.status = 'You cancelled the dialog.';
});
您是否定義了 ? –