-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAngular_VS_React.txt
More file actions
45 lines (26 loc) · 1.58 KB
/
Angular_VS_React.txt
File metadata and controls
45 lines (26 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
To create new app
------------------------------------------------------------
Angular: ng new "app-name"
React: npm create-react-app "app-name"
To start the app
------------------------------------------------------------
Angular: ng serve -o || npm run ng serve -o
React: npm start || npm run start
To create buils file for the app
------------------------------------------------------------
Angular: ng build
React: npm build
Data binding
------------------------------------------------------------
Angular: Two curly braces {{ variable }}
React: Single curly brace { variable }
To run the app in different port apart from default port
------------------------------------------------------------
Angular: ng serve --port 4401
React: please refer to "https://stackoverflow.com/questions/40714583/how-to-specify-a-port-to-run-a-create-react-app-based-project" URL
************************************** IMP Points to remember ****************************************
* Angular provides a number of built-in features like routing, state management, rxjs library and http services straight out of the box. This means that one does not need to look for the above stated features separately. They are all provided with angular.
* Angular app will be served from 4200 port by default
* React app will be served from 3000 port by default
* Both Angular & React are similar in terms of their component based architecture, However Angular is a Framework and a complete solution while React is library.
******************************************************************************************************