【发布时间】:2014-03-28 16:29:01
【问题描述】:
在角引导完成后,有什么方法可以动态注入第三方模块?我正在尝试使用 ngGrid 和 ngTable,但它不起作用。
例如,我定义了我的 ngApp 模块: angular.module("app", ["ngRoute"]); // 我在 html 中定义的“应用程序”,例如: ....
现在我加载 controller.js、ng-grid.debug.js 文件和 grid.html 文件:
grid.html 包含:
controller.js 包含用于表数据的 $scope 变量“gridOptions”。
所以我在运行中包含了 ng-grid.debug.js,但是如何在运行中将“ngGrid”模块包含到主应用程序模块中。
但事情不工作。有人可以建议吗?
【问题讨论】:
标签: angularjs dynamic dependencies code-injection ng-grid