SDE Internship @JohnsonControls
Anushkaa Ambuj
SWE Intern @Johnson Controls | ML Intern @Capgemini | Final Year @IIT Jodhpur | Computer Science | Machine Learning | Web Development
??DAY 6: DEVELOPMENT
Tasks
Task 1: Setting Up AngularJS on Windows
To build a new angular project
node -v
npm -v
Step 2: Install Angular CLI
npm install -g @angular/cli
ng version
Step 3: Create a New Angular Project
ng new [proj_name]
cd proj_name
ng serve
Open a web browser and navigate to https://localhost:4200/ to see your new Angular application running.
Task 2: Setting Up AngularJS on Ubuntu
To install NVM and Node.js on Ubuntu 22.4
sudo apt-get update
sudo apt install curl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
nvm --version
??This command will download and install the latest LTS version of Node.js available.
nvm install --lts
??Note: To install particular version of NodeJS, change the version number after 'v' in the command below.
nvm install v<version>
Example:
nvm install v18.20.3
This command will display a list of installed Node.js versions, indicating which version is currently active.
nvm ls
To switch to a specific Node.js version, you can use the following command:
nvm use <version>
Extra Tips:
To change the set default version of Node.js, use
nvm alias default <version>
Example:
nvm alias default 18.20.3
领英推荐
To install Angular CLI
npm install -g @angular/cli
npm install -g @angular/cli@<version>
Note: Example 1, installs the latest versions in 18, whereas example 2 installs the version in particular, ie. 18.0.4
Example 1:
npm install -g @angular/cli@18
Example 2:
npm install -g @angular/[email protected]
Task 3: Understanding HTML & CSS | Understanding <div>
Create the below webpage template
Task 4: Understanding 'components'
Break the above sections in the above webpage into separate components.
Questions:
How to install the necessary node modules if they are missing in the Angular Project?
Once, we have all the dependencies already mentioned in the 'packages.json' file. We have to simply open the terminal and write the below command.
npm install
Note: This step is very crucial when we clone a repo as the necessary node modules will be initially missing.
Shortcuts:
To open any folder in cmd on Windows
To open any project folder in VS Code
code .
Learning Modules:
HTML, CSS, TS, NodeJS, AngularJS, Windows Shortcuts