Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Koen van Ras 55 posts 313 karma points c-trib
    Oct 11, 2019 @ 08:32
    Koen van Ras
    0

    Add properties to custom section v8

    Hi,

    I'm building a section where I want to add Umbraco properties and custom properties to my view. (in Umbraco v8)

    I read and implemented code from the following code: http://www.enkelmedia.se/blogg/2013/12/4/umbraco-7-use-the-rich-text-editor-tinymce-in-a-custom-section/

    Though when I try to load the property I get the following result on the page: enter image description here

    And the following browser console error:

    Error: "[$compile:ctreq] Controller 'valFormManager', required by directive 'valPropertyMsg', can't be found!
    https://errors.angularjs.org/1.7.5/$compile/ctreq?p0=valFormManager&p1=valPropertyMsg"
    

    My code: HTML

    <ng-form>
        <umb-property property="property"
                      ng-repeat="property in model.properties">
            <umb-editor model="property"></umb-editor>
        </umb-property>
    </ng-form>
    

    JS

    $scope.properties = [{
        label: 'bodyText',
        description: 'Load some stuff here',
        view: 'rte',
        config: {
            editor: {
                toolbar: ["code", "undo", "redo", "cut", "styleselect", "bold", "italic", "alignleft", "aligncenter", "alignright", "bullist", "numlist", "link", "umbmediapicker", "umbmacro", "table", "umbembeddialog"],
                stylesheets: [],
                dimensions: { height: 400, width: 250 }
            }
        }
    }];
    

    Anyone able to help me out adding textstring fields (or any other type of field I can use as an example) to my section?

  • Mark Drake 39 posts 130 karma points c-trib
    Jan 30, 2020 @ 04:10
    Mark Drake
    0

    Hey mate! Sorry nobody ever responded to this.

    I ran into your post while searching for help with this exact issue.

    The following update to your HTML should do the trick:

    <ng-form val-form-manager>
        <umb-property property="property"
                      ng-repeat="property in model.properties">
            <umb-editor model="property"></umb-editor>
        </umb-property>
    </ng-form>
    

    In the code above, I've added val-form-manager as an attribute to <ng-form>.

Please Sign in or register to post replies

Write your reply to:

Draft