1

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"

2
  • You will need typescript compiler at the very least in order to compile the angular project... Commented Nov 18, 2017 at 18:54
  • 1
    Why wouldn't you want to use node during development? If you don't want to then probably better you don't use angular 4 and use angular 1.x Commented Nov 18, 2017 at 18:57

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.