I am not sure where Angular 2 stands with NodeJs/Express. Do Angular and Node work together or can you only use one of them for a web project?
Angular allows you to build a complete web application without the need for Node.js
Without Node.js and express you will need to sort out a web server however. You could use Apache, Nginx or another if you have a preference.
However, if you are looking to create a backend or API that your frontend communicates with then you could introduce Node.js and develop an API. You could use other frameworks or tools for that however.
You could also use some Node modules in conjunction with a build tool (e.g. Grunt) to optimize your frontend assets like CSS, JS, Images etc. This would allow you more control over the condition of static assets served to the client after a build is completed.
In summary you can build a complete web application with Angular without the need for Node.js but Node will allow you to have more control over your project assets and if you want will allow you to create a separate application that supports your front-end.
Nope, Angular And node are differents Angular is a very powerful front-end framework that let you use a MVC structure at client side, whereas Node.js is a impletation of Javascript at server side, that let you make "active" servers (With Node, you can do asynchronous tasks, it is not only generate webpage with scripting. For exemple, it is great to use for websocket, a thing that you can't do in PHP).
However, it is a good solution for a web application, because both uses Javascript, and use natively Json for requests.
But currently, I'm working in a PHP project with angular2 at client side. It stays better than jQuery or other frameworks because of MVC structure, but when you use it with PHP, you have to make some arrangements (for example, when you send a POST request with angular, data are encoded with JSON, a thing that PHP does not understand: So I used in my client side a function that convert a JSON object to a simple urlEncoded string...)
I hope I answered your question,
Vincent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With