This project is trying to realize most of the functions of Angular : ) Check point 4.0 Click here
npm install
to install all dependenciesnpm run json
to inititate the Json Server, after successful, open localhost: 3500
should see the datang serve
to start the App, after successful, open localhost:4200
should see the Interface of the appName - Admin
, and Password - secret
checkout.component.html
getFormValidationMessages()
and getValidationMessages()
inside checkout.component.tscheckoutReactive.component.html
, checkoutReactive.component.ts
reacitveForm.model.ts
- this has all the limitations inside, basically the above two methods inside checkout.component.ts (getFormValidationMessages() and getValidationMessages())are moved to here, and will be used inside the checkoutReactive.component.ts and checkoutReactive.component.htmllimit.formvalidator.ts
- this has self-defined limitations, only needs to be imported to reacitveForm.model.ts.http
, are all observable
|getProductor
,getProducts
,saveProduct
,updateProduct
,deleteProduct
,saveOrder
,getOrders
,deleteOrder
,updateOrder
authenticate
function, is observable
, sends back whether response success or not-----------
-----------
-----------
authenticate
which uses method inside rest.datasource.ts
, implement is inside auth.component.ts
, therefore actually auth.component.ts
could use method authenticate
directly from rest.datasource.ts
iterative structure directive
, like *ngFor, but built by authorcanActivate
, canActivateChild
,canDeactivate
,canLoad
canActivate
. When customer on pages other than '/store', e.g. '/cart', and refresh the page, then will automatically redirect to '/store'.authMiddleware.js
authenticate
which use the methods inside auth.service.ts
to show whether Authentication Failed, or For Data Invalid or navigate to the correct path
data.js
and user interfacehttp
, are all observable
|getProductor
,getProducts
,saveProduct
,updateProduct
,deleteProduct
,saveOrder
,getOrders
,deleteOrder
,updateOrder
authenticate
function, is observable
, sends back whether response success or notThis app has been push to the Github Pages, but due to the Json Server could only run locally, therefore complete functions related to the rest data could not be seen on the Github Pages.
Therefore this part is to display all the functions when using rest data.