2

I'm trying to get a basic custom property editor sorted out for an Umbraco 7.0.1 solution but it looks like I've missed something somewhere because Angular can't recognise the controller function being called. I need another pair of eyes over this.

I've pretty much copied and pasted the example provided on Umbraco's site to start with and was intending to flesh it out afterwards. Here's what I have so far:

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

Finally, here is the error I'm seeing in the browser console:

Error: Argument 'AcuIT.MultidateController' is not a function, got undefined at Error ()

It's probably a name or a path I've missed somewhere but I can't spot it yet. Any pointers appreciated.

1 Answer 1

4

Restart app pool and refresh browser to include the files from the manifest

Sign up to request clarification or add additional context in comments.

3 Comments

I'm running IIS Express on the dev box and I was pretty sure I'd done everything required to flush any cached content, but will try this again to be sure.
Browser cache. Bugger. Thanks, Per.
I am facing the same issue. Cache clearing not working in my case. Can anybody suggest something else?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.