Simple Angular 8 App

Rayen Rejeb
1 min readOct 29, 2019

--

Using Angular/CLI

The code for this project is available on Github.

For a live demo, check Stackblitz.

We’re going to create a simple app for products management.
We will start by creating our application and 3 components using the angular/cli with these commands :

ng new products-management --routing
cd products-managemen/src/app
ng g c product-add
ng g c product-get
ng g c product-edit

and a products service for the HTTP calls :

ng g s products

g : generate, c : component, m : module, s : service

Then, we add their definitions files:

  1. product-add : to add a new product
product-add.component.html
product-add.component.ts

2. product-get : to display the list of the products

product-get.component.html
product-get.component.ts

3. product-edit : to update a product

product-edit.component.html
product-edit.component.ts

along with a product model

Product.ts

and a single service for all the HTTP calls

Next, we define the routing module for the Home module :

products.service

Wohoo ! Now we have an angular application and a microservice waiting for calls ! 😁

Link this application with a Grizzly Microservice

Read this article to implement a codeless Microservice for this application using Grizzly-API.

--

--