Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4253 posts 9078 karma points MVP 2x admin c-trib
    7 days ago
    Ismail Mayat
    0

    umb-editor-sub-views directive

    I am in the proc ess of upgrading examine inspector to v8. I have the following

    enter image description here

    The select index option is new tab i have added as i am using umb-editor-sub-views for the tabs. In the controller i have init indexes method that populates the drop down. That used to work, however now that i have moved it into its own partial which is then loaded by umb-editor-sub-views that drop down is empty.

    Looks to me like some load order issue? Anyone any suggestions?

    There does not seem to be much in the way of docs on this.

    Regards

    Ismial

  • Kevin Jump 1394 posts 8806 karma points MVP 3x c-trib
    7 days ago
    Kevin Jump
    0

    Hi

    is the Init method in the main controller (that defines the subviews) or an independent controller for that view?

    when doing this I moved somethings into a controller for the subview, as that gets fired when the subview has loaded.

    there might be an angular method to trigger when the views are loaded but it's probably more reliable for it to be in a child controller?

  • Ismail Mayat 4253 posts 9078 karma points MVP 2x admin c-trib
    7 days ago
    Ismail Mayat
    0

    its all in one controller which is referenced by the div that wraps the editor-sub-view

  • Kevin Jump 1394 posts 8806 karma points MVP 3x c-trib
    7 days ago
    Kevin Jump
    0

    just looking and i have another version of this where i do load stuff in the main controller.

    so settings go into vm.settings. (where vm is var vm = this in the controller)

    but on the child views this is accessed as model.settings

    so no idea where i got this info from but the model passed to the child items is in $scope.model ?

  • Ismail Mayat 4253 posts 9078 karma points MVP 2x admin c-trib
    7 days ago
    Ismail Mayat
    0

    Kevin,

    Could you send github souce link for this please.

    Regards

    Ismail

  • Kevin Jump 1394 posts 8806 karma points MVP 3x c-trib
    7 days ago
    Kevin Jump
    100

    buried in proprietary code ;)

    but here are the files https://gist.github.com/KevinJump/02ecd711a2d261c427a21243de9f7064

    this shows how the notifications.html sub view is just accessing the model.settings values which are loaded in the parent controller.

    Kevin

  • Ismail Mayat 4253 posts 9078 karma points MVP 2x admin c-trib
    7 days ago
    Ismail Mayat
    0

    Kevin,

    Woot that worked, just need to figure out a few other bits but in subviews model works.

    In original examine inspector nicked code from usync and now in new version nicking more code lol.

    If i see further than others its because i am standing on the shoulders of giants, Isaac Newton

Please Sign in or register to post replies

Write your reply to:

Draft