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

标签 angularjs customization umbraco umbraco7

我正在尝试为 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/

相关文章:

asp.net - 验证时出现 umbraco 公共(public)访问错误

c# - 在 C# 中使用 MachineKey 编码进行 Umbraco 解密

angularjs - 将 Angular 与 Grails 一起使用时出错

javascript - 如何将姓名拆分为名字和姓氏并在范围内使用

javascript - 在 div 而不是输入上使用 AngularJS ngKeyup

Python 控制台名称自定义

android - 如何使自定义 toast 消息占据整个屏幕

ios - 如何自定义不同图片和位置的 UIRefreshControl?

twitter-bootstrap - Umbraco 中的 Bootstrap 3

javascript - 密码字段从密码中删除 '/' 字符