Thursday, September 7, 2017

Angular Notes

Learn Angular 4 from Scratch - Free course from udemy

My Notes:

What’s Node.js® and NPM?

Node.js® is a JavaScript-based environment which you can use to create web-servers and networked applications. You can also use it to perform helpful tasks on your computer such as concatenating and minifying JavaScript files and compiling Sass files into CSS.
NPM is a “package manager” that makes installing Node “packages” fast and easy. A package, also called a module, is just a code library that extends Node by adding useful features. For example, the “request” module simplifies the process of making HTTP requests so you can easily get web resources from other sites.
NPM is installed when you install Node.js®
Although there is a Mac installer program on the Node website, we recommend using Homebrew to install and update Node.

https://nodejs.org/en/#download

https://www.solarianprogrammer.com/2016/04/29/how-to-upgrade-nodejs-mac-os-x/

https://treehouse.github.io/installation-guides/mac/homebrew

https://treehouse.github.io/installation-guides/mac/node-mac.html

NPM
See what version of npm you're running:
npm -vUpgrading on *nix (OSX, Linux, etc.)
npm install -g npm@latest
npm install -g npm@next

(You may need to prefix these commands with sudo, especially on Linux, or OS X if you installed Node using its default installer.)
You can upgrade to the latest version of npm using:
Or upgrade to the most recent release:

Install Angular CLI  - g installs globally

 npm install -g @angular/cli


Commands History:


ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  435  brew update
  436  node -v
  437  brew upgrade node
  438  brew install node
  439  node -v
  440  mpm -v
  441  npm -v
  442  brew upgrade node
  443  brew upgrade npm
  444  node -v
  445  node uninstall
  446  node help
  447  cd /urs/local
  448  cd /usr/local
  449  ls
  450  node -v
  451  npm -v
  452  brew uninstall node
  453  node -v
  454  node -v
  455  npm -v
  456  ls
  457  cd bin
  458  ls
  459  cd ..
  460  ls
  461  npm install -g n
  462  npm cache clean -f
  463  cd /Applications
  464  ls
  465  sudo n stable
  466  npm update -g
  467  node -v
  468  npm -v
  469  npm install -g npm@latest
  470  npm -v
  471  ng -v
  472  npm install -g @angular/cli
  473  ng -v
  474  node -v
  475  npm -v
  476  ng -v
  477  pwd
  478  cd /Users/
  479  ls
  480  cd alagappa/
  481  mkdir code
  482  cd code
  483  ls
  484  ng new ng4-playground
  485  ls
  486  mv ng4-playground ./code
  487  ls
  488  cd code
  489  ls
  490  pwd
  491  pwd
  492  cd ..
  493  ls
  494  mv code ng4-playground
  495  ls
  496  cd ng4-playground/
  497  ls
  498  ng -v
  499  pwd
  500  ng serve
  501  ls
  502  pwd
  503  cd code
  504  ls
  505  cd ng4-playground/
  506  ls
  507  ng serve
  508  ng -v
  509  pwd
  510  clear
  511  ls
  512  pwd
  513  clear
  514  ls
  515  pwd
  516  cd ..
  517  ng new components101
  518  clear
  519  pwd
  520  cd components101/
  521  ls
  522  ng generate component my-new-component
  523  pwd
  524  ng serve
  525  ng serve
  526  ng serve
  527  clear
  528  pwd
  529  cd ..
  530  cd components101/
  531  ng serve
  532  pwd
  533  ng g service data
  534  pwd
  535  ng serve
  536  pwd
  537  no install @angular/animations@latest --save
  538  clear
  539  npm install @angular/animations@latest --save
  540  ng serve
  541  la
  542  la
  543  ls
  544  ng build
  545  ls
  546  cd dist
  547  ls
  548  ls -lrt
  549  cd .
  550  pwd
  551  cd ..
  552  ls
  553  ng build --prod
  554  cd dist
  555  ls
  556  ls -lrt
  557  npm i -g anglular-cli-ghpages
  558  npm i -g angular-cli-ghpages
  559  npm i -g npm
  560  git add README.md
  561  pwd
  562  cd ..
  563  ls
  564  git add README.md
  565  git commit -m "first commit"
  566  git remote add origin git@github.com:namasthe/MyFirstAngular.git
  567  git push -u origin master
  568  git remote add origin https://github.com/namasthe/MyFirstAngular.git
  569  git push -u origin master
  570  echo "# MyFirstAngular" >> README.md
  571  git init
  572  git add README.md
  573  git commit -m "first commit"
  574  git remote add origin https://github.com/namasthe/MyFirstAngular.git
  575  git push -u origin master
  576  ssh -vT git@github.com
  577  ls -al ~/.ssh
  578  ssh-keygen -t rsa -b 4096 -C "anand_alagappa@yahoo.com"
  579  eval "$(ssh-agent -s)"
  580  vi ~/.ssh/config
  581  cd ~/.ssh
  582  ls
  583  vi ~/.ssh/config
  584  la
  585  ls
  586  ssh-add -K  ~/.ssh/id_rsa
  587  pbcopy < ~/.ssh/id_rsa.pub
  588  git push -u origin master
  589  git remote add origin https://github.com/namasthe/MyFirstAngular.git
  590  pwd
  591  cd -
  592  ls
  593  git remote add origin https://github.com/namasthe/MyFirstAngular.git
  594  git push -u origin master
  595  ng build --prod --base-href https://namasthe.github.io/MyFirstAngular/
  596  ngh
  597  history!

  598  history



No comments:

Post a Comment