我正在尝试在AngularJS和RequireJS中使用angular-ui-grid。见plunker here。AngularJS + RequireJS + angular-ui-grid
我的index31.html有grid和indexController.js定义gridOptions对象。 indexController在需要时被注入。
当index31.html之前,浏览器加载indexController.js,它工作正常(显示即网格),但是当它是倒过来,我得到错误:$scope.uiGrid is undefined.
如何指定(在$ stateProvider配置或其他地方)始终在index31.html之前加载indexController.js。或者,如何在HTML之前加载所有控制器?
你plunker链接不工作 – Cyberdelphos
@Cyberdelphos谢谢,我已经更新了。在这里也加入.. http://plnkr.co/edit/5P2GAxIdPNbC5EvcKn4h – JeeAyez