角度指令テンプレートにいくつか問題があります。角度指令テンプレートがエラーを投げる
'use strict';
function HomeDirective() {
return {
controller: 'homeController',
template: require('./views/home.html'),
restrict: 'AEC',
scope: true
}
}
module.exports = HomeDirective;
私は、ビューfolder.Myビュー内のテンプレートはエラーが私が使用したときに働いている
<div>
^
ParseError: Unexpected token
at wrapWithPluginError (C:\Users\DAT-Asset-110\Desktop\Test
Code\anguler_test_structure\node_modules\gulp-browserify\index.js:44:10)
以下れる
<div>
<p>This is Home Page.You can nevigate to any page</p>
<p>The Content is {{test}}</p>
</div>
である必要があり
'use strict';
function HomeDirective() {
return {
controller: 'homeController',
template: '<div><p>This is Home Page.You can nevigate to any page</p>
<p>The Content is {{test}}</p></div>',
restrict: 'AEC',
scope: true
}
}
module.exports = HomeDirective;
缶誰も私を助けます。問題は何ですか?それの解決策は何ですか?
あなたのテンプレートを読み込むためにWebPACKのを使用していますか? 。そうでなければテンプレートではなくtemplateUrlでなければなりません。 –
webpack.Iを使用して適切なリンクステップを送ることができますか?私はbrowserifyを使う@ ShushanthPallegar –