我正在尝试为 Umbraco 7.0.1 解决方案整理一个基本的自定义属性编辑器,但看起来我在某个地方错过了一些东西,因为 Angular 无法识别正在调用的 Controller 函数。我需要另一双眼睛来关注这个问题。
我几乎复制并粘贴了 the example provided on Umbraco's site首先,并打算随后充实它。这是我到目前为止所拥有的:
package.manifest
{
//you can define multiple editors
propertyEditors: [
{
/*this must be a unique alias*/
alias: "AcuIT.Multidate",
/*the name*/
name: "Multidate Picker",
/*the html file we will load for the editor*/
editor: {
view: "~/App_Plugins/Multidate/multidate.html"
}
}
]
,
//array of files we want to inject into the application on app_start
javascript: [
'~/App_Plugins/Multidate/multidate.controller.js'
]
}
multidate.html
<div ng-controller="AcuIT.MultidateController">
<textarea ng-model="model.value"></textarea>
</div>
multidate.controller.js
angular.module("umbraco")
.controller("AcuIT.MultidateController",
function () {
alert("The controller has landed");
});
最后,这是我在浏览器控制台中看到的错误:
Error: Argument 'AcuIT.MultidateController' is not a function, got undefined at Error ()
这可能是我在某个地方错过的一个名字或一条路径,但我还没有发现它。任何指示表示赞赏。
最佳答案
重新启动应用程序池并刷新浏览器以包含 list 中的文件
关于angularjs - Umbraco 7 自定义属性编辑器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20776972/