The Net Ninja Youtube Tutorial was published on August 16, 2016. I started working with it in January, 2017, and there were already some differences in the code that Angular 2 generated for me.
This is the initial code that ng new ninja-directory
created for me. To see the completed code, you must look at branch Lesson27. To clone that code you can do this:
git clone https://github.com/amnotafraid/ninja-directory -b Lesson27
When I typed ng -v
on the command line, I got this:
angular-cli: 1.0.0-beta.24
node: 6.0.0
os: darwin x64
@angular/common: 2.4.4
@angular/compiler: 2.4.4
@angular/core: 2.4.4
@angular/forms: 2.4.4
@angular/http: 2.4.4
@angular/platform-browser: 2.4.4
@angular/platform-browser-dynamic: 2.4.4
@angular/router: 3.4.4
@angular/compiler-cli: 2.4.4
This project was generated with angular-cli version 1.0.0-beta.24.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive/pipe/service/class/module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
Run ng github-pages:deploy
to deploy to Github Pages.
To get more help on the angular-cli
use ng help
or go check out the Angular-CLI README.