Copied to clipboard

Flag this post as spam?

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


  • Dibs 202 posts 991 karma points
    Nov 03, 2015 @ 22:58
    Dibs
    0

    Render multiple editors within custom grid editor

    Dear Umbraco Team

    I have created a simple custom grid editor with one textarea, i would like to add another textarea or rte to the .html file and be able to render both on the .cshtml file.

    When adding another code for another textarea to .html, controller.js and .cshtml files grid editor doesn't allow back office data entry and error displayed on rendered .cshtml

    It is probable down to my lack of knowledge in Angluar.js and how to map values from html file to controller and make use of model within cs.html file. Still new and learning Angluar and Umbraco is i plod on.

    here is my code .html

     <div ng-controller="my.custom.faqgrideditorcontroller">
        <textarea rows="1" ng-model="control.value.text2" ng-style="control.config"></textarea>
        <textarea rows="1" ng-model="control.value.text1" ng-style="control.config"></textarea>
        </div>
    

    controller.js

    angular.module("umbraco").controller("my.custom.faqgrideditorcontroller", function($scope){
        $scope.control.value.text2 = "my new value";
        $scope.control.value.text1 = "my new value";
    });
    

    .cshtml

    @inherits Umbraco.Web.Mvc.UmbracoViewPage<dynamic>
    @Model.control.value.text2
    @Model.control.value.text1
    

    Any assistance would be helpful

    Thanks Dibs

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Nov 04, 2015 @ 08:13
    Dennis Aaen
    0

    Hi Dibs,

    I donĀ“t have the answer to your questions, but I would like to provide a link that might help you in the right direction.

    Have you seen the Angular Workbook, if not you can find it here https://github.com/umbraco/AngularWorkbook

    Hope this can help you a step or two further to understand Angular in collaboration with Umbraco.

    /Dennis

  • Dibs 202 posts 991 karma points
    Nov 04, 2015 @ 12:47
    Dibs
    100

    Cheers Dennis

    I will go through the workbook when/if i get free time : (

    I sorted the issues by removing the $scope assignments within the controller.js file.

    thanks Dibs

Please Sign in or register to post replies

Write your reply to:

Draft