Skip to content

Commit e24cd09

Browse files
committed
feat: update crud application readme
1 parent fd76915 commit e24cd09

File tree

17 files changed

+36
-42
lines changed

17 files changed

+36
-42
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This goal of this project is to help you get better at Angular and NgRx buy reso
2424
<a href="./apps/projection/README.md"><img src="https://img.shields.io/badge/1-Projection-red" alt="Projection"/></a>
2525
<a href="./apps/ngfor-enhancement/README.md"><img src="https://img.shields.io/badge/3-Directive enhancement-orange" alt="Directive enhancement"/></a>
2626
<a href="./apps/context-outlet-type/README.md"><img src="https://img.shields.io/badge/4-ContextOutlet Typed-red" alt="Directive enhancement"/></a>
27-
<a href="./apps/http/README.md"><img src="https://img.shields.io/badge/5-Http-green" alt="http"/></a>
27+
<a href="./apps/http/README.md"><img src="https://img.shields.io/badge/5-CRUD-green" alt="crud application"/></a>
2828

2929
</br>
3030
<img src="https://img.shields.io/badge/NgRx--gray" alt="NgRx"/>
File renamed without changes.
File renamed without changes.

apps/http/README.md renamed to apps/crud/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<h1>HttpClient</h1>
1+
<h1>CRUD application with local store</h1>
22

33
> Author: Thomas Laforge
44
55
## Information
66

7-
Http request is the heart of any application. You will need to master those following best practises to build strong and reliable Angular Application.
7+
Communicating and having a global/local state in sync with your backend is the heart of any application. You will need to master those following best practises to build strong and reliable Angular Application.
88

99
## Statement
1010

@@ -17,7 +17,7 @@ Currently we have a working exemple but filled with lots of bad practices.
1717
What you will need to do:
1818

1919
- Avoid **any** as a type. Using Interface to leverage Typescript type system prevent errors
20-
- Use a **separate service** for all your http calls and use a **BehaviourSubject** for your todoList
20+
- Use a **separate service** for all your crud calls and use a **BehaviourSubject** for your todoList
2121
- Use **AsyncPipe** to suscribe to your todo list. _(Let you handle subscription, unsuscription and refresh of the page when data has changed)_, avoir manual subscribe when it's not needed
2222
- Don't **mutate** data
2323

@@ -36,7 +36,7 @@ this.todos = [
3636

3737
### Step 2: Improve
3838

39-
- Add a **Delete** button: _<a href="https://jsonplaceholder.typicode.com/" target="_blank">Doc of fake API</a>_
39+
- Add a **Delete** button: _<a href="cruds://jsonplaceholder.typicode.com/" target="_blank">Doc of fake API</a>_
4040
- Handle **errors** correctly. _(Globaly)_
4141
- Add a Global **loading** indicator. _You can use MatProgressSpinnerModule_
4242

@@ -54,11 +54,11 @@ this.todos = [
5454
1. Fork the project
5555
2. clone it
5656
3. npm install
57-
4. **nx serve http**
57+
4. **nx serve crud**
5858
5. _...work On it_
5959
6. Commit your work
6060
7. Submit a PR with a title beginning with **Answer:3** that I will review and other dev can review.
6161

62-
<a href="https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A5+label%3Aanswer" target="_blank"><img src="https://img.shields.io/badge/-Solutions-green" alt="Http"/></a>
62+
<a href="cruds://github.com/tomalaforge/angular-challenges/pulls?q=label%3A5+label%3Aanswer" target="_blank"><img src="cruds://img.shields.io/badge/-Solutions-green" alt="Http"/></a>
6363

64-
_You can ask any question on_ <a href="https://twitter.com/laforge_toma" target="_blank"><img src="./../../logo/twitter.svg" height=20px alt="Twitter"/></a>
64+
_You can ask any question on_ <a href="cruds://twitter.com/laforge_toma" target="_blank"><img src="./../../logo/twitter.svg" height=20px alt="Twitter"/></a>

apps/http/project.json renamed to apps/crud/project.json

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
11
{
2-
"name": "http",
2+
"name": "crud",
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"projectType": "application",
5-
"sourceRoot": "apps/http/src",
5+
"sourceRoot": "apps/crud/src",
66
"prefix": "app",
77
"targets": {
88
"build": {
99
"executor": "@angular-devkit/build-angular:browser",
10-
"outputs": [
11-
"{options.outputPath}"
12-
],
10+
"outputs": ["{options.outputPath}"],
1311
"options": {
14-
"outputPath": "dist/apps/http",
15-
"index": "apps/http/src/index.html",
16-
"main": "apps/http/src/main.ts",
17-
"polyfills": "apps/http/src/polyfills.ts",
18-
"tsConfig": "apps/http/tsconfig.app.json",
12+
"outputPath": "dist/apps/crud",
13+
"index": "apps/crud/src/index.html",
14+
"main": "apps/crud/src/main.ts",
15+
"polyfills": "apps/crud/src/polyfills.ts",
16+
"tsConfig": "apps/crud/tsconfig.app.json",
1917
"inlineStyleLanguage": "scss",
20-
"assets": [
21-
"apps/http/src/favicon.ico",
22-
"apps/http/src/assets"
23-
],
18+
"assets": ["apps/crud/src/favicon.ico", "apps/crud/src/assets"],
2419
"styles": [
2520
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
26-
"apps/http/src/styles.scss"
21+
"apps/crud/src/styles.scss"
2722
],
2823
"scripts": [],
29-
"allowedCommonJsDependencies": [
30-
"seedrandom"
31-
]
24+
"allowedCommonJsDependencies": ["seedrandom"]
3225
},
3326
"configurations": {
3427
"production": {
@@ -46,8 +39,8 @@
4639
],
4740
"fileReplacements": [
4841
{
49-
"replace": "apps/http/src/environments/environment.ts",
50-
"with": "apps/http/src/environments/environment.prod.ts"
42+
"replace": "apps/crud/src/environments/environment.ts",
43+
"with": "apps/crud/src/environments/environment.prod.ts"
5144
}
5245
],
5346
"outputHashing": "all"
@@ -67,27 +60,24 @@
6760
"executor": "@angular-devkit/build-angular:dev-server",
6861
"configurations": {
6962
"production": {
70-
"browserTarget": "http:build:production"
63+
"browserTarget": "crud:build:production"
7164
},
7265
"development": {
73-
"browserTarget": "http:build:development"
66+
"browserTarget": "crud:build:development"
7467
}
7568
},
7669
"defaultConfiguration": "development"
7770
},
7871
"extract-i18n": {
7972
"executor": "@angular-devkit/build-angular:extract-i18n",
8073
"options": {
81-
"browserTarget": "http:build"
74+
"browserTarget": "crud:build"
8275
}
8376
},
8477
"lint": {
8578
"executor": "@nrwl/linter:eslint",
8679
"options": {
87-
"lintFilePatterns": [
88-
"apps/http/**/*.ts",
89-
"apps/http/**/*.html"
90-
]
80+
"lintFilePatterns": ["apps/crud/**/*.ts", "apps/crud/**/*.html"]
9181
}
9282
}
9383
},
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)