如果我要使用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.';
});
您是否定义了 ? –