Include all javascript files in a directory to a html file in angularjs? with grunt?

前端 未结 3 2078
时光取名叫无心
时光取名叫无心 2020-12-14 16:37

In my AngularJS app, I\'ve many controllers js files.

These controllers (one.ctrl.js,two.ctrl.js,...) needs to be included in

3条回答
  •  时光说笑
    2020-12-14 17:14

    You could use the grunt-include-source plugin

    Using it you can define templates like these :

    html: {
        js: '',
        css: '',
      }
    

    in your html file which will be expanded to include all your source js and css files present in your source location which can be configured in the grunt task

提交回复
热议问题