Copied to clipboard

Flag this post as spam?

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


  • Jason Prothero 422 posts 1243 karma points MVP c-trib
    Aug 31, 2013 @ 00:23
    Jason Prothero
    0

    v7 PropertyEditor - How to add an AngularJS directive?

    I'm trying to create a custom PropertyEditor in Belle (v7) and I would like to use an existing AngluarJs directive / module to handle the UI and manage the binding.

    I'm using the ui-select2 directive (https://github.com/angular-ui/ui-select2)

    My problem is that I'm not sure how to include the ui-select2 module as a dependency.

    Normally, you would do something like this:

    var myAppModule = angular.module('MyApp', ['ui.select2']);

    However, the "umbraco" module is already created and what I add my property editor to in my javascript file in app plugins.

    angular.module("umbraco").controller('MyPackage.PropertyEditors.MySelector', mySelector);

     

    I'm pretty new to AngularJs, so how would I go about adding that?

  • Janne Mårtensgård 11 posts 232 karma points
    Sep 02, 2013 @ 00:08
    Janne Mårtensgård
    0

    I'm not 100% sure but I don't think you can add dependencies to the umbraco module once it has been initialized. It would be a nice feature if there was a section in the package.manifest where you could specify additional script files and module names to be loaded and added to the umbraco module dependencies before Angular gets started up.

  • Janne Mårtensgård 11 posts 232 karma points
    Sep 02, 2013 @ 16:03
  • Jason Prothero 422 posts 1243 karma points MVP c-trib
    Sep 03, 2013 @ 05:52
    Jason Prothero
    0

    Janne,

    Thanks for the heads up and the link to that issue.  I figure they will work something out soon enough, but just wanted to make sure its on the radar.

     

    Thanks,
    Jason 

  • dillorscroft 198 posts 192 karma points
    Oct 28, 2014 @ 15:44
    dillorscroft
    0

    Did anything move on from this?

    Keen to use existing directives myself.

    Thanks

    Matt

  • dillorscroft 198 posts 192 karma points
    Oct 28, 2014 @ 15:46
    dillorscroft
    0

    Sorry... just seen the link to issues.umbraco.

    Ignore me.

Please Sign in or register to post replies

Write your reply to:

Draft