The question is simple, how to successfully implement Lodash with underscore.string library into AngularJS project?
It is necessary to use RequireJS to achieve this?
The question is simple, how to successfully implement Lodash with underscore.string library into AngularJS project?
It is necessary to use RequireJS to achieve this?
On
Thanks to @sylwester reply I figured it out, but his answer was just a hint, so I decided to enrich it a bit more.
No, you don't need to use RequireJS to implement both libraries together into AngularJS project. But it can be easily achieved - just look at this article.
Then download underscore.string to your project:
$ bower install underscore.string --save-dev
Finally make sure that libraries were added to your index.html:
<script type="text/javascript" src="vendor/loadash/lodash.js"></script>
<script type="text/javascript" src="vendor/angular/angular.js"></script>
<script type="text/javascript" src="vendor/angular-loadash/angular-loadash.js"></script>
<script type="text/javascript" src="vendor/underscore.string/underscore.string.js">
Feel free to improve this answer with RequireJS.
Yuo can use angular-underscore
please see here https://github.com/floydsoft/angular-underscore
or angular-lodash
https://github.com/cabrel/angular-lodash