What is angular-loader.js for?

后端 未结 4 1711
终归单人心
终归单人心 2021-01-31 07:19

I saw a similar question on the Google groups and also here on Stackoverflow. Both times the question was not answered. The code in this file doesn\'t make it very clear about w

4条回答
  •  故里飘歌
    2021-01-31 07:43

    Angular loader allows your angular scripts to be loaded in any order.

    As angular-seed project shows us, Angular loader does not have any specific api, you just put it at the top of your index file (so that it's executed first) and then proceed to load your application files anyway you prefer.

    But, the most important thing for your use case is that you don't really need angular loader at all. RequireJS also allows your files to be loaded in any order, but it also provides you with many other features that angular loader just isn't made for.

    So, yes, you may use it with RequireJS, but you don't need to, because it becomes redundant.

提交回复
热议问题