I'm creating an application in spring + angular, and for reasons I can not install the angular modules in the project folder by the command bower install ... how can I install these modules manually and how do I use it?
I'm creating an application in spring + angular, and for reasons I can not install the angular modules in the project folder by the command bower install ... how can I install these modules manually and how do I use it?
In the AngularJS page, click the Download
button and then Browse addicional modules
.
A list of module files will appear, click on the module file you want to add, copy the link and add the references.
I'll use AngularRoute
example, may be another. It may be the normal version for development or minified for production mode.
<script src="https://code.angularjs.org/1.4.5/angular-route.js" />
You should also add the dependencies in the main module or in the module that will use the dependency as already mentioned:
angular.module('app', ['ngRoute']);
This way you will not have to tinker with your local folder or use the bower. The files will be stored in your browser's cache. But if it is possible, you can also download it to your machine as already mentioned above.
You have to include the js
of the module in your application and then pass the dependency on your app, eg:
No html:
<script src="angular-route.js">
In your main module:
angular.module('app', ['ngRoute']);
The way to "install an AngularJS module" using Node.js (bower is a Node.js middleware), is to use bower install or npm install.
However, since you are not getting that way, the other way is to do this manually, that is, download the JS file from the Angular module and import the script into your HTML and your Angular app.
Ex:
Download the module: angular-filter
Include in your HTML:
<script src="angular-filter.js">
Then add the module in the angle:
angular.module("app", ["angular.filter"]);