Include angular.js using Maven in Java Spring project

Asked

Viewed 716 times

1

I’m studying the Spring Framework with Maven, in the part of inserting dependencies I’m having a little difficulty when trying to insert the angular.js in the html of the page, in the pom.xml file, the dependency of Angularjs was like this:

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

Ain’t no kind of mistake, so I guess it’s right.

In html I try to insert like this:

<head>
    <title>Home</title>
    <link rel="stylesheet" href="/META-INF/resources/webjars/angularjs/1.4.4/angular.js"/>

</head>

My main doubt is where is the Angularjs that is included in the project by Maven and how I put the path to js on the page ?

Thank you.

1 answer

2


  • I created the project using Spring Tool Suite, the IDE created a few xml files, and I tested each one of them until it worked in Servlet-context.xml ! Thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.