Copied to clipboard

Flag this post as spam?

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


  • Andrew Hawken 59 posts 116 karma points c-trib
    Aug 15, 2018 @ 17:19
    Andrew Hawken
    0

    Using a datatype in a dialog

    I want to display a country code picker in a custom dialog (that I'm opening from Fluidity).

    What I really want to do is to just display the already created datatype called "CountrySelectList" and bind the value to "$scope.countrycode"

    At the moment I can figure out how to create a dropdown in code with something like this

               $scope.properties = [{
               label: 'Select Language',
               description: 'Pick the language to upload',
               view: 'DropDown',
               value: $scope.languagecode,
               config: {
                   multiPicker: "0",
                   entityType: "CountrySelectList",
                   items : [{id:0, value:"EN"}, {id:1,value:"FR"}]
               }
           }]
    

    which kind of works, but I want to re-use the existing picker (and also hopefully get the pre-value back out, not the id)

    In the template I'm using

    <umb-property property="property" ng-repeat="property in properties"><umb-editor model="property"></umb-editor></umb-property>
    
  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Sep 14, 2018 @ 12:41
    Dave Woestenborghs
    101

    Hi Andrew,

    In this article I wrote how to reuse existing datatypes in your own angular components.

    https://24days.in/umbraco-cms/2014/umbraco-angular-tips/

    Seeing the article is almost 4 years old not everything may work.

    Dave

  • Andrew Hawken 59 posts 116 karma points c-trib
    Sep 14, 2018 @ 13:07
    Andrew Hawken
    0

    That looks about exactly what I was looking for! Time flies but I'm sure its close enough to get me going .

Please Sign in or register to post replies

Write your reply to:

Draft