Yeah - not content apps - (like pluginable) but yo...
# package-development
k
Yeah - not content apps - (like pluginable) but you can add them using
navigation
on umb-editor-header property - you pass it an array of things and it writes the tabs out. ( https://github.com/KevinJump/uSync/blob/v11/dev/uSync.Backoffice.Assets/App_Plugins/uSync/backoffice/usync/usync.dashboard.controller.js#L33-L38 )
m
Thanks Kevin, have you had to run something on change in one of the other views? Or on "activation" of the view?
k
you don't have to - the controllers will load when the whole page loads, but you can emit an event on select (that's what we do for the details view tabs in uSync.Complete - where we load a diff on the tab change)
Copy code
vm.selectNavigationItem = function (item) {
            eventsService.emit('usync-publisher-detail.tab.change', item);
        }
and then we can check that on the other site to see if the selected item is out new tab
(there might be built in events for this i can't remember - there certainly is for content apps
m
On load is working great, my challenge is on one view you manage the CSP the other view uses an evaluator to give you feedback on how secure it is
k
yes -its really only a performance thing if you care because doing it on load means zero delay for the user, but potentially extra server calls. I think you can access the parent scope - if you want to share stuff.
think you get it in $scope.model
m
Copy code
umb-editor-sub-views ng-if="!vm.page.loading"
                                  sub-views="vm.page.navigation"
                                  model="vm.definition">
            </umb-editor-sub-views>
$scope.model match's definition in the parent and updates it fine in both views but $watch doesnt pick it up
Actually thinking about it, might be better it doesnt auto update incase they are toggling between
k
yeah - i am a big fan of firing your own events via
eventService.emit
- then you can have your update code respond when the event fires when. (also makes it easier to move things into components if you do that later)