Update Angular page to point to new book
This commit is contained in:
parent
a39dcaca86
commit
ca17032a7f
|
@ -1,84 +1,2 @@
|
|||
# Angular
|
||||
Current for at least Angular 12.1. Chunks of this are from the README that's created when making a new site.
|
||||
|
||||
## Help/available commands
|
||||
```bash
|
||||
ng help
|
||||
ng ___ --help
|
||||
```
|
||||
|
||||
## Create a new site/project
|
||||
```bash
|
||||
ng new new-project-name
|
||||
# This option can be used if there's an issue during npm install.
|
||||
ng new new-project-name --skip-install
|
||||
# Use a custom prefix for selector names.
|
||||
ng new new-project-name --prefix ___
|
||||
```
|
||||
|
||||
## Add eslint
|
||||
See https://github.com/angular-eslint/angular-eslint for current information. As of 9/5/2021:
|
||||
```bash
|
||||
ng add @angular-eslint/schematics
|
||||
```
|
||||
|
||||
## Start a development server
|
||||
Runs on port 4200 by default.
|
||||
|
||||
```bash
|
||||
ng serve
|
||||
# Opens the site in the default browser.
|
||||
ng serve --open
|
||||
ng serve -o
|
||||
```
|
||||
|
||||
## Code scaffolding
|
||||
See [ng generate](https://angular.io/cli/generate).
|
||||
|
||||
```bash
|
||||
# Create a new component.
|
||||
ng generate component heroes
|
||||
ng generate component hero-detail
|
||||
ng g c input-button-unit
|
||||
ng g c products/product-detail --flat
|
||||
ng generate component messages
|
||||
# Create a new service.
|
||||
ng generate service hero
|
||||
ng generate service message
|
||||
ng g s services/todo-list
|
||||
# Create an interface
|
||||
ng g i interfaces/todo-item
|
||||
# Create a new module, putting it into AppModule.
|
||||
ng g m products/product --flat -m app
|
||||
```
|
||||
|
||||
## Build the project
|
||||
```bash
|
||||
# Puts in dist/ by default.
|
||||
ng build
|
||||
```
|
||||
|
||||
## Run unit tests
|
||||
By default uses [Karma](https://karma-runner.github.io/)/[Jasmine](https://jasmine.github.io/).
|
||||
|
||||
```bash
|
||||
ng test
|
||||
```
|
||||
|
||||
## Add an in-memory web API
|
||||
For mocking up a backend.
|
||||
|
||||
|
||||
```bash
|
||||
npm install angular-in-memory-web-api --save
|
||||
```
|
||||
|
||||
```bash
|
||||
# Generate a module in src/app (flat) and register it in AppModule imports (module=app)
|
||||
ng generate module app-routing --flat --module=app
|
||||
ng generate component dashboard
|
||||
# In-memory Web API
|
||||
npm install angular-in-memory-web-api --save
|
||||
ng generate service InMemoryData
|
||||
ng generate component hero-search
|
||||
```
|
||||
Information has been migrated to [Angular Framework Notes](https://strivinglife.gitlab.io/book-angular/).
|
||||
|
|
Loading…
Reference in New Issue