Configure Angularjs ui-grid from Java before grid loads -


i configured angularjs ui-grid options, specific, columndefs, java because grid loads before gets columndefs configuration java, filtering doesn't show because loads before , doesn't see columns.

i used $http.get('url') function(gridops) columndefs.

how load config data java before ui-grid loads?

thank you!

found solution:

var app = angular.module('app', ['ngtouch', 'ui.grid', 'ui.grid.selection', 'ui.grid.exporter', 'ui.grid.importer', 'ui.grid.autoresize']);      fetchdata().then(bootstrapapplication);     }     function fetchdata() {         var initinjector = angular.injector(["ng"]);         var $http = initinjector.get("$http");          return $http.get("url").then(function(response) {             app.constant("config", response.data);          }, function(errorresponse) {             // handle error case         });     } app.controller('mainctrl', ['$scope','uigridconstants', '$http','config', function ($scope, uigridconstants, $http, config) { 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -