Adequate Infosoft
Now, we add a class model with shared folder with the following command.
ng g class shared/customer --type=model
Add property to the customer.model.ts
Add Services and Components
Services
Now, add service which will communicate with Web API inside shared folder.
ng g s shared/customer
Components
Now, add customer-details components
ng g c customer-details
Now, add customer-form components
ng g c customer-form
Note:
g - generate
c - component
s - service
Add Bootstrap
Now, go to https://getbootstrap.com/docs/4.0/getting-started/introduction/ and copy the plugin of java script and CSS in index.html
Register the created module
Now, we open app.module.ts to register services and module. In app.module, we have all the components has been auto added. But, we need to add service so we can use them in our angular app. Also we need to add HTTP module.
Adding services and components code:-
service
Now, run the project using the following command
"ng serve -o" or "ng serve --open"