PROJECTS NOTES HOME

Angular Installation

1 Installation of Angular

  • Make sure you have nvm installed.

To install run:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
source ~/.bashrc
nvm -v.

Over it install node latest version by:

nvm install --lts
nvm use --lts
node -v

Make sure npm is installed by:

npm -v

Install Angular by:

npm install -g @angular/cli
ng version

Install project dependencies by:

npm install

Start angular service while in crud folder with ng serve command (or NODE_OPTIONS="–max_old_space_size=512" ng serve) if you are low on system resources. go to http://localhost:4200/ and you should see a list of movies.

typescript version - tsc -v

  • Development server

Run ng serve for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.

2 Start ng serve

You might close the terminal and open it again and try to use ng serve - it might say node is not found, install it.

well that's because NVM somehow forgot which node it was using.

so we need to tell NVM once again to use node lt's:

nvm use --lts

After this do node -v and npm -v - it should work once again.

3 Use emacs together with vscode to write angular code?