繁体   English   中英

Umbraco 7自定义属性编辑器错误

[英]Umbraco 7 Custom Property Editor Error

我正在尝试为Umbraco 7.0.1解决方案整理出一个基本的自定义属性编辑器,但似乎我错过了某些地方,因为Angular无法识别正在调用的控制器函数。 我需要另一双眼睛。

首先,我已经复制并粘贴了Umbraco网站上提供的示例 ,并打算随后对其进行充实。 这是我到目前为止的内容:

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");
    });

最后,这是我在浏览器控制台中看到的错误:

错误:参数'AcuIT.MultidateController'不是一个函数,在错误()处未定义

这可能是我在某个地方错过的名称或路径,但我还找不到它。 任何指针表示赞赏。

重新启动应用程序池并刷新浏览器以包含清单中的文件

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM