Skip to content

Instantly share code, notes, and snippets.

@davidjguru
Created December 16, 2018 19:04
Show Gist options
  • Save davidjguru/7270b44b90ffc2b9fd34d74339fba540 to your computer and use it in GitHub Desktop.
Save davidjguru/7270b44b90ffc2b9fd34d74339fba540 to your computer and use it in GitHub Desktop.
First steps with Angular: Building the scenario for Angular in my system (Ubuntu).
# Load the repo and install node 10.x
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
sudo apt-get install -y nodejs
# Check the version installed
node -v
npm -v
# Installing the Angular-cli by npm
sudo npm install @angular/cli -g
# Updating npm in my system
sudo npm install -g npm
npm -v
# Testing Angular cli
ng version
# Ask for a new Angular project called angular-material-begin and using SASS
ng new angular-material-begin --style=scss
# Goes to the new created folder
cd /home/davidjguru/angular-material-begin/
# Install two dependencies for work with Material examples
npm install --save @angular/material @angular/cdk
npm install --save @angular/animations
## Getting an Hello World in browser
# Ask the App at the server, listening at http://localhost:4200
ng serve
# Ask the App, but opening directly your main browser
ng serve --open
# Change the port in server, 4200 (default port) by 5050 (example)
ng serve --port 5050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment