Javascript 角度模块(“myApp”、[]、[])

Javascript 角度模块(“myApp”、[]、[]),javascript,angularjs,twitter-bootstrap,Javascript,Angularjs,Twitter Bootstrap,我对Angular是个新手,对编码是个新手 我必须同时使用ng grid和iu.bootstrap,我想知道是否可以在单个模块中调用它们 我需要一个来自bootstrap的日期选择器,以及来自ng grid的网格 我该怎么办 谢谢你当你定义你的模块时,你可以注入你想要的任意多个模块 angular.module('myApp', ['ng-grid', 'ui.bootstrap']); 您还可以将应用程序/解决方案拆分为多个模块 angular.module('myApp.directive

我对Angular是个新手,对编码是个新手

我必须同时使用ng grid和iu.bootstrap,我想知道是否可以在单个模块中调用它们

我需要一个来自bootstrap的日期选择器,以及来自ng grid的网格

我该怎么办


谢谢你

当你定义你的模块时,你可以注入你想要的任意多个模块

angular.module('myApp', ['ng-grid', 'ui.bootstrap']);
您还可以将应用程序/解决方案拆分为多个模块

angular.module('myApp.directives', []);
angular.module('myApp.services', []);
angular.module('myApp', ['myApp.directives', 'myApp.services']);

当你定义你的模块时,你可以注入你想要的任意多个模块

angular.module('myApp', ['ng-grid', 'ui.bootstrap']);
您还可以将应用程序/解决方案拆分为多个模块

angular.module('myApp.directives', []);
angular.module('myApp.services', []);
angular.module('myApp', ['myApp.directives', 'myApp.services']);

下面是一个示例,说明如何执行您所要求的操作:

angular.module('myApp', [
    'ui.bootstrap',
    'ngGrid'

]);

下面是一个示例,说明如何执行您所要求的操作:

angular.module('myApp', [
    'ui.bootstrap',
    'ngGrid'

]);

我不确定这里是否有命名的依赖项,但您只需在angular.module命令的第二个参数中传递模块依赖项列表:


我不确定这里是否有命名的依赖项,但您只需在angular.module命令的第二个参数中传递模块依赖项列表:


例如,您可以在依赖项列表中插入模块

模块'mudule-name',['module1',module2']

如果不使用任何依赖项,则按如下方式使用


angular.module'module.name',[]

例如,您可以在依赖项列表中插入模块

模块'mudule-name',['module1',module2']

如果不使用任何依赖项,则按如下方式使用


angular.module'module.name',[]

非常感谢你们所有人!!!你接受一个或者给我们所有人一个向上的箭头怎么样-非常感谢你们所有人!!!你接受一个或者给我们所有人一个向上的箭头怎么样-