R
Radoslav Kirilov
Guest
Hi Louis, In the current version of KUIB builder we did not design side navigation to be changed (especially with dynamic call for getting menus values and dynamically building the html). I will put this requirement in our back log and we will prioritize it for the next major version of the product. At meantime, you can try overriding the entire side-navigation view, not just its template and perform http calls for getting menus there and then build html of the custom side-navigation. For example: ... import sideNavigationTemplate from './../common/side-navigation-extended/index.html'; import sideNavigationController from './../common/side-navigation-extended/index.js'; // Import your custom modules here: export default angular.module('app.extensions.module', [ ]) .run(['$state', '$rootScope', function($state, $rootScope) { var state = $state.get('module.default'); if (state && state.views && state.views['side-navigation']) { state.views['side-navigation'].templateUrl = sideNavigationTemplate; state.views['side-navigation'].controller = sideNavigationController; } }]).name; Please note that I got sideNavigationTemplate and sideNavigationController from common/side-navigation-extended folder but you can put the view in a different place. Then in the controller of this extended view you can call your endpoint for getting urls and build the html for your dynamic navigation (the html can be similar to the original code of the side navigation view placed under the common/side-navigation folder). Please give it try and let me know if it works for you. Best, Rado
Continue reading...
Continue reading...