Reputation: 429
I currently am using java/html/css/js for my web app. I want to add Angular 4 into my webapp without using Node.js or NPM. Instead I would like to use Java.
Does anyone have any recommendations, examples, or ways I could go about doing this?
I imported the angular.min.js file into my project directory and added in some demo Angular code but it's not working. After running ng-build, I receive an error saying: "node_modules appears empty, you may need to run npm install
"
Upvotes: 1
Views: 60
Reputation: 76
Import the angular js file by downloading it into your project or referencing an angular CDN.
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>
Assuming you are using java servlets, create a new JSP with a controller endpoint mapped to it. Import the angular script on that JSP and you'll be good to go.
Upvotes: 1