1

I have many widgets and component. After some time admin can add new component via BOWER and include in html file using GRUNT.

But how dynamic dependencies can be handle in angular.?

For example. I have following module name and dependencies

app = angular.module("sematree", ['ngRoute','ngResource', 'ui.bootstrap',
'adf', 'adf.structures.base', 'adf.widget.table']);

After some time i want to add stackedColumnChart.js component in my application folder and want to add 'adf.widget.stackedColumnChart' in my dependencies with opening my angular file.

Is it possibility that i can add dependencies using grunt.? or It can be handle dynamic under same folder.?

Kindly give me idea.

Zakaria
  • 14,892
  • 22
  • 84
  • 125
Uzma Manzor
  • 169
  • 1
  • 10
  • you can create a global array of all dependencies and use the same for angular dependencies. `var dependencies = ['ngRoute','ngResource', 'ui.bootstrap', 'adf', 'adf.structures.base', 'adf.widget.table']; angular.module("sematree", dependencies);` – vpsingh016 Jan 28 '16 at 09:57
  • Have a look at this grut plugin : https://www.npmjs.com/package/grunt-angular-extender. It might be what you're looking for.. – Eria Jan 28 '16 at 10:11
  • 1
    Or this other post : http://stackoverflow.com/questions/23209780/grunt-js-for-angular-js-dependency-injection-management – Eria Jan 28 '16 at 10:12
  • You should try https://github.com/ocombe/ocLazyLoad – Prayag Verma Jan 29 '16 at 06:18

0 Answers0