0
に私はJavaの動的Webプロジェクト、ディレクトリ・マップでの私の角度アプリをdeplyingいangularjsはtemplateUrlはWebContentを
var app = angular.module('myApp');
app.directive('formDirective', formDirective);
function formDirective() {
var directive = {
restrict: 'EA',
templateUrl: 'formDirective.html', //the request
scope: {
},
controller: FormControllerDir,
controllerAs: 'vm',
bindToController: true
};
return directive;
}
function FormControllerDir() {
console.log('FormController');
}
とformDirective.html
が置かれています同じディレクトリの下で、ルートの下のファイルの角度検索:
GET http://localhost:8080/P2P/formDirective.html 404 (Not Found)
P2Pは私のproje私はそれを変更するにはどうすればよいのCT名、:
http://localhost:8080/P2P/JavaScript/directives/formDirective.html
多分 '/'前に 'templateUrl追加:「/ formDirectiveを.html " –
どういうことですか。/formdirective.html – gianni
ほぼ、サブフォルダにリダイレクトされていますが、これが道です、投稿の回答です。 –