Skip to content

Ways to refer to angularJS script source in web pages

November 20, 2015
  1. If you have a pure html page, can refer to the scripts from angularJS site directly

https://code.angularjs.org/1.2.9/angular.min.js

https://code.angularjs.org/1.2.9/angular-route.min.js

https://code.angularjs.org/1.2.9/angular-resource.min.js

  1. If you have a mavenised project, can download the angularJS jar from maven and refer to the scripts from jsp page like this

http://${pageContext.request.contextPath}/webjars/angularjs/1.2.9/angular.min.js

http://${pageContext.request.contextPath}/webjars/angularjs/1.2.9/angular-route.min.js

http://${pageContext.request.contextPath}/webjars/angularjs/1.2.9/angular-resource.min.js

Pom.xml

<dependency>
<groupId>org.webjars</groupId>
<artifactId>angularjs</artifactId>
<version>1.2.9</version>
</dependency>

 

 

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: