<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1477003560702602309</id><updated>2024-12-18T19:17:01.296-08:00</updated><category term="Spring boot"/><category term="Angular"/><category term="Ionic"/><category term="Thymeleaf"/><title type='text'>programming-with-drmas</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-5847808175416135962</id><published>2022-01-18T06:07:00.009-08:00</published><updated>2023-05-20T12:47:10.650-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Spring boot"/><title type='text'>Crud Customer Application Spring boot and Angular Part 1</title><content type='html'>&lt;h1 style=&quot;background: rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Spring Boot&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://nsa40.casimages.com/img/2020/12/13/201213102500779081.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;406&quot; data-original-width=&quot;800&quot; src=&quot;https://nsa40.casimages.com/img/2020/12/13/201213102500779081.png&quot; style=&quot;border: 1px solid;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/wYZm12YLYLw&quot; width=&quot;720&quot; youtube-src-id=&quot;wYZm12YLYLw&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;hr /&gt;

&lt;script async src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7401879888732563&quot;
     crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:block; text-align:center;&quot;
     data-ad-layout=&quot;in-article&quot;
     data-ad-format=&quot;fluid&quot;
     data-ad-client=&quot;ca-pub-7401879888732563&quot;
     data-ad-slot=&quot;9846849366&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;

&lt;h1&gt; Crud Customer Application Spring boot and Angular &lt;/h1&gt;
&lt;p&gt;In this tutorial, we are going to develop a CRUD (create-read-update-delete) web application. This application contains the student form that includes the CRUD features like add, view, delete, and update student. In this integration, we are using Spring Boot to handle the backend part and Angular to handle the frontend part.&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;Tools to be used&lt;/h2&gt;
&lt;p&gt; ° Use any IDE to develop the Spring and Hibernate project. It may be STS/Eclipse/Netbeans. Here, we are using STS (Spring Tool Suite). &lt;/p&gt;
&lt;p&gt; ° MySQL for the database.&lt;/p&gt;
&lt;p&gt; ° Use any IDE to develop the Angular project. It may be Visual Studio Code/Sublime. Here, we are using Visual Studio Code.&lt;/p&gt;
&lt;p&gt; ° Server: Apache Tomcat/JBoss/Glassfish/Weblogic/Websphere.&lt;/p&gt;

&lt;br /&gt;&lt;h2 style=&quot;background: rgb(255, 140, 0); color: white; margin-bottom: 0px; padding: 10px;&quot;&gt;Spring MVC&lt;/h2&gt;
&lt;p&gt;Spring MVC is the primary web framework built on the Servlet API. It is build on the popular MVC design pattern. MVC (Model-View-Controller) is a software architecture pattern, which separates application into three areas: model, view, and controller. The model represents a Java object carrying data. The view represents the visualization of the data that the model contains. The controller controls the data flow into model object and updates the view when the data changes. It separates the view and model.&lt;/p&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #fb4834;&quot;&gt;Spring Boot Architecture&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://nsa40.casimages.com/img/2020/12/13/201213012918561214.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;519&quot; src=&quot;https://nsa40.casimages.com/img/2020/12/13/201213012918561214.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Spring Boot is a module of the Spring Framework. It is used to create stand-alone, production-grade Spring Based Applications with minimum efforts. It is developed on top of the core Spring Framework.&lt;/p&gt;&lt;hr /&gt;

&lt;h3 style=&quot;background: cornflowerblue; color: white; margin-bottom: 0px; padding: 10px;&quot;&gt;pom.xml&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: darkcyan;&quot;&gt;
  
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPom&quot; onclick=&quot;copyPom(selectPom)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectPom&quot;&gt;
 &amp;lt;?xml &lt;span style=&quot;color: purple;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;UTF-8&quot;&lt;/span&gt;?&amp;gt;
 &amp;lt;project &lt;span style=&quot;color: purple;&quot;&gt;xmlns&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xmlns:xsi&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xsi:schemaLocation&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&lt;/span&gt;&amp;gt;
  &amp;lt;modelVersion&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;4.0.0&lt;/span&gt;&amp;gt;/modelVersion&amp;gt;
   &amp;lt;parent&amp;gt;
   &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
   &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-parent&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;2.4.1&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;relativePath/&amp;gt; 
  &amp;lt;/parent&amp;gt;
    
    &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;com.curd-customer&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;curd-customer&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;0.0.1-SNAPSHOT&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;name&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;curd-customer&lt;/span&gt;&amp;lt;/name&amp;gt;
	&amp;lt;description&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;Demo project for Spring Boot&lt;/span&gt;&amp;lt;/description&amp;gt;
    
    &amp;lt;properties&amp;gt;
	 &amp;lt;java.version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;1.8&lt;/span&gt;&amp;lt;/java.version&amp;gt;
    &amp;lt;/properties&amp;gt;
    
    &amp;lt;dependencies&amp;gt;
     &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-data-jpa&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
    
      &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-web&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
      &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql-connector-java&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;runtime&lt;/span&gt;&amp;lt;/scope&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
     &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-test&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;test&lt;/span&gt;&amp;lt;/scope&amp;gt;
   &amp;lt;/dependency&amp;gt;
  &amp;lt;/dependencies&amp;gt;
  
  &amp;lt;build&amp;gt;
    &amp;lt;plugins&amp;gt;
	 &amp;lt;plugin&amp;gt;
		&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
		&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-maven-plugin&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	 &amp;lt;/plugin&amp;gt;
	&amp;lt;/plugins&amp;gt;
 &amp;lt;/build&amp;gt;
 
 &amp;lt;/project&amp;gt;
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;


&lt;h2 style=&quot;color: #c0392b;&quot;&gt;Properties File&lt;/h2&gt;
&lt;p&gt;Properties files are used to keep ‘N’ number of properties in a single file to run the application in a different environment. In Spring Boot, properties are kept in the application.properties file under the classpath.&lt;/p&gt;
&lt;p&gt;The application.properties file is located in the src/main/resources directory. The code for sample application.properties&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;span style=&quot;color: black;&quot;&gt; We need to create database name it gestion-stock&lt;/span&gt;&lt;/p&gt;
&lt;h3 style=&quot;background: cornflowerblue; color: white; margin-bottom: 0px; padding: 10px;&quot;&gt;src/main/resources/application.properties&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: black;&quot;&gt;
  
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnProperties&quot; onclick=&quot;copyProperties(selectProperties)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProperties&quot;&gt;
&lt;span&gt;spring.datasource.url=&lt;span style=&quot;color: darkcyan;&quot;&gt;jdbc:mysql://localhost:3306/&lt;span style=&quot;background: orange; color: white;&quot;&gt;crud-customer&lt;/span&gt;?useUnicode=true&amp;amp;useJDBCCompliantTimezoneShift=true&amp;amp;useLegacyDatetimeCode=false&amp;amp;serverTimezone=UTC&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.datasource.username=&lt;span style=&quot;color: darkcyan;&quot;&gt;root&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.activemq.password=&lt;/span&gt;
&lt;span&gt;spring.datasource.driver-class-name=&lt;span style=&quot;color: darkcyan;&quot;&gt;com.mysql.jdbc.Driver&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.properties.hibernate.dialect=&lt;span style=&quot;color: darkcyan;&quot;&gt;org.hibernate.dialect.MySQL5Dialect&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.hibernate.ddl-auto=&lt;span style=&quot;color: darkcyan;&quot;&gt;create-drop&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;server.port=&lt;span style=&quot;color: darkcyan;&quot;&gt;8080&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2&gt;Class Diagram &lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://nsa40.casimages.com/img/2020/12/13/201213014225687153.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;157&quot; data-original-width=&quot;521&quot; src=&quot;https://nsa40.casimages.com/img/2020/12/13/201213014225687153.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2&gt;
&lt;/h2&gt;

&lt;h2&gt;First We Will Create a package model inside it We will add Customer Class &lt;/h2&gt;
&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;-&amp;gt; Customer.java &lt;/p&gt;
&lt;h3 style=&quot;background: cornflowerblue; color: white; margin-bottom: -15px; padding: 10px;&quot;&gt;src/main/java/com/curdcustomer/model/Customer.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnCustomer&quot; onclick=&quot;copyCustomer(selectCustomer)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCustomer&quot;&gt;
&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.curdcustomer.model;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.GeneratedValue;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.GenerationType;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Id;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Customer {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id&lt;/span&gt;
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Long &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;firstname&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;lastname&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;age&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;boolean&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;active&lt;/span&gt;;
    
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Customer() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
  }
    
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Customer(String &lt;span style=&quot;color: sienna;&quot;&gt;firstname&lt;/span&gt;, String &lt;span style=&quot;color: sienna;&quot;&gt;lastname&lt;/span&gt;, &lt;b style=&quot;color: sienna;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: sienna;&quot;&gt;age&lt;/span&gt;, &lt;b style=&quot;color: sienna;&quot;&gt;boolean&lt;/b&gt; &lt;span style=&quot;color: sienna;&quot;&gt;active&lt;/span&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
  &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;firstname&lt;/span&gt; = &lt;span style=&quot;color: sienna;&quot;&gt;firstname&lt;/span&gt;
  &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;lastname&lt;/span&gt; = &lt;span style=&quot;color: sienna;&quot;&gt;lastname&lt;/span&gt;
  &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;age&lt;/span&gt; = &lt;span style=&quot;color: sienna;&quot;&gt;age&lt;/span&gt;
  &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;active&lt;/span&gt; = &lt;span style=&quot;color: sienna;&quot;&gt;active&lt;/span&gt;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public Long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(Long &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getFirstname() {
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;firstname&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setFirstname(String &lt;span style=&quot;color: sienna;&quot;&gt;firstname&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;firstname&lt;/span&gt; = &lt;span style=&quot;color: sienna;&quot;&gt;firstname&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getLastname() {
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;lastname&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setLastname(String &lt;span style=&quot;color: sienna;&quot;&gt;lastname&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;lastname&lt;/span&gt; = &lt;span style=&quot;color: sienna;&quot;&gt;lastname&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; getAge() {
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;age&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setAge(int &lt;span style=&quot;color: sienna;&quot;&gt;age&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;age&lt;/span&gt; = &lt;span style=&quot;color: sienna;&quot;&gt;age&lt;/span&gt;;
 }
 &lt;b style=&quot;color: purple;&quot;&gt;public boolean&lt;/b&gt; isActive() {
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;active&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setActive(boolean &lt;span style=&quot;color: sienna;&quot;&gt;active&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;active&lt;/span&gt; = &lt;span style=&quot;color: sienna;&quot;&gt;active&lt;/span&gt;;
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating the DAO interface to perform database related operations.&lt;/p&gt;
&lt;h3 style=&quot;background: cornflowerblue; color: white; margin-bottom: -15px; padding: 10px;&quot;&gt;src/main/java/com/curdcustomer/repository/CustomerRepository.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnCustomerRepository&quot; onclick=&quot;copyCustomerRepository(selectCustomerRepository)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCustomerRepository&quot;&gt;
&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.curdcustomer.repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.curdcustomer.model.Customer;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; CustomerRepository &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Customer, Long&amp;gt; {
	List&amp;lt;Customer&amp;gt; findByAge(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: sienna;&quot;&gt;age&lt;/span&gt;);
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating a service layer interface that acts as a bridge between DAO and Entity classes.&lt;/p&gt;
&lt;h3 style=&quot;background: cornflowerblue; color: white; margin-bottom: -15px; padding: 10px;&quot;&gt;src/main/java/com/curdcustomer/service/CustomerService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnCustomerService&quot; onclick=&quot;copyCustomerService(selectCustomerService)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCustomerService&quot;&gt;
&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.curdcustomer.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Optional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.http.ResponseEntity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.curdcustomer.model.Customer;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; CustomerService {
 Customer create(Customer customer);
	
 ResponseEntity&amp;lt;Customer&amp;gt; update(Customer &lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;Long&lt;/b&gt; &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
	
 ResponseEntity&amp;lt;Customer&amp;gt; isActive(Customer &lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;Long&lt;/b&gt; &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
	
 ResponseEntity&amp;lt;Customer&amp;gt; inActive(Customer &lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;Long&lt;/b&gt; &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;Customer&amp;gt; getAllCustomers();
	
 ResponseEntity&amp;lt;String&amp;gt; deleteAllCustomers();
	
 ResponseEntity&amp;lt;String&amp;gt;  deleteCustomer(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
	
 Optional&amp;lt;Customer&amp;gt; findById(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;Customer&amp;gt; findByAge(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: sienna;&quot;&gt;age&lt;/span&gt;);
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Create the service layer implementation class&lt;/p&gt;
&lt;h3 style=&quot;background: cornflowerblue; color: white; margin-bottom: -15px; padding: 10px;&quot;&gt;src/main/java/com/impl/service/CustomerServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnCustomerServiceImpl&quot; onclick=&quot;copyCustomerServiceImpl(selectCustomerServiceImpl)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCustomerServiceImpl&quot;&gt;
&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.curdcustomer.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Comparator;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Optional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.stream.Collectors;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.transaction.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.http.HttpStatus;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.http.ResponseEntity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.curdcustomer.model.Customer;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.curdcustomer.repository.CustomerRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.curdcustomer.service.CustomerService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Component&lt;/span&gt;
&lt;span style=&quot;color: #8a8787;&quot;&gt;@Transactional&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CustomerServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; CustomerService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CustomerRepository &lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Customer create(Customer &lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;) {
 &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;.save(&lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;);
 }
    
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; ResponseEntity&amp;lt;Customer&amp;gt; update(Customer &lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;, Long &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;) {
  Optional&amp;lt;Customer&amp;gt; customerDataOptional = &lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;.findById(&lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
  &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (customerDataOptional.isPresent()) {
    Customer &lt;span style=&quot;color: sienna;&quot;&gt;_Customer&lt;/span&gt; = customerDataOptional.get();
    &lt;span style=&quot;color: sienna;&quot;&gt;_Customer&lt;/span&gt;.setFirstname(customer.getFirstname());
    &lt;span style=&quot;color: sienna;&quot;&gt;_Customer&lt;/span&gt;.setLastname(customer.getLastname());
    &lt;span style=&quot;color: sienna;&quot;&gt;_Customer&lt;/span&gt;.setAge(customer.getAge());
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ResponseEntity&amp;lt;Customer&amp;gt;(&lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;.save(&lt;span style=&quot;color: sienna;&quot;&gt;_Customer&lt;/span&gt;), HttpStatus.&lt;b style=&quot;color: blue;&quot;&gt;OK&lt;/b&gt;);
 } &lt;b style=&quot;color: purple;&quot;&gt;else&lt;/b&gt; {
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ResponseEntity&amp;lt;Customer&amp;gt;(HttpStatus.&lt;b style=&quot;color: blue;&quot;&gt;NOT_FOUND&lt;/b&gt;);
	}
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Customer&amp;gt; getAllCustomers() {
   List&amp;lt;Customer&amp;gt; &lt;span style=&quot;color: sienna;&quot;&gt;customers&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;.findAll();
   &lt;span style=&quot;color: sienna;&quot;&gt;customers&lt;/span&gt; = &lt;span style=&quot;color: sienna;&quot;&gt;customers&lt;/span&gt;.stream().sorted(Comparator.comparing(Customer::getAge))
				.collect(Collectors.toList());
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; customers;
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; ResponseEntity&amp;lt;String&amp;gt; deleteAllCustomers() {
   &lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;.deleteAll();
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ResponseEntity&amp;lt;String&amp;gt;(&quot;All customer have been deleted!&quot;, HttpStatus.OK);
}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; ResponseEntity&amp;lt;String&amp;gt; deleteCustomer(long &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;.deleteById(id);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ResponseEntity&amp;lt;String&amp;gt;(&quot;Customer has been deleted!&quot;, HttpStatus.OK);
}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Optional&amp;lt;Customer&amp;gt; findById(long &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;) {
    Optional&amp;lt;Customer&amp;gt; &lt;span style=&quot;color: sienna;&quot;&gt;customers&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;.findById(&lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: sienna;&quot;&gt;customers&lt;/span&gt;;
}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Customer&amp;gt; findByAge(int &lt;span style=&quot;color: sienna;&quot;&gt;age&lt;/span&gt;) {
    List&amp;lt;Customer&amp;gt; customers = &lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;..findByAge(&lt;span style=&quot;color: sienna;&quot;&gt;age&lt;/span&gt;);
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; customers;
}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; ResponseEntity&amp;lt;Customer&amp;gt; isActive(Customer &lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;, Long &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;) {
    Optional&amp;lt;Customer&amp;gt; customerDataOptional = &lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;.findById(&lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
    &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (customerDataOptional.isPresent()) {
    Customer _Customer = customerDataOptional.get();
    _Customer.setActive(true);
    &lt;b style=&quot;color: purple;&quot;&gt;return new&lt;/b&gt; ResponseEntity&amp;lt;Customer&amp;gt;(&lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;..save(_Customer), HttpStatus.&lt;b style=&quot;color: blue;&quot;&gt;OK&lt;/b&gt;);
} else {
    &lt;b style=&quot;color: purple;&quot;&gt;return new&lt;/b&gt; ResponseEntity&amp;lt;Customer&amp;gt;(HttpStatus.&lt;b style=&quot;color: blue;&quot;&gt;NOT_FOUND&lt;/b&gt;);
 }
}
    
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; ResponseEntity&amp;lt;Customer&amp;gt; inActive(Customer &lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;, Long &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;) {
    Optional&amp;lt;Customer&amp;gt; customerDataOptional = &lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;.findById(&lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
    &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (customerDataOptional.isPresent()) {
    Customer _Customer = customerDataOptional.get();
    _Customer.setActive(false);
    &lt;b style=&quot;color: purple;&quot;&gt;return new&lt;/b&gt; ResponseEntity&amp;lt;Customer&amp;gt;(&lt;span style=&quot;color: blue;&quot;&gt;customerRepository&lt;/span&gt;.save(_Customer), HttpStatus.&lt;b style=&quot;color: blue;&quot;&gt;OK&lt;/b&gt;);
} &lt;b style=&quot;color: purple;&quot;&gt;else&lt;/b&gt; {
   &lt;b style=&quot;color: purple;&quot;&gt;return new&lt;/b&gt; ResponseEntity&amp;lt;Customer&amp;gt;(HttpStatus.&lt;b style=&quot;color: blue;&quot;&gt;NOT_FOUND&lt;/b&gt;);
  }
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Create the controller class&lt;/p&gt;
&lt;h3 style=&quot;background: cornflowerblue; color: white; margin-bottom: -15px; padding: 10px;&quot;&gt;src/main/java/com/curdcustomer/controller/CustomerController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnCustomerController&quot; onclick=&quot;copyCustomerController(selectCustomerController)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCustomerController&quot;&gt;
&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.curdcustomer.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Optional;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.http.ResponseEntity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.curdcustomer.model.Customer;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.curdcustomer.service.CustomerService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: blue;&quot;&gt;&quot;http://localhost:4200&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController&lt;/span&gt;
&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestMapping&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CustomerController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
  &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CustomerService &lt;span style=&quot;color: blue;&quot;&gt;customerService&lt;/span&gt;;
  
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(value=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;/customers/create&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Customer create(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Customer &lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;customerService&lt;/span&gt;.create(&lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(value=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;/customers/getAllCustomers&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt;  List&amp;lt;Customer&amp;gt; getAllCustomers(){
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;customerService&lt;/span&gt;.getAllCustomers();
 }
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(value=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;/customers/update/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt;  ResponseEntity&amp;lt;Customer&amp;gt; update(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Customer &lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt;(&quot;id&quot;) Long &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;){
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;customerService&lt;/span&gt;.update(&lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;, &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(value=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;/customers/deleteAllCustomers&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; ResponseEntity@lt;String&amp;gt; deleteAllCustomers() {
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;customerService&lt;/span&gt;.deleteAllCustomers();
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(value=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;/customers/delete/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; ResponseEntity&amp;lt;String&amp;gt;  deleteCustomer(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt;(&quot;id&quot;) long &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;){
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;customerService&lt;/span&gt;.deleteCustomer(&lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(value=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;customers/id/{id}&quot;&lt;/span&gt;)
 Optional&amp;lt;Customer&amp;gt; findById(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; long &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;customerService&lt;/span&gt;.findById(&lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(value=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;customers/age/{age}&quot;&lt;/span&gt;)
 public List&amp;lt;Customer&amp;gt; findByAge(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; int &lt;span style=&quot;color: sienna;&quot;&gt;age&lt;/span&gt;){
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;customerService&lt;/span&gt;.findByAge(&lt;span style=&quot;color: sienna;&quot;&gt;age&lt;/span&gt;);
 }
    
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(value=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;/customers/isActive/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; ResponseEntity&amp;lt;Customer&amp;gt; isActive(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Customer customer, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; Long &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;customerService&lt;/span&gt;.isActive(&lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;, &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
 }
    
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(value=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;/customers/inActive/{id}&quot;&lt;/span&gt;)
 ResponseEntity&amp;lt;Customer&amp;gt; inActive(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Customer &lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; Long &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;customerService&lt;/span&gt;.inActive(&lt;span style=&quot;color: sienna;&quot;&gt;customer&lt;/span&gt;, &lt;span style=&quot;color: sienna;&quot;&gt;id&lt;/span&gt;);
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h3 style=&quot;background: cornflowerblue; color: white; margin-bottom: -15px; padding: 10px;&quot;&gt;src/main/java/com/curdcustomer/CurdCustomerApplication.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnCurdCustomerApplication&quot; onclick=&quot;copyCurdCustomerApplication(selectCurdCustomerApplication)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCurdCustomerApplication&quot;&gt;
&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.curdcustomer;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.boot.SpringApplication;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.boot.autoconfigure.SpringBootApplication;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@SpringBootApplication&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CurdCustomerApplication {

 &lt;b style=&quot;color: purple;&quot;&gt;public static void&lt;/b&gt; main(String[] &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;) {
  SpringApplication.run(CurdCustomerApplication.&lt;b style=&quot;color: purple;&quot;&gt;class&lt;/b&gt;, &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;);
  System.&lt;b style=&quot;color: blue;&quot;&gt;out&lt;/b&gt;.print(&lt;span style=&quot;color: blue;&quot;&gt;&quot;App started...&quot;&lt;/span&gt;);
  }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Spring Boot CRUD example when building a CRUD App.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp;amp; Spring Data JPA, as well, we are gooing to continue with Angular 10 project structure for building a front-end app to make HTTP requests and consume responses.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;

&lt;div style=&quot;background: rgb(255, 118, 0); border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a style=&quot;color: #222f3e;&quot; href=&quot;http://programming-with-drmas.blogspot.com/2022/01/quiz-project-with-spring-boot-angular.html&quot;&gt;Crud Customer Application Spring boot and Angular Part 2&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: rgb(255, 255, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/crud-customer&quot; style=&quot;color: #0abde3;&quot; target=&quot;_blank&quot;&gt; Download Gestion Stock project From Github &lt;/a&gt; 
&lt;/div&gt;

&lt;script&gt;
function copyPom(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPom&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
}
  function copyProperties(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProperties&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
}
  function copyCustomer(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCustomer&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
}
  function copyCustomerRepository(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCustomerRepository&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
}
  function copyCustomerService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCustomerService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
}
  function copyCustomerServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCustomerServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
}
  function copyCustomerController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCustomerController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
}
  function copyCurdCustomerApplication(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCurdCustomerApplication&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
}
 
&lt;/script&gt;

&lt;style&gt;
pre:before {
   content: none;
}
pre {
background: #ddd;
line-height: 20px;
position: relative;
overflow: auto;
width: 100%;
border: 1px solid #d0c6c6;
  margin-top:16px;
}
  
code {
 padding: 0px 0px 0 20px;
 display: block; 
 color: #000; 
 font-family: monospace; 
 font-size: 16px;
 margin-top: -30px;
}
  
 pre div::selection,
 b::selection,
 code::selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
pre div::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
}
&lt;/style&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/5847808175416135962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/crud-customer-application-spring-boot_48.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/5847808175416135962'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/5847808175416135962'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/crud-customer-application-spring-boot_48.html' title='Crud Customer Application Spring boot and Angular Part 1'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/wYZm12YLYLw/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-9066895523922743150</id><published>2022-01-18T03:46:00.007-08:00</published><updated>2022-08-26T08:49:50.688-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><title type='text'>Building gestion school with Spring boot &amp; Angular Pt 4</title><content type='html'>&lt;h1 style=&quot;background: rgb(255, 118, 0) none repeat scroll 0% 0%; border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Angular&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://i.postimg.cc/50ZY7YMB/Screenshot-2021-06-13-at-22-13-46.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;452&quot; data-original-width=&quot;800&quot; src=&quot;https://i.postimg.cc/50ZY7YMB/Screenshot-2021-06-13-at-22-13-46.png&quot; style=&quot;border: 1px solid;&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/r2F4_kj371A&quot; width=&quot;720&quot; youtube-src-id=&quot;r2F4_kj371A&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;
In this part We will continue to complete school project
&lt;/p&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Activity Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;find Activity component&lt;/b&gt; we can display informarion of Activity with Update and Delete &lt;/p&gt;

&lt;p&gt;src/app/find-activity-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindActivityTs&quot; onclick=&quot;copyFindActivityTs(selectFindActivityTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindActivityTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Activity &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ActivityService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/activity.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddActivityComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-activity/add-activity.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ActivatedRoute, Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;find-activity&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-activity.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-activity.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FindActivityComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt;: Activity = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Activity;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idActivity&lt;/span&gt;: number;
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt; (&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; activityService: ActivityService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog,
    &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; router: Router) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt; (
      params =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idActivity&lt;/span&gt; = this.route.snapshot.params.&lt;span style=&quot;color: #3498db;&quot;&gt;idActivity&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;activityService&lt;/span&gt; .&lt;span style=&quot;color: #d577e6;&quot;&gt;findActivity&lt;/span&gt; (this.&lt;span style=&quot;color: #3498db;&quot;&gt;idActivity&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt; (activity =&amp;gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt;;
        })
      }
    )
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt; (): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt;  {}
  
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteActivity&lt;/span&gt; (idActivity: number) {
      &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt; &#39;Are you sure&#39;&lt;/span&gt; )) {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;activityService&lt;/span&gt; .&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteActivity&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;idActivity&lt;/span&gt; ).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt; (() =&amp;gt; {
         window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt; .&lt;span style=&quot;color: #d577e6;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt; `/find-school/ ${this.route.parent.snapshot.params.idSchool} /find-activities`&lt;/span&gt; )
        })
      }
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;updateActivity&lt;/span&gt;(idActivity: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddActivityComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt; : {idActivity},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt; : &lt;span style=&quot;color: #98e6ff;&quot;&gt; &#39;600px&#39;&lt;/span&gt; ,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt; : &lt;span style=&quot;color: #98e6ff;&quot;&gt; &#39;400px&#39;&lt;/span&gt; ,
    });
  }
}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/find-activity-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindActivityHtml&quot; onclick=&quot;copyFindActivityHtml(selectFindActivityHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindActivityHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;example-card&quot;&amp;gt;
  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;{{activity.type}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;{{activity.createdAt|date}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;activity!=null&quot;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt; &amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt; &amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt; &amp;gt; &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;strong&lt;/span&gt;&amp;gt;{{activity.day}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;strong&lt;/span&gt;&amp;gt; &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt; &amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt; &amp;gt;Date: {{activity.date|date: &#39;dd/MM/yyyy&#39;}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt; &amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 180px !important;&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt; &amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt; &amp;gt;Start: {{activity.startDate}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt; &amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 180px !important;&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt; &amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt; &amp;gt;End: {{activity.endDate}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt; &amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 180px !important;&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt; &amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;padding: 10px; color: #333; background: #f5f6fa;&quot;&amp;gt;
        {{activity.description}}
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;accent&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteActivity&lt;/span&gt;((activity.id)&quot; &amp;gt;Delete activity&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;updateActivity&lt;/span&gt;(activity.id)&quot;&amp;gt;Update activity&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;  

   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Subject Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;find Subject component&lt;/b&gt; we can display informarion of Subject with Update and Delete, We can also add a new Program &lt;/p&gt;

&lt;p&gt;find-subject.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindSubjectTs&quot; onclick=&quot;copyFindSubjectTs(selectFindSubjectTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindSubjectTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Subject &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;SubjectService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/subject.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddSubjectComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-subject/add-subject.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ActivatedRoute, Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddProgramComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-program/add-program.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddCoefficientComponent&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-coefficient/add-coefficient.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-home&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./home.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./home.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FindSubjectComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt; : Subject = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt;  Subject;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idSubject&lt;/span&gt; : number;
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt; (&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; subjectService: SubjectService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;route&lt;/span&gt;.params.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(
      params =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSubject&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idSubject&lt;/span&gt; ;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSubject&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSubject&lt;/span&gt; ).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(subject =&amp;gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;
        })
      }
    )
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteSubject&lt;/span&gt;(idSubject: number) {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectService&lt;/span&gt;.deleteSubject(idSubject).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&amp;gt; {
       window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;`/find-school/ ${this.route.parent.snapshot.params.idSchool} /find-subjects`&lt;/span&gt;)
      })
    }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;updateSubject&lt;/span&gt;(idSubject: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddSubjectComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idSubject},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;620px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addProgram&lt;/span&gt;(idSubject: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddProgramComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idSubject},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;320px&#39;&lt;/span&gt;,
     &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;find-subject.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindSubjectHtml&quot; onclick=&quot;copyFindSubjectHtml(selectFindSubjectHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindSubjectHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt; [&lt;span style=&quot;color: #3498db;&quot;&gt;style.background-color&lt;/span&gt;]=&quot;subject.color&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;padding-top: 10px; border-radius: 5px; margin-bottom: 10px;&quot;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Subject: {{subject.name}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;Created at: {{subject.createdAt|date}} &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;padding: 10px; color: #333; background: #f5f6fa;&quot;&amp;gt;
          {{subject.description}}
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;accent&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteSubject&lt;/span&gt;(subject.id)&quot; &amp;gt;Delete subject&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;updateSubject&lt;/span&gt;(subject.id)&quot;&amp;gt;Update subject&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addProgram&lt;/span&gt;(subject.id)&quot;&amp;gt;Add a new program&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add Program Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Add Program component&lt;/b&gt; we can add a new Program &lt;/p&gt;
&lt;p&gt;src/app/add-program-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddProgramTs&quot; onclick=&quot;copyAddProgramTs(selectAddProgramTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddProgramTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Program &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ProgramService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/program.service&#39;&lt;/span&gt;;



@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-program&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-program.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-program.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddProgramComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = false;
  &lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt;: Program = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Program;
  
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; programService: ProgramService, @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idProgram&lt;/span&gt;!=null) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;programService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findProgram&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idProgram&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(program =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt;;
      })
    }
  }

&lt;span style=&quot;color: #d577e6;&quot;&gt;addProgram&lt;/span&gt;() {
  this.&lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idProgram&lt;/span&gt;!=null) {
   this.&lt;span style=&quot;color: #3498db;&quot;&gt;programService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;editProgram&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idProgram&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(program =&amp;gt; {
     this.&lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt;;
     window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
   })
  } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt; {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;programService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addProgram&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSubject&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(program =&amp;gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt;;
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
    })
  }
}
}

   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/add-program-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddProgramHtml&quot; onclick=&quot;copyAddProgramHtml(selectAddProgramHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddProgramHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&amp;gt;
  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Add a new program&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;Name&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;type&lt;/span&gt;=&quot;text&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;matInput placeholder&lt;/span&gt;=&quot;name&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;name&quot;
                 [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;program.name&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#name&lt;/span&gt;=&quot;ngModel&quot; required&amp;gt;
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt; &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;

        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;Enter description&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;textarea&lt;/span&gt; matInput placeholder=&quot;Description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;description&quot; [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;program.description&quot;
            &lt;span style=&quot;color: #3498db;&quot;&gt;#description&lt;/span&gt;=&quot;ngModel&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;textarea&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;

        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot;
          [disabled]=&quot;name.invalid || description.invalid&quot;
          (click)=&quot;addProgram()&quot; style=&quot;width: 10em !important&quot;&amp;gt;Save&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt;&amp;gt; 
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Program Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Find Program component&lt;/b&gt; we can display information of Program and add a new Coefficien&lt;/p&gt;

&lt;p&gt;src/app/find-program-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindProgramTs&quot; onclick=&quot;copyFindProgramTs(selectFindProgramTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindProgramTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Program &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ProgramService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/program.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddCoefficientComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-coefficient/add-coefficient.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ActivatedRoute, Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddProgramComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-program/add-program.component&#39;&lt;/span&gt;;


@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-find-program&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-program.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-program.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FindProgramComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

 &lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt;: Program = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Program;
 &lt;span style=&quot;color: #3498db;&quot;&gt;idProgram&lt;/span&gt;: number;
 
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; programService: ProgramService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog) {
    this.route.params.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(
      params =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idProgram&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idProgram&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;programService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findProgram&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idProgram&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(program =&amp;gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;program&lt;/span&gt;;
        })
      }
    )
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {}
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;updateProgram&lt;/span&gt;(idProgram: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddProgramComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idProgram},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;320px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteProgram&lt;/span&gt;(idProgram: number) {
    if(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;programService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteProgram&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;idProgram&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&amp;gt; {
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;`/find-school/ ${this.route.parent.snapshot.params.idSchool} /find-subjects`&lt;/span&gt;)
      })
    }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addCoefficient&lt;/span&gt;(idProgram: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddCoefficientComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idProgram},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;320px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/find-program-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindProgramHtml&quot; onclick=&quot;copyFindProgramHtml(selectFindProgramHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindProgramHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Program: {{program.name}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;Created at: {{program.createdAt|date}} &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;padding: 10px; color: #333; background: #f5f6fa;&quot;&amp;gt;
          {{program.description}}
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;accent&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteProgram&lt;/span&gt;(program.id)&quot; &amp;gt;Delete program&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;updateProgram&lt;/span&gt;(program.id)&quot;&amp;gt;Update program&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addCoefficient&lt;/span&gt;(program.id)&quot;&amp;gt;Add a new coefficient&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add Coefficien Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Add Coefficien component&lt;/b&gt; we can add a new Coefficien&lt;/p&gt;

&lt;p&gt;src/app/add-coefficien-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddCoefficienTs&quot; onclick=&quot;copyAddCoefficienTs(selectAddCoefficienTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddCoefficienTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Coefficient &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;CoefficientService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/coefficient.service&#39;&lt;/span&gt;;



@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-coefficient&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-coefficient.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-coefficient.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddCoefficientComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = false;
  &lt;span style=&quot;color: #3498db;&quot;&gt;coefficient&lt;/span&gt;: Coefficient = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Coefficient;
  
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; coefficientService: CoefficientService, @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.data.idCoefficient!=null) {
     this.coefficientService.findCoefficient(this.data.idCoefficient).subscribe(coefficient =&amp;gt; {
     this.&lt;span style=&quot;color: #3498db;&quot;&gt;coefficient&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;coefficient&lt;/span&gt;;
   })
    }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addCoefficient&lt;/span&gt;() {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idCoefficient&lt;/span&gt;!=null) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;coefficientService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;editCoefficient&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;coefficient&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idCoefficient&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(coefficient =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;coefficient&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;coefficient&lt;/span&gt;;
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
      })
    } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;coefficientService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addCoefficient&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;coefficient&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idProgram&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(coefficient =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;coefficient&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;coefficient&lt;/span&gt;;
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
      })
    }
  }
}
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/add-coefficien-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddCoefficienHtml&quot; onclick=&quot;copyAddCoefficienHtml(selectAddCoefficienHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddCoefficienHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Add a new coefficient&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;Grade&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;type&lt;/span&gt;=&quot;number&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;matInput placeholder&lt;/span&gt;=&quot;grade&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;grade&quot;
                   [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;coefficient.grade&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#grade&lt;/span&gt;=&quot;ngModel&quot; required&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt; &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;Enter description&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;textarea&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;matInput placeholder&lt;/span&gt;=&quot;Description&quot; name=&quot;description&quot; [(ngModel)]=&quot;coefficient.description&quot;
              #description=&quot;ngModel&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;textarea&lt;/span&gt;&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot;
            [&lt;span style=&quot;color: #3498db;&quot;&gt;disabled&lt;/span&gt;]=&quot;grade.invalid || description.invalid&quot;
            (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addCoefficient&lt;/span&gt;()&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 10em !important&quot;&amp;gt;Save&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Coefficien Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Find Coefficien component&lt;/b&gt; we can display information of Coefficien and update/delete&lt;/p&gt;

&lt;p&gt;src/app/find-coefficien-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindCoefficienTs&quot; onclick=&quot;copyFindCoefficienTs(selectFindCoefficienTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindCoefficienTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Coefficient &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;CoefficientService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/coefficient.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddCoefficientComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-coefficient/add-coefficient.component&#39;&lt;/span&gt;;


@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-find-coefficient&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-coefficient.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-coefficient.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FindCoefficientComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;coefficien&lt;/span&gt;: Coefficient = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Coefficient;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idCoefficient&lt;/span&gt;: number;
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; coefficientService: CoefficientService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(
      params =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idCoefficient&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idCoefficient&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;coefficientService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findCoefficient&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idCoefficient&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(coefficien =&amp;gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;coefficien&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;coefficien&lt;/span&gt;;
        })
      }
    )
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteCoefficien&lt;/span&gt;(idCoefficient: number) {
   &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
     this.&lt;span style=&quot;color: #3498db;&quot;&gt;coefficientService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteCoefficient&lt;/span&gt;(idCoefficient).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&amp;gt; {
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;`/find-school/ ${this.route.parent.snapshot.params.idSchool} /find-subjects`&lt;/span&gt;)
     })
   }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;updateCoefficien&lt;/span&gt;(idCoefficient: number) {
    this.dialog.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddCoefficientComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idCoefficient},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;320px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/find-coefficien-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindCoefficienHtml&quot; onclick=&quot;copyFindCoefficienHtml(selectFindCoefficienHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindCoefficienHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Coefficien grade: {{coefficien.grade}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;Created at: {{coefficien.createdAt|date}} &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;padding: 10px; color: #333; background: #f5f6fa;&quot;&amp;gt;
          {{coefficien.description}}
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;accent&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteCoefficien&lt;/span&gt;(coefficien.id)&quot; &amp;gt;Delete coefficien&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;updateCoefficien&lt;/span&gt;(coefficien.id)&quot;&amp;gt;Update coefficien&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Exam Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Find Exam component&lt;/b&gt; we can display information of Exam and update/delete We need elso add a new note for exam&lt;/p&gt;

&lt;p&gt;src/app/find-exam-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindExamTs&quot; onclick=&quot;copyFindExamTs(selectFindExamTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindExamTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Exam, Subject &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ExamService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/exam.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddExamComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-exam/add-exam.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ActivatedRoute, Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;SubjectService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/subject.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddNoteComponent&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-note/add-note.component&#39;&lt;/span&gt;;


@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-find-exam&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-exam.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-exam.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FindExamComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

 &lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt;: Exam = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Exam;
 &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;: Subject = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Subject;
 &lt;span style=&quot;color: #3498db;&quot;&gt;idExam&lt;/span&gt;: number;

 &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; examService: ExamService,
    &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; subjectService: SubjectService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(
      params =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idExam&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idExam&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;examService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findExam&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idExam&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(exam =&amp;gt; {
           this.&lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt;;
           this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSubjectForExam&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idExam&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(subject =&amp;gt; {
             this.&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;;
           })
         })
      }
    )
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {

  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteExam&lt;/span&gt;(idExam: number, idSubject) {
   &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
     this.&lt;span style=&quot;color: #3498db;&quot;&gt;examService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteExam&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;idExam&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;idSubject&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&amp;gt; {
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;`/find-school/ ${this.route.parent.snapshot.params.idSchool} /find-exams`&lt;/span&gt;)
     })
   }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;updateExam&lt;/span&gt;(idExam: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddExamComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idExam},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;480px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addNote&lt;/span&gt;(idExam: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddNoteComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idExam},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;300px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/find-exam-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindExamHtml&quot; onclick=&quot;copyFindExamHtml(selectFindExamHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindExamHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;example-card&quot;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Exam of &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;strong&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;color: #4CAF50; text-decoration: underline;&quot;&amp;gt;{{subject?.name}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;strong&lt;/span&gt;&amp;gt; subject&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;{{exam.createdAt|date}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;&amp;gt;Date: {{exam.date|date: &#39;dd/MM/yyyy&#39;}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 180px !important;&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;&amp;gt;Start: {{exam.start}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 180px !important;&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;&amp;gt;End: {{exam.end}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 180px !important;&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;padding: 10px; color: #333; background: #f5f6fa;&quot;&amp;gt;
          {{exam.description}}
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;accent&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteExam&lt;/span&gt;(exam.id, subject.id)&quot; &amp;gt;Delete exam&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;updateExam&lt;/span&gt;(exam.id)&quot;&amp;gt;Update exam&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addNote&lt;/span&gt;(exam.id)&quot;&amp;gt;Add note&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;


&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add Note Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Add Note component&lt;/b&gt; we can add a new Note and update/delete&lt;/p&gt;

&lt;p&gt;src/app/add-note-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddNoteTs&quot; onclick=&quot;copyAddNoteTs(selectAddNoteTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddNoteTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Note &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;NoteService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/note.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ActivatedRoute, Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;


@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-note&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-note.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-note.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddNoteComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = false;
  &lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt;: Note = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Note;
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; noteService: NoteService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute,
    @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idNote&lt;/span&gt;) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;noteService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findNote&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idNote&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(note =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt;;
      })
    }
  }
&lt;span style=&quot;color: #d577e6;&quot;&gt;addNote&lt;/span&gt;() {
  this.&lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idNote&lt;/span&gt;) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;noteService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;editNote&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idNote&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(note =&amp;gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt;;
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
    })
  } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt; {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;noteService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addNote&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idExam&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(note =&amp;gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt;;
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
    })
  }
}
}
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/add-note-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddNoteHtml&quot; onclick=&quot;copyAddNoteHtml(selectAddNoteHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddNoteHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Add a new note&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;Score&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;type&lt;/span&gt;=&quot;number&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;matInput placeholder&lt;/span&gt;=&quot;score&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;score&quot;
                   [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;note.score&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#score&lt;/span&gt;=&quot;ngModel&quot; required&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt; &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;Enter description&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;textarea&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;matInput placeholder&lt;/span&gt;=&quot;Description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;description&quot; [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;note.description&quot;
              &lt;span style=&quot;color: #3498db;&quot;&gt;#description&lt;/span&gt;=&quot;ngModel&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;textarea&lt;/span&gt;&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot;
            [disabled]=&quot;score.invalid || description.invalid&quot;
            (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addNote&lt;/span&gt;()&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 10em !important&quot;&amp;gt;Save&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Note Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Find Note component&lt;/b&gt; we can display inofrmation of Note and update/delete&lt;/p&gt;

&lt;p&gt;src/app/find-note-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindNoteTs&quot; onclick=&quot;copyFindNoteTs(selectFindNoteTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindNoteTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Note &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;NoteService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/note.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddNoteComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-note/add-note.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ActivatedRoute, Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;


@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-find-note&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-note.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-note.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FindNoteComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt;: Note = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Note;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idNote&lt;/span&gt;: number;
  
 &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; noteService: NoteService,  &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog) {
    this.route.params.subscribe(
      params =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idNote&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idNote&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;noteService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findNote&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idNote&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(note =&amp;gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;note&lt;/span&gt;;
        })
      }
    )
  }

 &lt;span style=&quot;color: #d577e6;&quot;&gt; ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteNote&lt;/span&gt;(idNote: number) {
   &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
     this.&lt;span style=&quot;color: #3498db;&quot;&gt;noteService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteNote&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;idNote&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&amp;gt; {
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;`/find-school/ ${this.route.parent.snapshot.params.idSchool} /find-exams`&lt;/span&gt;)
     })
   }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;updateNote&lt;/span&gt;(idNote: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddNoteComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idNote},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &#39;300px&#39;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &#39;400px&#39;,
    });
  }
}

   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/find-note-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindNoteHtml&quot; onclick=&quot;copyFindNoteHtml(selectFindNoteHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindNoteHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Note score:
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&quot;color: #27ae60&quot;&amp;gt;
        {{note.score}}
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;Created at: {{note.createdAt|date}} &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;padding: 10px; color: #333; background: #f5f6fa;&quot;&amp;gt;
          {{note.description}}
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;accent&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteNote&lt;/span&gt;(note.id)&quot; &amp;gt;Delete note&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;updateNote&lt;/span&gt;(note.id)&quot;&amp;gt;Update note&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Room Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Find Room component&lt;/b&gt; we can display inofrmation of Room and update/delete We can elso add a new level of exists levels &lt;/p&gt;

&lt;p&gt;src/app/find-room-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindRoomTs&quot; onclick=&quot;copyFindRoomTs(selectFindRoomTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindRoomTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Level, Room &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;RoomService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/room.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddRoomComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-room/add-room.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddLevelToRoomComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-level-to-room/add-level-to-room.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;LevelService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/level.service&#39;&lt;/span&gt;;


@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-find-room&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-room.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-room.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FindRoomComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;idRoom&lt;/span&gt;: number;
  &lt;span style=&quot;color: #3498db;&quot;&gt;room&lt;/span&gt;: Room = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Room;
  &lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;: Level = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Level;
  
 &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; roomService: RoomService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog,
    &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; levelService: LevelService) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(
      params =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idRoom&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idRoom&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;roomService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findRoom&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idRoom&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(room =&amp;gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;room&lt;/span&gt; = room;
          &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;!=null) {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;levelService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findLevelForRoom&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idRoom&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(level =&amp;gt; {
              this.&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;;
          })
         }
        });
      }
    );
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteRoom&lt;/span&gt;(idRoom: number) {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;roomService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteRoom&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;idRoom&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&amp;gt; {
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;`/find-school/ ${this.route.parent.snapshot.params.idSchool} /find-rooms`&lt;/span&gt;)
      })
    }
  }
 &lt;span style=&quot;color: #d577e6;&quot;&gt;updateRoom&lt;/span&gt;(idRoom: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddRoomComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: { idRoom },
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;370px&#39;&lt;/span&gt;,
     &lt;span style=&quot;color: #3498db;&quot;&gt; width&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addLevelToRoom&lt;/span&gt;(idRoom: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddLevelToRoomComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: { idRoom },
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;240px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteLevelFromRoom&lt;/span&gt;(idRoom: number, idLevel: number) {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)){
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;levelService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteLevelFromRoom&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;idRoom&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;idLevel&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((data) =&amp;gt; {
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
       })
    }

  }
}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/find-room-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindRoomHtml&quot; onclick=&quot;copyFindRoomHtml(selectFindRoomHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindRoomHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Room: {{room.code}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Capacity: {{room.capacity}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;Created at: {{room.createdAt|date}} &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;h2&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin-left: 15px;&quot;&amp;gt;Levels&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;h2&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;color: cadetblue;&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;level!=null&quot;&amp;gt;
            {{level.label}}
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;material-icons&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;color: #c0392b; margin-left: 15px; cursor: pointer;&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteLevelFromRoom&lt;/span&gt;(room.id, level.id)&quot;&amp;gt;
              close
              &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;span&lt;/span&gt;&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;color: cadetblue;&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;level==null&quot;&amp;gt; No level&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;padding: 10px; color: #333; background: #f5f6fa;&quot;&amp;gt;
          {{room.description}}
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;accent&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteRoom&lt;/span&gt;(room.id)&quot; &amp;gt;Delete room&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;updateRoom(room.id)&quot;&amp;gt;Update room&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addLevelToRoom&lt;/span&gt;(room.id)&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;level==null&quot;&amp;gt;Add level to this room &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add Level To Room Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Add Level To Room component&lt;/b&gt; we can Add Level To Room Of exists levels from schooling&lt;/p&gt;

&lt;p&gt;add-level-to-room.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddLevelToRoomTs&quot; onclick=&quot;copyAddLevelToRoomTs(selectAddLevelToRoomTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddLevelToRoomTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Level &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;LevelService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/level.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-home&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./home.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./home.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddLevelToRoomComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = false;
  &lt;span style=&quot;color: #3498db;&quot;&gt;levels&lt;/span&gt;: Level[];
  &lt;span style=&quot;color: #3498db;&quot;&gt;idLevel&lt;/span&gt;: number;
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; levelService: LevelService, @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;levelService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findLevels&lt;/span&gt;().&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;levels&lt;/span&gt; =&amp;gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;levels&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;levels&lt;/span&gt;;
    })
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;onSelecLevel&lt;/span&gt;(e) {
   this.&lt;span style=&quot;color: #3498db;&quot;&gt;idLevel&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;e.target.value&lt;/span&gt;;
   this.&lt;span style=&quot;color: #3498db;&quot;&gt;levelService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addLevelToRoom&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idRoom&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;idLevel&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&amp;gt; {
     window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
   })
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;cancel&lt;/span&gt;() {
    window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
  }
}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;add-level-to-room.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddLevelToRoomHtml&quot; onclick=&quot;copyAddLevelToRoomHtml(selectAddLevelToRoomHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddLevelToRoomHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Add a new course&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;Please choose a level&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;select&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;matNativeControl&lt;/span&gt; required (&lt;span style=&quot;color: #3498db;&quot;&gt;change&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;onSelecLevel&lt;/span&gt;($event)&quot;&amp;gt;
              &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;selected disabled&lt;/span&gt;&amp;gt;Levels&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;option&lt;/span&gt;&amp;gt;
              &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngFor&lt;/span&gt;=&quot;let s of levels&quot; [&lt;span style=&quot;color: #3498db;&quot;&gt;value&lt;/span&gt;]=&quot;s.id&quot;&amp;gt;{{s.label}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;option&lt;/span&gt;&amp;gt;
            &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;select&lt;/span&gt;&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;accent&quot;
            (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;cancel&lt;/span&gt;()&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 10em !important&quot;&amp;gt;Cancel&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Schooling Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Find Schooling component&lt;/b&gt; we can display information of schooling and update/delete, We can elso Add a new Level for each Schooling&lt;/p&gt;

&lt;p&gt;src/app/find-schooling-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindSchoolingTs&quot; onclick=&quot;copyFindSchoolingTs(selectFindSchoolingTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindSchoolingTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Schooling &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;SchoolingService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/schooling.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddSchoolingComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-schooling/add-schooling.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ActivatedRoute, Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddLevelComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-level/add-level.component&#39;&lt;/span&gt;;


@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-find-schooling&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-schooling.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-schooling.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FindSchoolingComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt;: Schooling = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Schooling;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idSchooling&lt;/span&gt;: number;
  
  
 &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; schoolingService: SchoolingService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog,
    private router: Router) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(
      params =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSchooling&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idSchooling&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolingService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSchooling&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSchooling&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt; =&amp;gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt;;
        })
      }
    )
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): void {}

  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteSchooling&lt;/span&gt;(idSchooling: number) {
   &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
     this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolingService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteSchooling&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;idSchooling&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&amp;gt; {
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;`/find-school/ ${this.route.parent.snapshot.params.idSchool} /find-schoolings`&lt;/span&gt;)
     })
   }
  }
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/find-schooling-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindSchoolingHtml&quot; onclick=&quot;copyFindSchoolingHtml(selectFindSchoolingHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindSchoolingHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;example-card&quot;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
     &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;h2&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin-left: 15px;&quot;&amp;gt;Year: {{schooling.year}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;h2&lt;/span&gt;&amp;gt;
     &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Created at: {{schooling.createdAt|date}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;padding: 10px; color: #333; background: #f5f6fa;&quot;&amp;gt;
        {{schooling.description}}
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;accent&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteSchooling&lt;/span&gt;(schooling.id)&quot; &amp;gt;Delete activity&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;updateSchooling&lt;/span&gt;(schooling.id)&quot;&amp;gt;Update activity&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addLevel&lt;/span&gt;(schooling.id)&quot;&amp;gt;Add level&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add Level Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Add Level component&lt;/b&gt; we can add a new level &lt;/p&gt;

&lt;p&gt;src/app/add-level-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddLevelTs&quot; onclick=&quot;copyAddLevelTs(selectAddLevelTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddLevelTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Level &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;LevelService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/level.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-level&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-level.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-level.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddLevelComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = false;
 &lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;: Level = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Level;

  constructor( &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; levelService: LevelService, @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idLevel&lt;/span&gt;!=null) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;levelService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findLevel&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idLevel&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt; =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;;
      })
    }
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addLevel&lt;/span&gt;() {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idLevel&lt;/span&gt;!=null) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;levelService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;editLevel&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idLevel&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt; =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;;
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
      })
    } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;levelService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addLevel&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSchooling&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt; =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;;
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
      })
    }
  }
}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/add-level-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddLevelHtml&quot; onclick=&quot;copyAddLevelHtml(selectAddLevelHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddLevelHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Add a new level&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;type&lt;/span&gt;=&quot;text&quot; matInput name=&quot;label&quot;
                   [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;level.label&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#label&lt;/span&gt;=&quot;ngModel&quot; required&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt; &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;Enter description&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;textarea&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;matInput placeholder&lt;/span&gt;=&quot;Description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;description&quot; [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;level.description&quot;
              &lt;span style=&quot;color: #3498db;&quot;&gt;#description&lt;/span&gt;=&quot;ngModel&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;textarea&lt;/span&gt;&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot;
            [&lt;span style=&quot;color: #3498db;&quot;&gt;disabled&lt;/span&gt;]=&quot;description.invalid || label.invalid&quot;
            (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addLevel&lt;/span&gt;()&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 10em !important&quot;&amp;gt;Save&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Level Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Find Level component&lt;/b&gt; we can display information of level and update/delete, We can elso add a new course &lt;/p&gt;

&lt;p&gt;src/app/find-level-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindLevelTs&quot; onclick=&quot;copyFindLevelTs(selectFindLevelTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindLevelTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Level &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;LevelService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/level.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddNoteComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-note/add-note.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ActivatedRoute, Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddLevelComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-level/add-level.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;AddCourseComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-course/add-course.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-find-level&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-level.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-level.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FindLevelComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

 &lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;: Level = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Level;
 &lt;span style=&quot;color: #3498db;&quot;&gt;idLevel&lt;/span&gt;: number;
 &lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt;: number;
 
 &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; levelService: LevelService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(
      params =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.parent.snapshot.params.idSchool&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idLevel&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idLevel&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;levelService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findLevel&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idLevel&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt; =&amp;gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;;
        })
      }
    )
   }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {}
  
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteLevel&lt;/span&gt;(idLevel: number) {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;levelService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteLevel&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;idLevel&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&amp;gt; {
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;`/find-school/ ${this.route.parent.snapshot.params.idSchool} /find-schoolings`&lt;/span&gt;)
      })
    }
  }

 &lt;span style=&quot;color: #d577e6;&quot;&gt;updateLevel&lt;/span&gt;(idLevel: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddLevelComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idLevel},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;300px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addCourse&lt;/span&gt;(idLevel: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddCourseComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idLevel},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;500px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/find-level-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindLevelHtml&quot; onclick=&quot;copyFindLevelHtml(selectFindLevelHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindLevelHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Level: {{level.label}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;Created at: {{level.createdAt|date}} &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;padding: 10px; color: #333; background: #f5f6fa;&quot;&amp;gt;
          {{level.description}}
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;accent&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteLevel&lt;/span&gt;(level.id)&quot; &amp;gt;Delete level&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;updateLevel&lt;/span&gt;(level.id)&quot;&amp;gt;Update level&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; [&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;/find-school/&#39; + idSchool + &#39;/add-course/&#39;, level.id&lt;/span&gt;]&quot;&amp;gt;Add course&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add Course Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Add Course component&lt;/b&gt; we can add a new course &lt;/p&gt;

&lt;p&gt;src/app/add-course-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddCourseTs&quot; onclick=&quot;copyAddCourseTs(selectAddCourseTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddCourseTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Course, Subject &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;CourseService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/course.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;SubjectService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/subject.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ActivatedRoute, Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;SchoolService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/school.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-course&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-course.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-course.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddCourseComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = false;
  &lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt;: Course = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Course;
  &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;: Subject = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Subject;
  &lt;span style=&quot;color: #3498db;&quot;&gt;subjects&lt;/span&gt;: Subject[];
  &lt;span style=&quot;color: #3498db;&quot;&gt;idSubject&lt;/span&gt;: number;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt;: number;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idCourse&lt;/span&gt;: number;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idLevel&lt;/span&gt;: number;
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; courseService: CourseService,
  &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; subjectService: SubjectService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;idLevel&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idLevel&lt;/span&gt;;
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;idCourse&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idCourse&lt;/span&gt;;
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.parent.snapshot.params.idSchool&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idCourse&lt;/span&gt;!=null) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;courseService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findCourse&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idCourse&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt; =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSubjectForCourse&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idCourse&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt; =&amp;gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;;
        })
      })
    }
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findAllSubjectsForSchool&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;subjects&lt;/span&gt; =&amp;gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjects&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;subjects&lt;/span&gt;;
    })
  }
  
 &lt;span style=&quot;color: #d577e6;&quot;&gt;onSelecSubject&lt;/span&gt;(e) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSubject&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;e.target.value&lt;/span&gt;;
 }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;onDateTime&lt;/span&gt;(e) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;course.date&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;e.target.value&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addCourse&lt;/span&gt;() {
   this.&lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
   &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idCourse&lt;/span&gt;!=null) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;courseService&lt;/span&gt;.editCourse(this.&lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt;, this.idCourse, this.idSubject).subscribe(&lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt; =&amp;gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt;;
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
    })
  } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt; {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;courseService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addCourse&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;idLevel&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSubject&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt; =&amp;gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt;;
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
    })
  }
  }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/add-course-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAddCourseHtml&quot; onclick=&quot;copyAddCourseHtml(selectAddCourseHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddCourseHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 40%; border: 3px solid #73AD21;&quot;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Add a new course&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;&amp;lt;br&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-progress-bar&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;Please choose a subject&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;select&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;matNativeControl&lt;/span&gt; required (&lt;span style=&quot;color: #3498db;&quot;&gt;change&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;onSelecSubject&lt;/span&gt;($event)&quot;&amp;gt;
              &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;selected disabled&lt;/span&gt;&amp;gt;Subjects&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;option&lt;/span&gt;&amp;gt;
              &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngFor&lt;/span&gt;=&quot;let s of subjects&quot; [&lt;span style=&quot;color: #3498db;&quot;&gt;value&lt;/span&gt;]=&quot;s.id&quot; [&lt;span style=&quot;color: #3498db;&quot;&gt;selected&lt;/span&gt;]=&quot;s.name==subject.name&quot;&amp;gt;{{s.name}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;option&lt;/span&gt;&amp;gt;
            &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;select&lt;/span&gt;&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;type&lt;/span&gt;=&quot;date&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;matInput name&lt;/span&gt;=&quot;date&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;min&lt;/span&gt;=&quot;minDate&quot;
                   [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;course.date&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#date&lt;/span&gt;=&quot;ngModel&quot; required (&lt;span style=&quot;color: #3498db;&quot;&gt;change&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;onDateTime&lt;/span&gt;($event)&quot;&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt; &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;START&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;type&lt;/span&gt;=&quot;time&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;matInput placeholder&lt;/span&gt;=&quot;startTime&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;startTime&quot;
                   [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;course.startDate&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#startTime&lt;/span&gt;=&quot;ngModel&quot; required&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt; &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;END&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;type&lt;/span&gt;=&quot;time&quot; matInput placeholder=&quot;endTime&quot; name=&quot;endTime&quot;
                   [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;course.endDate&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#endTime&lt;/span&gt;=&quot;ngModel&quot; required&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt; &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #98e6ff;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;Enter description&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-label&lt;/span&gt;&amp;gt;
            &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;textarea&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;matInput placeholder&lt;/span&gt;=&quot;Description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;description&quot; [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;course.description&quot;
              &lt;span style=&quot;color: #3498db;&quot;&gt;#description&lt;/span&gt;=&quot;ngModel&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;textarea&lt;/span&gt;&amp;gt;
          &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-form-field&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;br&lt;/span&gt;&amp;gt;
  
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot;
            [&lt;span style=&quot;color: #3498db;&quot;&gt;disabled&lt;/span&gt;]=&quot;description.invalid || startTime.invalid  || endTime.invalid&quot;
            (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addCourse&lt;/span&gt;()&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 10em !important&quot;&amp;gt;Save&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;form&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;div&lt;/span&gt;&amp;gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Course Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Find Course component&lt;/b&gt; we can display inofrmation of Course and update/delete &lt;/p&gt;

&lt;p&gt;src/app/find-course-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindCourseTs&quot; onclick=&quot;copyFindCourseTs(selectFindCourseTs)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindCourseTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;Course, Subject &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;CourseService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/course.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;SubjectService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/subject.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff;&quot;&gt;ActivatedRoute, Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-find-course&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-course.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff;&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-course.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FindCourseComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt;: Course = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Course;
  &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;: Subject = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Subject;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idCourse&lt;/span&gt;: number;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt;: number;
  
 &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; courseService: CourseService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog,
    &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; router: Router, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; subjectService: SubjectService) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(
      params =&amp;gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.parent.snapshot.params.idSchool&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idCourse&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idCourse&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;courseService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findCourse&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idCourse&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt; =&amp;gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;course&lt;/span&gt;;
          this.subjectService.findSubjectForCourse(this.idCourse).subscribe(&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt; =&amp;gt; {
            this.&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;;
          })
        })
      }
    )
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {}
  
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteCourse&lt;/span&gt;(idCourse: number, idSubject: number) {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;courseService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteCourse&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;idCourse&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;idSubject&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&amp;gt; {
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff;&quot;&gt;`/find-school/ ${this.route.parent.snapshot.params.idSchool} /find-schoolings`&lt;/span&gt;)
      })
    }
  }

}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/find-course-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnFindCourseHtml&quot; onclick=&quot;copyFindCourseHtml(selectFindCourseHtml)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindCourseHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;example-card&quot;&amp;gt;
    &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;Course of &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;strong&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;color: #4CAF50; text-decoration: underline;&quot;&amp;gt;{{subject.name}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;strong&lt;/span&gt;&amp;gt; subject&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-title&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;{{course.createdAt|date}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-subtitle&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-header&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;Date: {{course.date|date: &#39;dd/MM/yyyy&#39;}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 180px !important;&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;Start: {{course.startDate}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 180px !important;&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;End: {{course.endDate}}&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list-item&lt;/span&gt;
          &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 180px !important;&quot;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-divider&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-list&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;padding: 10px; color: #333; background: #f5f6fa;&quot;&amp;gt;
          {{course.description}}
        &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;p&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-content&lt;/span&gt;&amp;gt;
      &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;&amp;lt;br&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;accent&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteCourse&lt;/span&gt;(course.id, subject.id)&quot;&amp;gt;Delete course&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button color&lt;/span&gt;=&quot;primary&quot; [&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;/find-school/&#39; + idSchool + &#39;/edit-course/&#39;, course.id&lt;/span&gt;]&quot;&amp;gt;Update course&amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;button&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card-actions&lt;/span&gt;&amp;gt;
  &amp;lt;/&lt;span style=&quot;color: #c60f87;&quot;&gt;mat-card&lt;/span&gt;&amp;gt;

   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;NgModules and JavaScript modules&lt;/h2&gt;
&lt;p&gt;The NgModule system is different from and unrelated to the JavaScript (ES2015) module system for managing collections of JavaScript objects. These are complementary module systems that you can use together to write your apps.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;In JavaScript each file is a module and all objects defined in the file belong to that module. The module declares some objects to be public by marking them with the export key word. Other JavaScript modules use import statements to access public objects from other modules.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;app-module.ts&lt;/p&gt;&lt;br /&gt;

&lt;pre&gt;&lt;code&gt;
&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnAppModule&quot; onclick=&quot;copyAppModule(selectAppModule)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppModule&quot;&gt;

  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { BrowserModule } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;@angular/platform-browser&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { CUSTOM_ELEMENTS_SCHEMA, NgModule, NO_ERRORS_SCHEMA } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AppRoutingModule } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./app-routing.module&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AppComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./app.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; {  NoopAnimationsModule } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;@angular/platform-browser/animations&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { MaterialModule } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./material-module&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { HomeComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./home/home.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { HttpClientModule } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FormsModule } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;@angular/forms&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddSchoolComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-school/add-school.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindSchoolComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-school/find-school.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddManagerComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-manager/add-manager.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { DisplaySchoolComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./display-school/display-school.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddActivityComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-activity/add-activity.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindActivityComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-activity/find-activity.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindActivitiesComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-activities/find-activities.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddSchoolingComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-schooling/add-schooling.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindSchoolingsComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-schoolings/find-schoolings.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindSchoolingComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-schooling/find-schooling.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddExamComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-exam/add-exam.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddRoomComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-room/add-room.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindRoomsComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-rooms/find-rooms.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindRoomComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-room/find-room.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { ColorPickerModule } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;ngx-color-picker&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddSubjectComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-subject/add-subject.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindSubjectsComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-subjects/find-subjects.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindSubjectComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-subject/find-subject.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddProgramComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-program/add-program.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindProgramComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-program/find-program.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddCoefficientComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-coefficient/add-coefficient.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindCoefficientComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-coefficient/find-coefficient.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindExamsComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-exams/find-exams.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindExamComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-exam/find-exam.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddNoteComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-note/add-note.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindNoteComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-note/find-note.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddLevelComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-level/add-level.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindLevelComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-level/find-level.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddCourseComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-course/add-course.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindCourseComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-course/find-course.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddLevelToRoomComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./add-level-to-room/add-level-to-room.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindLevelToRoomComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./find-level-to-room/find-level-to-room.component&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { DashboardComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #98e6ff;&quot;&gt;&#39;./dashboard/dashboard.component&#39;&lt;/span&gt;;
 
 @NgModule({
  &lt;span style=&quot;color: #3498db;&quot;&gt;declarations&lt;/span&gt;: [
    AppComponent,
    HomeComponent,
    AddSchoolComponent,
    FindSchoolComponent,
    AddManagerComponent,
    DisplaySchoolComponent,
    AddActivityComponent,
    FindActivityComponent,
    FindActivitiesComponent,
    AddSchoolingComponent,
    FindSchoolingsComponent,
    FindSchoolingComponent,
    AddExamComponent,
    AddRoomComponent,
    FindRoomsComponent,
    FindRoomComponent,
    AddSubjectComponent,
    FindSubjectsComponent,
    FindSubjectComponent,
    AddProgramComponent,
    FindProgramComponent,
    AddCoefficientComponent,
    FindCoefficientComponent,
    FindExamsComponent,
    FindExamComponent,
    AddNoteComponent,
    FindNoteComponent,
    AddLevelComponent,
    FindLevelComponent,
    AddCourseComponent,
    FindCourseComponent,
    AddLevelToRoomComponent,
    FindLevelToRoomComponent,
    DashboardComponent
  ],
  &lt;span style=&quot;color: #3498db;&quot;&gt;imports&lt;/span&gt;: [
    BrowserModule,
    HttpClientModule,
    FormsModule,
    NoopAnimationsModule,
    MaterialModule,
    AppRoutingModule,
    ColorPickerModule
  ],
  &lt;span style=&quot;color: #3498db;&quot;&gt;providers&lt;/span&gt;: [],
  &lt;span style=&quot;color: #3498db;&quot;&gt;bootstrap&lt;/span&gt;: [AppComponent],
  &lt;span style=&quot;color: #3498db;&quot;&gt;schemas&lt;/span&gt;: [ CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA ]
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export class&lt;/span&gt; AppModule { }

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Angular 10 + Spring Boot CRUD example when building a CRUD App.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp;amp; Spring Data JPA, as well as Angular 10 project structure for building a front-end app to make HTTP requests and consume responses.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;

&lt;div style=&quot;background: #fff; border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring.html&quot;&gt;Building application School with Spring boot and Angular Part 1&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: rgb(0, 137, 255) none repeat scroll 0% 0%; border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/school-angular&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download This Application My School From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;

&lt;br /&gt;
&lt;style&gt; 
 pre:before {
   content: none;
  }
  pre {
   background-color: #1e1e1f;
   border-radius: 7px;
   line-height: 20px; 
   position: relative;
   overflow: auto;
   width: 100%;
  }
  
  code {
  color: #000;
  font-size: 13px;
  background-color: #1e1e1f;
  padding: 3px 10px 20px;
  }
 div::-moz-selection,
 b::-moz-selection,
 strong::-moz-selection,
 code::-moz-selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
div::selection,
strong::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
&lt;/style&gt;

&lt;script async=&quot;&quot; data-ad-client=&quot;ca-pub-7401879888732563&quot; src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
  function copyFindActivityTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindActivityTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindActivityHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindActivityHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindSubjectTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindSubjectTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindSubjectHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindSubjectHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddProgramTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddProgramTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddProgramHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddProgramHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindProgramTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindProgramTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindProgramHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindProgramHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddCoefficienTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddCoefficienTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddCoefficienHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddCoefficienHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindCoefficienTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindCoefficienTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindCoefficienHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindCoefficienHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindExamTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindExamTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindExamHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindExamHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddNoteTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddNoteTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddNoteHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddNoteHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindNoteTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindNoteTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindNoteHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindNoteHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindRoomTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindRoomTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindRoomHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindRoomHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddLevelToRoomTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddLevelToRoomTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddLevelToRoomHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddLevelToRoomHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindSchoolingTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindSchoolingTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindSchoolingHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindSchoolingHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddLevelTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddLevelTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddLevelHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddLevelHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyFindLevelTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindLevelTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyFindLevelHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindLevelHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyAddCourseTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddCourseTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyAddCourseHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddCourseHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyFindCourseTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindCourseTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyFindCourseHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindCourseHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyAppModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}

&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/9066895523922743150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-gestion-school-with-spring_54.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/9066895523922743150'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/9066895523922743150'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-gestion-school-with-spring_54.html' title='Building gestion school with Spring boot &amp; Angular Pt 4'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/r2F4_kj371A/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-8712239664979157551</id><published>2022-01-18T03:45:00.018-08:00</published><updated>2023-05-20T12:11:46.161-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><title type='text'>Building management school with Spring boot &amp; Angular Pt 3</title><content type='html'>&lt;h1 style=&quot;background: rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Angular&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://i.postimg.cc/zfKkFrhP/Screenshot-2021-06-13-at-22-13-23.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;452&quot; data-original-width=&quot;800&quot; src=&quot;https://i.postimg.cc/zfKkFrhP/Screenshot-2021-06-13-at-22-13-23.png&quot; style=&quot;border: 1px solid;&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;r2F4_kj371A&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/r2F4_kj371A&quot;&gt;&lt;/iframe&gt;

&lt;h2&gt;Angular 10 Front-end&lt;/h2&gt;
&lt;p&gt;
In this tutorial We will build an application School To display the database Add, update or delete.
&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt; Technology &lt;/h2&gt;
&lt;div style=&quot;margin-left: 20px;&quot;&gt;
&lt;p&gt;Angular 10&lt;/p&gt;
&lt;p&gt;Angular HTTPClient&lt;/p&gt;
&lt;p&gt;Angular Router&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;

&lt;h2&gt;Angular CLI version (10.1.1)&lt;/h2&gt;
&lt;h2&gt;ng new&lt;/h2&gt;
&lt;p&gt;The Angular CLI makes it easy to create an application that already works, right out of the box. It already follows our best practices!&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;ng generate&lt;/h2&gt;
&lt;p&gt;Generate components, routes, services and pipes with a simple command. The CLI will also create simple test shells for all of these.&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;ng serve&lt;/h2&gt;
&lt;p&gt;Easily test your app locally while developing.&lt;/p&gt;&lt;br /&gt;

&lt;pre style=&quot;color: #ecf0f1; font-weigth: bold; background: #444&quot;&gt;&lt;code style=&quot;color: #ecf0f1; font-weigth: bold; background: #444&quot;&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;npm install -g @angular/cli&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng new school&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;cd school&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng serve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #fb4834;&quot;&gt;Project Structure&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://i.postimg.cc/wjTvkcmK/Screenshot-2021-06-13-at-22-14-24.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;519&quot; src=&quot;https://i.postimg.cc/wjTvkcmK/Screenshot-2021-06-13-at-22-14-24.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Font Awesome&lt;/h2&gt;
&lt;p&gt;Font Awesome is a font and icon toolkit based on CSS and Less. It was made by Dave Gandy for use with Bootstrap, and later was incorporated into the BootstrapCDN. Font Awesome has a 38% market share among those websites that use third-party font scripts on their platform, ranking it second place after Google Fonts.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Add this link in index.html to use Font Awesome&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAwesome(selectAwesome)&quot; id=&quot;idBtnAwesome&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAwesome&quot;&gt;

&lt;span style=&quot;color: #ecf0f1; font-weigth: bold;&quot;&gt; &amp;lt;&lt;span style=&quot;color: #341f97&quot;&gt;link&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;rel&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;https://use.fontawesome.com/releases/v5.2.0/css/all.css&quot;&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;integrity&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ&quot;&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;crossorigin&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;anonymous&quot;&lt;/span&gt;&gt;
&lt;/span&gt;
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2&gt;Angular Material Tutorial&lt;/h2&gt;
&lt;p&gt;The idea of this is article is to teach you how to use Angular Material through a hands-on exercise. First, you will check the dependencies that you need on your computer to use and develop with Angular Material, then you will learn how to configure and use different components.&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;Install Angular Material&lt;/h2&gt;
&lt;p&gt;&lt;b style=&quot;color: blue;&quot;&gt;Angular Material&lt;/b&gt; In addition to the install schematic, Angular Material comes with &lt;b&gt;several schematics&lt;/b&gt; (like nav, table, address-form, etc.) that can be used to easily generate pre-built components in your application.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng add @angular/material&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;MaterialModule&lt;/h2&gt;
&lt;p&gt;In earlier versions of Angular Material, we could import MaterialModule which imports all components from Angular Material and makes them available in our app. Most of the time we will need to import the most of material.&lt;/p&gt;&lt;br/&gt;

&lt;p&gt;src/app/material-module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyMaterialModule(selectMaterialModule)&quot; style=&quot;float: right; cursor: pointer;&quot; id=&quot;idBtnMaterialModule&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectMaterialModule&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;NgModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatAutocompleteModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/autocomplete&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatBadgeModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/badge&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatBottomSheetModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/bottom-sheet&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatButtonModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/button&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatButtonToggleModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/button-toggle&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatCardModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/card&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatCheckboxModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/checkbox&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatChipsModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/chips&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatStepperModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/stepper&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatDatepickerModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/datepicker&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatDialogModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatDividerModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/divider&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatExpansionModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/expansion&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatGridListModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/grid-list&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatIconModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/icon&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatInputModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/input&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatListModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/list&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatMenuModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/menu&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatNativeDateModule, MatRippleModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatPaginatorModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/paginator&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatProgressBarModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/progress-bar&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatProgressSpinnerModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/progress-spinner&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatRadioModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/radio&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSelectModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/select&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSidenavModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/sidenav&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSliderModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/slider&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSlideToggleModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/slide-toggle&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSnackBarModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/snack-bar&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSortModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/sort&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTableModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/table&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTabsModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/tabs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatToolbarModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/toolbar&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTooltipModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/tooltip&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTreeModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/tree&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #66c4e8&quot;&gt;exports&lt;/span&gt;: [&lt;span style=&quot;color: #48bdad;&quot;&gt;
    MatAutocompleteModule,
    MatBadgeModule,
    MatBottomSheetModule,
    MatButtonModule,
    MatButtonToggleModule,
    MatCardModule,
    MatCheckboxModule,
    MatChipsModule,
    MatStepperModule,
    MatDatepickerModule,
    MatDialogModule,
    MatDividerModule,
    MatExpansionModule,
    MatGridListModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatMenuModule,
    MatNativeDateModule,
    MatPaginatorModule,
    MatProgressBarModule,
    MatProgressSpinnerModule,
    MatRadioModule,
    MatRippleModule,
    MatSelectModule,
    MatSidenavModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatSnackBarModule,
    MatSortModule,
    MatTableModule,
    MatTabsModule,
    MatToolbarModule,
    MatTooltipModule,
    MatTreeModule,&lt;/span&gt;
  ],
  &lt;span style=&quot;color: #66c4e8&quot;&gt;imports&lt;/span&gt;: [&lt;span style=&quot;color: #48bdad;&quot;&gt;
    MatAutocompleteModule,
    MatBadgeModule,
    MatBottomSheetModule,
    MatButtonModule,
    MatButtonToggleModule,
    MatCardModule,
    MatCheckboxModule,
    MatChipsModule,
    MatStepperModule,
    MatDatepickerModule,
    MatDialogModule,
    MatDividerModule,
    MatExpansionModule,
    MatGridListModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatMenuModule,
    MatNativeDateModule,
    MatPaginatorModule,
    MatProgressBarModule,
    MatProgressSpinnerModule,
    MatRadioModule,
    MatRippleModule,
    MatSelectModule,
    MatSidenavModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatSnackBarModule,
    MatSortModule,
    MatTableModule,
    MatTabsModule,
    MatToolbarModule,
    MatTooltipModule,
    MatTreeModule,&lt;/span&gt;
  ]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;MaterialModule&lt;/span&gt; { }
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Modals interfaces&lt;/h2&gt;
&lt;p&gt;The purpose of this class is to map the specified fields with the fields of Spring entity class. &lt;/p&gt;&lt;br/&gt;
&lt;p&gt;Angular NgModules differ from and complement JavaScript (ES2015) modules. An NgModule declares a compilation context for a set of components that is dedicated to an application domain, a workflow, or a closely related set of capabilities. An NgModule can associate its components with related code, such as services, to form functional units.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Every Angular app has a root module, conventionally named AppModule, which provides the bootstrap mechanism that launches the application. An app typically contains many functional modules.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;src/app/modal/Modal.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyModal(selectModal)&quot; id=&quot;idBtnModal&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectModal&quot;&gt;
    
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;number&lt;/span&gt; ;
      &lt;span style=&quot;color: #341f97&quot;&gt;createdAt&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;any&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;description&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
    }
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; Activity &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;type&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;day&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;endDate&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;startDate&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;date&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
    }
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; Coefficient &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;grade&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;number&lt;/span&gt; ;
    }
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; Exam &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;date&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;start&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;end&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
    }
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; Manager &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;number&lt;/span&gt; ;
      &lt;span style=&quot;color: #341f97&quot;&gt;firstName&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;lastName&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
    }
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; Subject &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;programs&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;Program&lt;/span&gt;[];
      &lt;span style=&quot;color: #341f97&quot;&gt;coefficients&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;Coefficient&lt;/span&gt;[];
    }
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; Note &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;score&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;number&lt;/span&gt; ;
    }
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; Program &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
    }
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; Room &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;code&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;capacity&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;number&lt;/span&gt; ;
      &lt;span style=&quot;color: #341f97&quot;&gt;levels&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;Level&lt;/span&gt;[];
    }
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; School &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;city&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;department&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;open&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;close&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
    }
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; Schooling &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;year&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;number&lt;/span&gt; ;
    }
    
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; Level &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt;  {
      &lt;span style=&quot;color: #341f97&quot;&gt;label&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;courses&lt;/span&gt;: &lt;span style=&quot;color: #000&quot;&gt;Course&lt;/span&gt;[];
    }
    
    &lt;span style=&quot;color: #d577e6;&quot;&gt;export interface&lt;/span&gt; Course &lt;span style=&quot;color: #d577e6;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;PersistableElement&lt;/span&gt; {
      &lt;span style=&quot;color: #341f97&quot;&gt;date&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;endDate&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
      &lt;span style=&quot;color: #341f97&quot;&gt;startDate&lt;/span&gt;: &lt;span style=&quot;color: #000;&quot;&gt;string&lt;/span&gt;;
    }
     
    &lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Angular Services&lt;/h2&gt;
&lt;p&gt;Angular services are singleton objects that get instantiated only once during the lifetime of an application. They contain methods that maintain data throughout the life of an application, i.e. data does not get refreshed and is available all the time. The main objective of a service is to organize and share business logic, models, or data and functions with different components of an Angular application.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;An example of when to use services would be to transfer data from one controller to another custom service.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;Why Should We Use Services in Angular?
The separation of concerns is the main reason why Angular services came into existence. An Angular service is a stateless object and provides some very useful functions. These functions can be invoked from any component of Angular, like Controllers, Directives, etc. This helps in dividing the web application into small, different logical units which can be reused.&lt;/p&gt;&lt;br&gt;

&lt;h2 style=&quot;background: aliceblue; border-left: 10px solid; padding: 5px 10px;&quot;&gt;Create Data services&lt;/h2&gt;
&lt;p&gt;This service will use Angular HTTPClient to send HTTP requests.
  You can see that its functions includes CRUD operations and finder method&lt;/p&gt;&lt;br/&gt;
&lt;h2&gt;Create these services in the service package &lt;/h2&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; activity.service.ts&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; coefficient.service.ts&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; course.service.ts&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; exam.service.ts&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; level.service.ts&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; manager.service.ts&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; note.service.ts&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; program.service.ts&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; room.service.ts&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; school.service.ts&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; schooling.service.ts &lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; subject.service.ts&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; tree-application.service.ts&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;src/app/service/activity.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyActivityService(selectActivityService)&quot; id=&quot;idBtnActivityService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectActivityService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; ActivityService {
  &lt;span style=&quot;color: #fb766d;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addActivity&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addActivity&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editActivity&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editActivity&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findActivity&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findActivity&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteActivity&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteActivity&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findActivitiesForSchool&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findActivitiesForSchool&lt;/span&gt;/${id}`);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/coefficient.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyCoefficientService(selectCoefficientService)&quot; id=&quot;idBtnCoefficientService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCoefficientService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; CoefficientService {
  &lt;span style=&quot;color: #fb766d;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addCoefficient&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addCoefficient&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editCoefficient&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editCoefficient&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findCoefficient&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findCoefficient&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteCoefficient&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteCoefficient&lt;/span&gt;/${id}`);
  }

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/course.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyCourseService(selectCourseService)&quot; id=&quot;idBtnCourseService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCourseService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; CourseService {
  &lt;span style=&quot;color: #fb766d;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addCourse&lt;/span&gt;(data: any, idLevel: number, idSubject: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addCourse&lt;/span&gt;/${idLevel}/${idSubject}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editCourse&lt;/span&gt;(data: any, idCourse: number, idSubject: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editCourse&lt;/span&gt;/${idCourse}/${idSubject}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findCourse&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findCourse&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteCourse&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteCourse&lt;/span&gt;/${id}`);
  }

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/exam.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyExamService(selectExamService)&quot; id=&quot;idBtnExamService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectExamService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; ExamService {
  &lt;span style=&quot;color: #fb766d;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addExam&lt;/span&gt;(data: any, idSchool: number, idSubject: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addExam&lt;/span&gt;/${idSchool}/${idSubject}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editExam&lt;/span&gt;(data: any, idCourse: number, idSubject: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editExam&lt;/span&gt;/${idCourse}/${idSubject}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findExam&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findExam&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteExam&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteExam&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findExamsForSchool&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findExamsForSchool&lt;/span&gt;/${id}`);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/exam.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyLevelService(selectLevelService)&quot; id=&quot;idBtnLevelService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLevelService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; LevelService {
  &lt;span style=&quot;color: #fb766d;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addLevel&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addLevel&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editLevel&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editLevel&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findLevel&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findLevel&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteLevel&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteLevel&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addLevelToRoom&lt;/span&gt;(idRoom: number, idLevel: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addLevelToRoom&lt;/span&gt;/${idRoom}/${idLevel}`);
  }
    &lt;span style=&quot;color: #d577e6;&quot;&gt;findLevelForRoom&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findLevelForRoom&lt;/span&gt;/${id}`);
  }
 &lt;span style=&quot;color: #d577e6;&quot;&gt;findLevels&lt;/span&gt;(): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findLevels&lt;/span&gt;`);
  }
 &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteLevelFromRoom&lt;/span&gt;(idRoom: number, idLevel: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteLevelFromRoom&lt;/span&gt;/${idRoom}/${idLevel}`);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/manager.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyManagerService(selectManagerService)&quot; id=&quot;idBtnManagerService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectManagerService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; ManagerService {
  &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addManager&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addManager&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editManager&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editManager&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteManager&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteManager&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findManager&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findManager&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findManagerForSchool&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findManagerForSchool&lt;/span&gt;/${id}`);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/note.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyNoteService(selectNoteService)&quot; id=&quot;idBtnNoteService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNoteService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; NoteService {
  &lt;span style=&quot;color: #fb766d;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addNote(&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addNote&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editNote&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editNote&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findNote&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findNote&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteNote&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteNote&lt;/span&gt;/${id}`);
  }

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/program.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyProgramService(selectProgramService)&quot; id=&quot;idBtnProgramService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProgramService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; ProgramService {
  &lt;span style=&quot;color: #fb766d;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addProgram(&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addProgram&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editProgram&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editProgram&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findProgram&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findProgram&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteProgram&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteProgram&lt;/span&gt;/${id}`);
  }

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/room.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyRoomService(selectRoomService)&quot; id=&quot;idBtnRoomService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectRoomService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; RoomService {
  &lt;span style=&quot;color: #fb766d;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addRoom(&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addRoom&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editRoom&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editRoom&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findRoom&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findRoom&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteRoom&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteRoom&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findRoomsForSchool&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findRoomsForSchool&lt;/span&gt;/${id}`);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/school.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copySchoolService(selectSchoolService)&quot; id=&quot;idBtnSchoolService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchoolService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; SchoolService {
  &lt;span style=&quot;color: #fb766d;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addSchool(&lt;/span&gt;(data: any): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addSchool&lt;/span&gt;`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editSchool&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editSchool&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findSchool&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findSchool&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteSchool&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteSchool&lt;/span&gt;/${id}`);
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;findSchools&lt;/span&gt;(): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findSchools&lt;/span&gt;`);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/schooling.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copySchoolingService(selectSchoolingService)&quot; id=&quot;idBtnSchoolingService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchoolingService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; SchoolingService {
  &lt;span style=&quot;color: #fb766d;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addSchooling(&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addSchooling&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editSchooling&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editSchooling&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findSchooling&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findSchooling&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteSchooling&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteSchooling&lt;/span&gt;/${id}`);
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;findSchoolingsForSchool&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findSchoolingsForSchool&lt;/span&gt;/${id}`);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/subject.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copySubjectService(selectSubjectService)&quot; id=&quot;idBtnSubjectService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSubjectService&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt;  { HttpClient }  &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt;  &lt;span style=&quot;color: #3498db;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;

@Injectable({
  &lt;span style=&quot;color: #341f97&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #3498db&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; SubjectService {
  &lt;span style=&quot;color: #fb766d;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; http: HttpClient) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addSubject(&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;post&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/addSubject&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editSubject&lt;/span&gt;(data: any, id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/editSubject&lt;/span&gt;/${id}`, data);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findSubject&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findSubject&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteSubject&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;delete&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/deleteSubject&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findAllSubjectsForSchool&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findAllSubjectsForSchool&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findSubjectForExam&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findSubjectForExam&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findSubjectForCourse&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findSubjectForCourse&lt;/span&gt;/${id}`);
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;findSubjectsForSchool&lt;/span&gt;(id: number): Observable&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.http.&lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;any&gt;&lt;/span&gt;(`&lt;span style=&quot;color: #341f97&quot;&gt;http://localhost:8080/api/findSubjectsForSchool&lt;/span&gt;/${id}`);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt; Flat tree&lt;/h2&gt;
&lt;p&gt;The mat-tree provides a Material Design styled tree that can be used to display hierarchy data.&lt;br&gt;

This tree builds on the foundation of the CDK tree and uses a similar interface for its data source input and template, except that its element and attribute selectors will be prefixed with mat- instead of cdk-.&lt;br&gt;

There are two types of trees: Flat tree and nested tree. The DOM structures are different for these two types of trees.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;In a flat tree, the hierarchy is flattened; nodes are not rendered inside of each other, but instead are rendered as siblings in sequence. An instance of TreeFlattener is used to generate the flat list of items from hierarchical data. The &quot;level&quot; of each tree node is read through the getLevel method of the TreeControl; this level can be used to style the node such that it is indented to the appropriate level.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;src/app/service/tree-application.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyTreeApp(selectTreeApp)&quot; id=&quot;idBtnTreeApp&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectTreeApp&quot;&gt;

&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Injectable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt; ;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { ActivatedRoute } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt; ;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { BehaviorSubject, Observable } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;rxjs&#39;&lt;/span&gt; ;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { School } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt; ;
&lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { SchoolService } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./school.service&#39;&lt;/span&gt; ;

&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; NodeAction {
  &lt;span style=&quot;color: #3498db;&quot;&gt;linkActive&lt;/span&gt;: string;
  &lt;span style=&quot;color: #3498db;&quot;&gt;url&lt;/span&gt;: string;
  &lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt;: string;
}
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; ApplicationItemNode {
  &lt;span style=&quot;color: #3498db;&quot;&gt;children&lt;/span&gt;: ApplicationItemNode[] = [];
  &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;: string;
  &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;: number;
  &lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt;: string;
  &lt;span style=&quot;color: #3498db;&quot;&gt;actions&lt;/span&gt;: NodeAction[] = [];
  &lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt;: string;
  &lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;: any;
}
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; ApplicationItemFlatNode {
  &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;: number;
  &lt;span style=&quot;color: #3498db;&quot;&gt;item&lt;/span&gt;: string;
  &lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt;: string;
  &lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;: number;
  &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;: string;
  &lt;span style=&quot;color: #3498db;&quot;&gt;expandable&lt;/span&gt;: boolean;
  &lt;span style=&quot;color: #3498db;&quot;&gt;actions&lt;/span&gt;: NodeAction[] = [];
  &lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt;: string;
  &lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;: any;
}

@Injectable({
  &lt;span style=&quot;color: #3498db;&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #fb766d;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;class&lt;/span&gt; TreeApplicationService {
  &lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt;: any;
  &lt;span style=&quot;color: #3498db;&quot;&gt;applicationData&lt;/span&gt; = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; BehaviorSubject&amp;lt;ApplicationItemNode[]&gt;([]);
  &lt;span style=&quot;color: #3498db;&quot;&gt;applicationState&lt;/span&gt; = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; BehaviorSubject&amp;lt;School&gt;({} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; School);

  &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; schoolService: SchoolService) {
    this.&lt;span style=&quot;color: #d577e6;&quot;&gt;initialize&lt;/span&gt;();
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;initialize&lt;/span&gt;() {
   this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idSchool&lt;/span&gt;;
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;applicationState&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;buildFileTree&lt;/span&gt;(0).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;value&lt;/span&gt; =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;applicationData&lt;/span&gt;.next(&lt;span style=&quot;color: #3498db;&quot;&gt;value&lt;/span&gt;);
      });
    });
    this.&lt;span style=&quot;color: #d577e6;&quot;&gt;buildFileTree&lt;/span&gt;(0).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(value =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;applicationData&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;next&lt;/span&gt;(value);
    });
  }
  &lt;span style=&quot;color: #fb766d;&quot;&gt;get&lt;/span&gt; &lt;span style=&quot;color: #d577e6;&quot;&gt;data&lt;/span&gt;(): ApplicationItemNode[] {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; this.&lt;span style=&quot;color: #3498db;&quot;&gt;applicationData&lt;/span&gt;.value;
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;buildFileTree&lt;/span&gt;(level: number): Observable&amp;lt;ApplicationItemNode[]&gt;  {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;nodes&lt;/span&gt;: ApplicationItemNode[] = [];
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; Observable((observer) =&gt; {
      &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; this.schoolService.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSchool&lt;/span&gt;(this.idSchool).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(school =&gt; {

        &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; activityRoot = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
        activityRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Activities&#39;&lt;/span&gt;;
        activityRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;More details&#39;&lt;/span&gt;;
        activityRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-swimmer&#39;&lt;/span&gt;;
        activityRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-activities&#39;&lt;/span&gt;;
        nodes.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(activityRoot);

        &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(school.activities.length &gt; 0) {
          school.&lt;span style=&quot;color: #3498db;&quot;&gt;activities&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;((activity) =&gt; {
            &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; activityNodeRoot = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
            activityNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Activity &#39;&lt;/span&gt; + activity.type;
            activityNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Level details&#39;&lt;/span&gt;;
            activityNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-swimmer&#39;&lt;/span&gt;;
            activityNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id +  &#39;/find-activity/&#39; + activity.id&lt;/span&gt;;
            activityRoot.children.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(activityNodeRoot);
          });
        }
        &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; SubjectRoot = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
        SubjectRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Subjects&#39;&lt;/span&gt;;
        SubjectRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;More details&#39;&lt;/span&gt;;
        SubjectRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;far fa-copy&#39;&lt;/span&gt;;
        SubjectRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-subjects&#39;&lt;/span&gt;;
        nodes.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(SubjectRoot);

        &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt; (school.subjects.length &gt; 0 &amp;&amp; Array.isArray(school.subjects)) {
              school.subjects.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;((subject) =&gt; {
              &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;subjectNodeRoot&lt;/span&gt; = new ApplicationItemNode();
              subjectNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = subject.name;
              subjectNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Parent details&#39;&lt;/span&gt;;
              subjectNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;far fa-copy&#39;&lt;/span&gt;;
              subjectNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-subject/&#39; + subject.id&lt;/span&gt;;
              SubjectRoot.children.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(subjectNodeRoot);

              &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(subject.programs.length &gt; 0) {
                subject.programs.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;((program) =&gt; {
                    &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;programNodeRoot&lt;/span&gt; = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
                    programNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = program.name;
                    programNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-project-diagram&#39;&lt;/span&gt;;
                    programNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;  = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-program/&#39; + program.id&lt;/span&gt;;
                    subjectNodeRoot.children.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(programNodeRoot);

                    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(program.coefficients.length &gt; 0) {
                      program.coefficients.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;((coefficient) =&gt; {
                        const &lt;span style=&quot;color: #3498db;&quot;&gt;coefficientNodeRoot&lt;/span&gt; = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
                        coefficientNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Coefficient = (&#39; + coefficient.grade + &#39;)&#39;&lt;/span&gt;;
                        coefficientNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-not-equal&#39;&lt;/span&gt;;
                        coefficientNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;  = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-coefficient/&#39; + coefficient.id&lt;/span&gt;;
                        programNodeRoot.children.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(coefficientNodeRoot);
                      });
                    }
                  });
                }
            });
          }
          &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; examRoot = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
          examRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Exams&#39;&lt;/span&gt;;
          examRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;More details&#39;&lt;/span&gt;;
          examRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-book-open&#39;&lt;/span&gt;;
          examRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-exams&#39;&lt;/span&gt;;
          nodes.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(examRoot);

          &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(school.exams.length &gt; 0) {
            school.exams.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;((exam) =&gt; {
              &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; examNodeRoot = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
              examNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Date: &#39;&lt;/span&gt; + exam.date;
              examNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Level details&#39;&lt;/span&gt;;
              examNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-book-open&#39;&lt;/span&gt;;
              examNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-exam/&#39; + exam.id&lt;/span&gt;;
              examRoot.children.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(examNodeRoot);

              &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(exam.notes.length &gt; 0) {
                  exam.notes.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;((note, index) =&gt; {
                  &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; noteNodeRoot = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
                  const &lt;span style=&quot;color: #3498db;&quot;&gt;noteLength&lt;/span&gt; = index + 1;
                  noteNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Note &#39;&lt;/span&gt; + noteLength;
                  noteNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-book&#39;&lt;/span&gt;;
                  noteNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;  = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-note/&#39; + note.id&lt;/span&gt;;
                  examNodeRoot.children.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(noteNodeRoot);
                });
              }

            });
          }
        &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; roomRoot = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
        roomRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Rooms&#39;&lt;/span&gt;;
        roomRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;More details&#39;&lt;/span&gt;;
        roomRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-university&#39;&lt;/span&gt;;
        roomRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-rooms&#39;&lt;/span&gt;;
        nodes.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(roomRoot);

        &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(school.rooms.length &gt; 0) {
          school.rooms.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;((room) =&gt; {
            &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;roomNodeRoot&lt;/span&gt; = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
            roomNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Room &#39;&lt;/span&gt; + room.code;
            roomNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Level details&#39;&lt;/span&gt;;
            roomNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-university&#39;&lt;/span&gt;;
            roomNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-room/&#39; + room.id&lt;/span&gt;;
            roomRoot.children.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(roomNodeRoot);
          });
        }

        &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; yearRoot = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
        yearRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Schoolings&#39;&lt;/span&gt;;
        yearRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;More details&#39;&lt;/span&gt;;
        yearRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-calendar-alt&#39;&lt;/span&gt;;
        yearRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-schoolings&#39;&lt;/span&gt;;
        nodes.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(yearRoot);

        &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(school.schoolings.length &gt; 0) {
          school.schoolings.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;((schooling) =&gt; {
            &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; schoolingNodeRoot = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
            schoolingNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Year &#39; &lt;/span&gt;+ schooling.year;
            schoolingNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Year details&#39;&lt;/span&gt;;
            schoolingNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-calendar-alt&#39;&lt;/span&gt;;
            schoolingNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-schoolling/&#39; + schooling.id&lt;/span&gt;;
            yearRoot.children.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(schoolingNodeRoot);

            &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt; (schooling.levels.length &gt; 0) {
              schooling.levels.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;((level) =&gt; {
                &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; levelNodeRoot = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
                levelNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = level.label;
                levelNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;More details&#39;&lt;/span&gt;;
                levelNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-swatchbook&#39;&lt;/span&gt;;
                levelNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id + &#39;/find-level/&#39; + level.id&lt;/span&gt;;
                schoolingNodeRoot.children.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(levelNodeRoot);

                &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(level.courses.length &gt; 0) {
                  level.courses.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;((course, index) =&gt; {
                      &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; courseNodeRoot = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemNode();
                      &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; courseLength = index + 1;
                      courseNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;Course: &#39;&lt;/span&gt; + courseLength;
                      courseNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;More details&#39;&lt;/span&gt;;
                      courseNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;fas fa-atlas&#39;&lt;/span&gt;;
                      courseNodeRoot.&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;/find-school/&#39; + school.id +  &#39;/find-course/&#39; + course.id&lt;/span&gt;;
                      levelNodeRoot.children.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(courseNodeRoot);

                  });
                }
              });
            }
          });
        }

        observer.&lt;span style=&quot;color: #d577e6;&quot;&gt;next&lt;/span&gt;(nodes);
      })
    });
  }
}
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Components&lt;/h2&gt;
&lt;p&gt;The @Component decorator identifies the class immediately below it as a component class, and specifies its metadata. In the example code below, you can see that Component is just a class, with no special Angular notation or syntax at all. It&#39;s not a component until you mark it as one with the @Component decorator. &lt;/p&gt;&lt;br&gt;
&lt;p&gt;The metadata for a component tells Angular where to get the major building blocks that it needs to create and present the component and its view. In particular, it associates a template with the component, either directly with inline code, or by reference. Together, the component and its template describe a view.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;In addition to containing or pointing to the template, the @Component metadata configures, for example, how the component can be referenced in HTML and what services it requires.&lt;/p&gt;&lt;br&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;b&gt;- app.component.html &lt;/b&gt;&lt;br&gt;
&lt;/div&gt;  
&lt;p&gt;The above files were created by default when we created new project using the angular-cli command.&lt;/p&gt;

&lt;p&gt;We need to create these components&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyCreateComponents(selectCreateComponents)&quot; id=&quot;idBtnCreateComponents&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCreateComponents&quot;&gt;

    &lt;p&gt; ng generate component add-activity&lt;/p&gt;
    &lt;p&gt; ng generate component add-coefficient&lt;/p&gt;
    &lt;p&gt; ng generate component add-course&lt;/p&gt;
    &lt;p&gt; ng generate component add-exam&lt;/p&gt;
    &lt;p&gt; ng generate component add-level-to-room&lt;/p&gt;
    &lt;p&gt; ng generate component add-level&lt;/p&gt;
    &lt;p&gt; ng generate component add-manager&lt;/p&gt;
    &lt;p&gt; ng generate component add-note&lt;/p&gt;
    &lt;p&gt; ng generate component add-program&lt;/p&gt;
    &lt;p&gt; ng generate component add-room&lt;/p&gt;
    &lt;p&gt; ng generate component add-school&lt;/p&gt;
    &lt;p&gt; ng generate component add-schooling&lt;/p&gt;
    &lt;p&gt; ng generate component add-subject&lt;/p&gt;
    &lt;p&gt; ng generate component dashboard&lt;/p&gt;
    &lt;p&gt; ng generate component display-school&lt;/p&gt;
    &lt;p&gt; ng generate component find-activities&lt;/p&gt;
    &lt;p&gt; ng generate component find-activity&lt;/p&gt;
    &lt;p&gt; ng generate component find-coefficient&lt;/p&gt;
    &lt;p&gt; ng generate component find-course&lt;/p&gt;
    &lt;p&gt; ng generate component find-exam&lt;/p&gt;
    &lt;p&gt; ng generate component find-exams&lt;/p&gt;
    &lt;p&gt; ng generate component find-level-to-room&lt;/p&gt;
    &lt;p&gt; ng generate component find-level&lt;/p&gt;
    &lt;p&gt; ng generate component find-note&lt;/p&gt;
    &lt;p&gt; ng generate component find-program&lt;/p&gt;
    &lt;p&gt; ng generate component find-room&lt;/p&gt;
    &lt;p&gt; ng generate component find-rooms&lt;/p&gt;
    &lt;p&gt; ng generate component find-school&lt;/p&gt;
    &lt;p&gt; ng generate component find-schooling&lt;/p&gt;
    &lt;p&gt; ng generate component find-schoolings&lt;/p&gt;
    &lt;p&gt; ng generate component find-subject&lt;/p&gt;
    &lt;p&gt; ng generate component find-subjects&lt;/p&gt;
    &lt;p&gt; ng generate component home&lt;/p&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add the AppRoutingModule&lt;/h2&gt;
&lt;p&gt;In Angular, the best practice is to load and configure the router in a separate, top-level module that is dedicated to routing and imported by the root AppModule.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;By convention, the module class name is AppRoutingModule and it belongs in the app-routing.module.ts in the src/app folder.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;app-routing-module.ts&lt;/p&gt;

&lt;p&gt;src/app/app-routing.module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppRouting(selectAppRouting)&quot; id=&quot;idBtnAppRouting&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppRouting&quot;&gt;

    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { NgModule } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { Routes, RouterModule } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { HomeComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./home/home.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindSchoolComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-school/find-school.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { DisplaySchoolComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./display-school/display-school.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindActivityComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-activity/find-activity.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindActivitiesComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-activities/find-activities.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindSchoolingsComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-schoolings/find-schoolings.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindSchoolingComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-schooling/find-schooling.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindRoomsComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-rooms/find-rooms.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindRoomComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-room/find-room.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindSubjectsComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-subjects/find-subjects.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindSubjectComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-subject/find-subject.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindProgramComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-program/find-program.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindCoefficientComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-coefficient/find-coefficient.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindExamsComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-exams/find-exams.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindExamComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-exam/find-exam.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindNoteComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-note/find-note.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindLevelComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-level/find-level.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { AddCourseComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./add-course/add-course.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { FindCourseComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./find-course/find-course.component&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;import&lt;/span&gt; { DashboardComponent } &lt;span style=&quot;color: #fb766d;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;&#39;./dashboard/dashboard.component&#39;&lt;/span&gt;;
    
&lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; routes: Routes = [
    { &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &#39;&#39;, redirectTo: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;/home&#39;&lt;/span&gt;, pathMatch: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;full&#39;&lt;/span&gt; },
    {
      &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;home&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: HomeComponent
    },
    {
      &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-school/:idSchool&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindSchoolComponent,
      children: [
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: DashboardComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;display-school/:idSchool&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: DisplaySchoolComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-activities&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindActivitiesComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-activity/:idActivity&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindActivityComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-schoolings&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindSchoolingsComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-schoolling/:idSchooling&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindSchoolingComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-rooms&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindRoomsComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-room/:idRoom&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindRoomComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-subjects&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindSubjectsComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-subject/:idSubject&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindSubjectComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-program/:idProgram&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindProgramComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-coefficient/:idCoefficient&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindCoefficientComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-exams&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindExamsComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-exam/:idExam&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindExamComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-note/:idNote&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindNoteComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-level/:idLevel&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindLevelComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;add-course/:idLevel&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: AddCourseComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;edit-course/:idCourse&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: AddCourseComponent
        },
        {
          &lt;span style=&quot;color: #3498db;&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; &#39;find-course/:idCourse&#39;&lt;/span&gt;,
          &lt;span style=&quot;color: #3498db;&quot;&gt;component&lt;/span&gt;: FindCourseComponent
        }
      ]
    }
  ];
  
  @NgModule({
    &lt;span style=&quot;color: #3498db;&quot;&gt;imports&lt;/span&gt;: [RouterModule.&lt;span style=&quot;color: #d577e6;&quot;&gt;forRoot&lt;/span&gt;(routes)],
    &lt;span style=&quot;color: #3498db;&quot;&gt;exports&lt;/span&gt;: [RouterModule]
  })
  &lt;span style=&quot;color: #fb766d;&quot;&gt;export class&lt;/span&gt; AppRoutingModule { }
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;p&gt;src/app/app.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyApp(selectApp)&quot; id=&quot;idBtnApp&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectApp&quot;&gt;

&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;style&lt;/span&gt;&gt;
  &lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;body&lt;/span&gt; {
   &lt;span style=&quot;color: #3498db;&quot;&gt; margin&lt;/span&gt;: 0;
    &lt;span style=&quot;color: #3498db;&quot;&gt;font-family&lt;/span&gt;: Arial, Helvetica, sans-serif;
  }

  &lt;span style=&quot;color: #3498db;&quot;&gt;.topnav&lt;/span&gt; {
    &lt;span style=&quot;color: #3498db;&quot;&gt;overflow&lt;/span&gt;: hidden;
    &lt;span style=&quot;color: #3498db;&quot;&gt;background-color&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;#333&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #3498db;&quot;&gt;.topnav&lt;/span&gt; &lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt; {
    &lt;span style=&quot;color: #3498db;&quot;&gt;float&lt;/span&gt;: left;
    &lt;span style=&quot;color: #3498db;&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;#f2f2f2&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;text-align&lt;/span&gt;: center;
    &lt;span style=&quot;color: #3498db;&quot;&gt;padding&lt;/span&gt;: 14px 16px;
    &lt;span style=&quot;color: #3498db;&quot;&gt;text-decoration&lt;/span&gt;: none;
    &lt;span style=&quot;color: #3498db;&quot;&gt;font-size&lt;/span&gt;: 17px;
  }

  &lt;span style=&quot;color: #3498db;&quot;&gt;.topnav&lt;/span&gt; &lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt;:hover {
    &lt;span style=&quot;color: #3498db;&quot;&gt;background-color&lt;/span&gt;: #ddd;
    &lt;span style=&quot;color: #3498db;&quot;&gt;color&lt;/span&gt;: black;
  }

  &lt;span style=&quot;color: #3498db;&quot;&gt;.topnav&lt;/span&gt; &lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt;.active {
    &lt;span style=&quot;color: #3498db;&quot;&gt;background-color&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;#4CAF50&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;color&lt;/span&gt;: white;
  }
  &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;style&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;topnav&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;active&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;/home&quot;&lt;/span&gt;&gt;Home&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;;a&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;#news&quot;&lt;/span&gt;&gt;News&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;#contact&quot;&lt;/span&gt;&gt;Contact&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;#about&quot;&lt;/span&gt;&gt;About&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt;&gt;
&amp;gt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;router-outlet&lt;/span&gt;&gt;&amp;gt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;router-outlet&lt;/span&gt;&gt;
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/home-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyHomeTs(selectHomeTs)&quot; id=&quot;idBtnHomeTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectHomeTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;AddSchoolComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-school/add-school.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;School &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;SchoolService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/school.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #341f97&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-home&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./home.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./home.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;HomeComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;schools&lt;/span&gt;: School[];

  &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; schoolService: SchoolService) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): void {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSchools&lt;/span&gt;().&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((schools) =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;schools&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;schools&lt;/span&gt;;
    });
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addSchool&lt;/span&gt;() {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; id = &lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;;
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddSchoolComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {id},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &#39;580px&#39;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &#39;400px&#39;,
    });
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Home Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;home commnent&lt;/b&gt; we will display all school and add a new school&lt;/p&gt;
&lt;p&gt;src/app/home-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyHomeHtml(selectHomeHtml)&quot; id=&quot;idBtnHomeHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectHomeHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 30%; float:left&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;Find all schools &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;hr&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-list&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;let school of schools&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-list-item&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-icon&lt;/span&gt; mat-list-icon&gt;school&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-icon&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; mat-line &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;cursor: pointer; color: #73AD21;&quot;&lt;/span&gt; [&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;]=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;[&#39;/find-school/&#39;, school.id]&quot;&lt;/span&gt;&gt;{{school.name}}&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; mat-line &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #99a1a8;&quot;&lt;/span&gt;&gt; {{school.createdAt|date}} &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-list-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-list&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;h4&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: rgba(117, 114, 114, 0.87); margin-top: 240px; background: #f2f2f2; padding: 5px 10px;&quot;&lt;/span&gt;&gt;All copy right reserved by issamdrmas&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;h4&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
  
  &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 70%; float:right&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;margin: auto; width: 50%; border: 3px solid #73AD21; padding: 10px; margin-top: 40px;&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;Welcome to gestion school&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;hr&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;fas fa-school&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;font-size: 200px; margin-left: 130px;&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;hr&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; mat-raised-button &lt;span style=&quot;color: #3498db;&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;warn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addSchool&lt;/span&gt;()&quot;&gt;Add a new school&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Dashboard Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;dashboard commnent&lt;/b&gt; we will display the length of school, activity, subject, exam, room and schooling&lt;/p&gt;
&lt;p&gt;src/app/dashboard-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDashboardTs(selectDashboardTs)&quot; id=&quot;idBtnDashboardTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDashboardTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;SchoolService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/school.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;ActivityService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/activity.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;SubjectService&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/subject.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;ExamService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/exam.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;RoomService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/room.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;SchoolingService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/schooling.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #341f97&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-dashboard&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./dashboard.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./dashboard.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;DashboardComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt; schoolLength&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;0&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt; activityLength&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;0&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt; subjectLength&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;0&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt; examsLength&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;0&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt; roomLength&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;0&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt; schoolingLength&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;0&lt;/span&gt;;

  &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; schoolService: SchoolService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; activityService: ActivityService,
    &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; subjectService: SubjectService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; examService: ExamService,
    &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; roomService: RoomService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; schoolingService: SchoolingService) { }
    
  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; id = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.parent.snapshot.params.idSchool&lt;/span&gt;;

    this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSchools&lt;/span&gt;().&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(schools =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolLength&lt;/span&gt; = schools.&lt;span style=&quot;color: #3498db;&quot;&gt;length&lt;/span&gt;;
    })
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;activityService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findActivitiesForSchool&lt;/span&gt;(id).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(activities =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;activityLength&lt;/span&gt; = activities.&lt;span style=&quot;color: #3498db;&quot;&gt;length&lt;/span&gt;;
    })
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findAllSubjectsForSchool&lt;/span&gt;(id).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(subjects =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectLength&lt;/span&gt; = subjects.&lt;span style=&quot;color: #3498db;&quot;&gt;length&lt;/span&gt;;
    })
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;examService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findExamsForSchool&lt;/span&gt;(id).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(exams =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;examsLength&lt;/span&gt; = exams.&lt;span style=&quot;color: #3498db;&quot;&gt;length&lt;/span&gt;;
    })
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;roomService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findRoomsForSchool&lt;/span&gt;(id).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(rooms =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;roomLength&lt;/span&gt; = rooms.&lt;span style=&quot;color: #3498db;&quot;&gt;length&lt;/span&gt;;
    })
    this.schoolingService.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSchoolingsForSchool&lt;/span&gt;(id).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(schoolings =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolingLength&lt;/span&gt; = schoolings.&lt;span style=&quot;color: #3498db;&quot;&gt;length&lt;/span&gt;;
    })
  }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/dashboard-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDashboardHtml(selectDashboardHtml)&quot; id=&quot;idBtnDashboardHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDashboardHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;container&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;left&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;background-color: #9b59b6&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;schoolLength&gt;0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              {{schoolLength}}
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;schoolLength==0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              0
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;font-weight: bold&quot;&lt;/span&gt;&gt;Schools&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;margin-top: -14px;&quot;&lt;/span&gt;&gt;Total schools&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;fas fa-school&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;center&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;background-color: #3498db&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;activityLength&gt;0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              {{activityLength}}
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;activityLength==0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              0
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;font-weight: bold&quot;&lt;/span&gt;&gt;Activities&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;margin-top: -14px;&quot;&lt;/span&gt;&gt;Total activities&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;fas fa-swimmer&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;right&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;background-color: #e67e22&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;subjectLength&gt;0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              {{subjectLength}}
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;subjectLength==0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              0
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;font-weight: bold&quot;&lt;/span&gt;&gt;Subjects&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;margin-top: -14px;&quot;&lt;/span&gt;&gt;Total subjects&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;far fa-copy&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;     
  
  &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;container&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;left&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;margin-top: 20px !important;&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;background-color: #16a085&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;examsLength&gt;0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              {{examsLength}}
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;examsLength==0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              0
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;font-weight: bold&quot;&lt;/span&gt;&gt;Exams&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;margin-top: -14px;&quot;&lt;/span&gt;&gt;Total exams&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;fas fa-book-open&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;margin-top: 20px !important;&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;background-color: #c0392b&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;roomLength&gt;0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              {{roomLength}}
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;roomLength==0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              0
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;font-weight: bold&quot;&lt;/span&gt;&gt;Rooms&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;margin-top: -14px;&quot;&lt;/span&gt;&gt;Total rooms&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;far fa-hospital&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;right&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;margin-top: 20px !important;&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;background-color: #7f8c8d&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;schoolingLength&gt;0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              {{schoolingLength}}
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;schoolingLength==0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-mini-fab disabled style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #ecf0f1&quot;&lt;/span&gt;&gt;
              0
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;font-weight: bold&quot;&lt;/span&gt;&gt;Schoolings&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;margin-top: -14px;&quot;&lt;/span&gt;&gt;Total schoolings&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-divider&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;fas fa-calendar-alt&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/dashboard-component.css&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDashboardCss(selectDashboardCss)&quot; id=&quot;idBtnDashboardCss&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDashboardCss&quot;&gt;

#&lt;span style=&quot;color: #3498db;&quot;&gt;container&lt;/span&gt;
{
    &lt;span style=&quot;color: #341f97&quot;&gt;width&lt;/span&gt;:100%;
}

#&lt;span style=&quot;color: #3498db;&quot;&gt;left&lt;/span&gt;, #&lt;span style=&quot;color: #3498db;&quot;&gt;center&lt;/span&gt;, #&lt;span style=&quot;color: #3498db;&quot;&gt;right&lt;/span&gt;
{
    &lt;span style=&quot;color: #341f97&quot;&gt;width&lt;/span&gt;:32%;
    &lt;span style=&quot;color: #341f97&quot;&gt;float&lt;/span&gt;:left;
    &lt;span style=&quot;color: #341f97&quot;&gt;text-align&lt;/span&gt;:&lt;span style=&quot;color: #c49079;&quot;&gt;center&lt;/span&gt;;
}
#&lt;span style=&quot;color: #3498db;&quot;&gt;center&lt;/span&gt;
{
  &lt;span style=&quot;color: #341f97&quot;&gt;overflow&lt;/span&gt;:hidden;
  &lt;span style=&quot;color: #341f97&quot;&gt;margin&lt;/span&gt;: 0 1%;

}
&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title,
mat-card-subtitle&lt;/span&gt; {
  &lt;span style=&quot;color: #341f97&quot;&gt;padding-left&lt;/span&gt;: 80px;
  &lt;span style=&quot;color: #341f97&quot;&gt;color&lt;/span&gt;: #ecf0f1;
}
#&lt;span style=&quot;color: #3498db;&quot;&gt;container i&lt;/span&gt; {
  &lt;span style=&quot;color: #341f97&quot;&gt;font-size&lt;/span&gt;: 40px;
  &lt;span style=&quot;color: #341f97&quot;&gt;color&lt;/span&gt;: #&lt;span style=&quot;color: #c49079;&quot;&gt;ecf0f1&lt;/span&gt;;
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Activities Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;find activities commnent&lt;/b&gt; we can display all activities &lt;/p&gt;

&lt;p&gt;src/app/school/find-activities.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindActivitiesHtml(selectFindActivitiesHtml)&quot; id=&quot;idBtnFindActivitiesHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindActivitiesHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;example-card&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: 16px;&quot;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-image src&lt;/span&gt;=&quot;https://blogsimages.adobe.com/creative/files/2019/06/Fotolia_224946995_M-1.jpg&quot;
               &lt;span style=&quot;color: #3498db;&quot;&gt;alt&lt;/span&gt;=&quot;photo&quot;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find school Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;find school commnent&lt;/b&gt; We can display all information in tree like list &lt;/p&gt;

&lt;p&gt;src/app/find-school.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindSchoolTs(selectFindSchoolTs)&quot; id=&quot;idBtnFindSchoolTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindSchoolTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;School &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;SchoolService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/school.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;FlatTreeControl &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/cdk/tree&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;MatTreeFlattener, MatTreeFlatDataSource &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/tree&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;AddSchoolComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-school/add-school.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;ApplicationItemFlatNode, ApplicationItemNode, TreeApplicationService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/tree-application.service&#39;&lt;/span&gt;;


@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #341f97&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-find-school&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-school.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-school.component.css&#39;&lt;/span&gt;],
  &lt;span style=&quot;color: #341f97&quot;&gt;providers&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;TreeApplicationService&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FindSchoolComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt;: School = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; School;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt;: number;

  &lt;span style=&quot;color: #3498db;&quot;&gt;flatNodeMap&lt;/span&gt; = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; Map&amp;lt;ApplicationItemFlatNode, ApplicationItemNode&gt;();
  &lt;span style=&quot;color: #3498db;&quot;&gt;nestedNodeMap&lt;/span&gt; = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; Map&amp;lt;ApplicationItemNode, ApplicationItemFlatNode&gt;();

  &lt;span style=&quot;color: #3498db;&quot;&gt;treeControl&lt;/span&gt;: FlatTreeControl&amp;lt;ApplicationItemFlatNode&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;treeFlattener&lt;/span&gt;: MatTreeFlattener&amp;lt;ApplicationItemNode, ApplicationItemFlatNode&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;dataSource&lt;/span&gt;: MatTreeFlatDataSource&amp;lt;ApplicationItemNode, ApplicationItemFlatNode&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;expandedNodes&lt;/span&gt;: ApplicationItemFlatNode[];
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; schoolService: SchoolService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog,
    &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; treeApplicationService: TreeApplicationService) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(
      params =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idSchool&lt;/span&gt;;

        this.&lt;span style=&quot;color: #3498db;&quot;&gt;treeFlattener&lt;/span&gt; = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; MatTreeFlattener(this.&lt;span style=&quot;color: #3498db;&quot;&gt;transform&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;getLevel&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;isExpandable&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;getChildren&lt;/span&gt;);
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;treeControl&lt;/span&gt; = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; FlatTreeControl&amp;lt;ApplicationItemFlatNode&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;getLevel&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;isExpandable&lt;/span&gt;);
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;dataSource&lt;/span&gt; = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; MatTreeFlatDataSource(this.&lt;span style=&quot;color: #3498db;&quot;&gt;treeControl&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;treeFlattener&lt;/span&gt;);
        this.&lt;span style=&quot;color: #d577e6;&quot;&gt;saveExpandedNodes&lt;/span&gt;();
        this.&lt;span style=&quot;color: #d577e6;&quot;&gt;restoreExpandedNodes&lt;/span&gt;();

        &lt;span style=&quot;color: #3498db;&quot;&gt;treeApplicationService&lt;/span&gt;.applicationData.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(school =&gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;dataSource.data&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt;;
        });
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;treeApplicationService&lt;/span&gt;.applicationState.&lt;span style=&quot;color: #d577e6;&quot;&gt;next&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt;);

        this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSchool&lt;/span&gt;(this.idSchool).subscribe((school) =&gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt;;
        })
      }
    )
   }
   
&lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {}

  &lt;span style=&quot;color: #3498db;&quot;&gt;getLevel&lt;/span&gt; = (node: ApplicationItemFlatNode) =&gt; node.&lt;span style=&quot;color: #3498db;&quot;&gt;level&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;isExpandable&lt;/span&gt; = (node: ApplicationItemFlatNode) =&gt; node.&lt;span style=&quot;color: #3498db;&quot;&gt;expandable&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;getChildren&lt;/span&gt; = (node: ApplicationItemNode): ApplicationItemNode [] =&gt; node.&lt;span style=&quot;color: #3498db;&quot;&gt;children&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;hasChild&lt;/span&gt; = (_: number, nodeDate: ApplicationItemFlatNode) =&gt; nodeDate.&lt;span style=&quot;color: #3498db;&quot;&gt;expandable&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;hasNoContent&lt;/span&gt; = (_: number, nodeData: ApplicationItemFlatNode) =&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;nodeData.item&lt;/span&gt; === &#39;&#39;;

    &lt;span style=&quot;color: #3498db;&quot;&gt;transform&lt;/span&gt; = (node: ApplicationItemNode, level: number) =&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; existingNode = this.nestedNodeMap.&lt;span style=&quot;color: #d577e6;&quot;&gt;get&lt;/span&gt;(node);
    &lt;span style=&quot;color: #fb766d;&quot;&gt;const&lt;/span&gt; flatNode = existingNode &amp;&amp; existingNode.name === node.name ? existingNode : &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; ApplicationItemFlatNode();
    &lt;span style=&quot;color: #3498db;&quot;&gt;flatNode&lt;/span&gt;.name = &lt;span style=&quot;color: #341f97&quot;&gt;node&lt;/span&gt;.name;
    &lt;span style=&quot;color: #3498db;&quot;&gt;flatNode&lt;/span&gt;.id = &lt;span style=&quot;color: #341f97&quot;&gt;node&lt;/span&gt;.id;
    &lt;span style=&quot;color: #3498db;&quot;&gt;flatNode&lt;/span&gt;.clazz = &lt;span style=&quot;color: #341f97&quot;&gt;node&lt;/span&gt;.clazz;
    &lt;span style=&quot;color: #3498db;&quot;&gt;flatNode&lt;/span&gt;.level = &lt;span style=&quot;color: #341f97&quot;&gt;level&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;flatNode&lt;/span&gt;.title = &lt;span style=&quot;color: #341f97&quot;&gt;node&lt;/span&gt;.title;
    &lt;span style=&quot;color: #3498db;&quot;&gt;flatNode&lt;/span&gt;.routerLink = &lt;span style=&quot;color: #341f97&quot;&gt;node&lt;/span&gt;.routerLink;
    &lt;span style=&quot;color: #3498db;&quot;&gt;flatNode&lt;/span&gt;.actions = &lt;span style=&quot;color: #341f97&quot;&gt;node&lt;/span&gt;.actions;
    &lt;span style=&quot;color: #3498db;&quot;&gt;flatNode&lt;/span&gt;.expandable = (node.children &amp;&amp; node.children.length &gt; 0);
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;flatNodeMap&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;set&lt;/span&gt;(flatNode, node);
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;nestedNodeMap&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;set&lt;/span&gt;(node, flatNode);
    &lt;span style=&quot;color: #fb766d;&quot;&gt;return&lt;/span&gt; flatNode;
  }
  &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; saveExpandedNodes() {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;treeControl&lt;/span&gt; &amp;&amp; this.treeControl.dataNodes) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;expandedNodes&lt;/span&gt; = &lt;span style=&quot;color: #fb766d;&quot;&gt;new&lt;/span&gt; Arrayalt;ApplicationItemFlatNode&gt;();
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;treeControl&lt;/span&gt;.dataNodes.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;(node =&gt; {
      &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(node.expandable &amp;&amp; this.&lt;span style=&quot;color: #3498db;&quot;&gt;treeControl&lt;/span&gt;.isExpanded(node)) {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;expandedNodes&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;push&lt;/span&gt;(node);
        }
      });
    }
  }
  &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #d577e6;&quot;&gt;restoreExpandedNodes&lt;/span&gt;() {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;expandedNodes&lt;/span&gt; &amp;&amp; this.&lt;span style=&quot;color: #3498db;&quot;&gt;expandedNodes.length&lt;/span&gt; &gt; 0) {
      this.expandedNodes.&lt;span style=&quot;color: #d577e6;&quot;&gt;forEach&lt;/span&gt;(node =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;treeControl&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;expand&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;treeControl&lt;/span&gt;.dataNodes.&lt;span style=&quot;color: #d577e6;&quot;&gt;find&lt;/span&gt;(n =&gt; n.id === node.id));
      });
    }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteSchool&lt;/span&gt;() {
   &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #341f97&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
     this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteSchool&lt;/span&gt;(this.idSchool).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
       window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #341f97&quot;&gt;&#39;/home&#39;&lt;/span&gt;);
     })
   }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;editSchool&lt;/span&gt;(id: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddSchoolComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {id},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;580px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/find-school.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindSchoolHtml(selectFindSchoolHtml)&quot; id=&quot;idBtnFindSchoolHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindSchoolHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 30%; float:left&quot;&gt;
    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt; {{school.name}} &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;{{school.createdAt|date}}&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;hr&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-list-item&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;fas fa-th-list&quot; style=&quot;margin: 0 15px 0 10px;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;color: #4CAF50;&quot; [&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&#39;/find-school/&#39;, school.id]&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;routerLinkActive&lt;/span&gt;=&quot;router-link-active&quot; &gt;Dashbaord&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-list-item&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-tree&lt;/span&gt; [&lt;span style=&quot;color: #3498db;&quot;&gt;dataSource&lt;/span&gt;]=&quot;dataSource&quot; [&lt;span style=&quot;color: #3498db;&quot;&gt;treeControl&lt;/span&gt;]=&quot;treeControl&quot;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-tree-node&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*matTreeNodeDef&lt;/span&gt;=&quot;let node&quot; matTreeNodePadding matTreeNodeToggle&gt;
  
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-basic-chip&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;checklist-leaf-node root&quot; [&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;]=&quot;[node.routerLink]&quot;
              &lt;span style=&quot;color: #3498db;&quot;&gt;routerLinkActive&lt;/span&gt;=&quot;linkActive&quot;&gt;
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt;=&quot;{{node.title}}&quot;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt; [&lt;span style=&quot;color: #3498db;&quot;&gt;ngClass&lt;/span&gt;]=&quot;node.clazz&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin-right: 5px; color: #666a6c;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt;&gt;
                {{node.name}}
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-basic-chip&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-tree-node&lt;/span&gt;&gt;
  
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-tree-node&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*matTreeNodeDef&lt;/span&gt;=&quot;let node; when: hasChild&quot; matTreeNodePadding&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;span&lt;/span&gt; [&lt;span style=&quot;color: #3498db;&quot;&gt;attr.aria-label&lt;/span&gt;]=&quot;&#39;toggle &#39; + node.filename&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;=&quot;chevronIcon&quot; matTreeNodeToggle
              &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;background: transparent;&quot;&gt;
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-icon&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;mat-icon-rtl-mirror&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;id&lt;/span&gt;=&quot;mat-icon-plus&quot;&gt;
                {{treeControl.isExpanded(node) ? &#39;arrow_drop_down&#39; : &#39;arrow_right&#39;}}
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-icon&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;span&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-basic-chip&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;root&quot; [&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;]=&quot;[node.routerLink]&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;routerLinkActive&lt;/span&gt;=&quot;linkActive&quot;&gt;
  
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;title&lt;/span&gt;=&quot;{{node.title}}&quot;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt; [&lt;span style=&quot;color: #3498db;&quot;&gt;ngClass&lt;/span&gt;]=&quot;node.clazz&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin-right: 5px;  color: #666a6c;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;i&lt;/span&gt;&gt;
                {{node.name}}
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt;&gt;
  
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-basic-chip&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-tree-node&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-tree&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;editSchool(school.id)&quot;&gt;Update school&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;warn&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteSchool&lt;/span&gt;()&quot;&gt;Delete school&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button&lt;/span&gt; [&lt;span style=&quot;color: #3498db;&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&#39;/find-school/&#39; + school.id + &#39;/display-school/&#39;, school.id]&quot;&gt;School details&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
  
  &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 68%; float:right; margin-top: 30px; padding: 1%;&quot;&gt;
    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;router-outlet&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;router-outlet&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/find-school.css&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindSchoolCss(selectFindSchoolCss)&quot; id=&quot;idBtnFindSchoolCss&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindSchoolCss&quot;&gt;

&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;.full-height&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;background&lt;/span&gt;: #f1f2f6;
}

&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;.root&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: 100%;
  &lt;span style=&quot;color: #3498db;&quot;&gt;font-size&lt;/span&gt;: 16px;
  &lt;span style=&quot;color: #3498db;&quot;&gt;display&lt;/span&gt;: block;
  &lt;span style=&quot;color: #3498db;&quot;&gt;background&lt;/span&gt;: #f5f6fa;
  &lt;span style=&quot;color: #3498db;&quot;&gt;padding&lt;/span&gt;: 0 10px;
  &lt;span style=&quot;color: #3498db;&quot;&gt;border-radius&lt;/span&gt;: 4px;
}

&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;a&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;font-family&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; initial&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;color&lt;/span&gt;: #2f3542;
  &lt;span style=&quot;color: #3498db;&quot;&gt;text-decoration&lt;/span&gt;: none;
}

&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;#mat-icon-plus&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;color&lt;/span&gt;: #666a6c;
  &lt;span style=&quot;color: #3498db;&quot;&gt;font-size&lt;/span&gt;: 24px;
  &lt;span style=&quot;color: #3498db;&quot;&gt;margin-top&lt;/span&gt;: 4px;
}

&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;.root:hover&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;-webkit-transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #341f97&quot;&gt; ease-in-out&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;-moz-transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #341f97&quot;&gt; ease-in-out&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #341f97&quot;&gt; ease-in-out&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;cursor&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt; pointer&lt;/span&gt;;
}

&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;#chevronIcon&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;cursor&lt;/span&gt;: pointer;
}

&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;.mat-tree-node&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;margin-bottom&lt;/span&gt;: -15px;
}

&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;h2&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;background&lt;/span&gt;: #e58e26;
  &lt;span style=&quot;color: #3498db;&quot;&gt;padding&lt;/span&gt;: 0 16px;
  &lt;span style=&quot;color: #3498db;&quot;&gt;border-radius&lt;/span&gt;: 5px;
}

&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;.linkActive&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;background-color&lt;/span&gt;: #bcffb6 &lt;span style=&quot;color: #fb766d;&quot;&gt;!important&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;padding&lt;/span&gt;: 2px 10px 0 3px;
  &lt;span style=&quot;color: #3498db;&quot;&gt;border-top-right-radius&lt;/span&gt;: 5px;
  &lt;span style=&quot;color: #3498db;&quot;&gt;border-bottom-right-radius&lt;/span&gt;: 5px;
  &lt;span style=&quot;color: #3498db;&quot;&gt;color&lt;/span&gt;: #a94442 &lt;span style=&quot;color: #fb766d;&quot;&gt;!important&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;-webkit-transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #341f97&quot;&gt; ease-in-out&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;-moz-transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #341f97&quot;&gt; ease-in-out&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #341f97&quot;&gt; ease-in-out&lt;/span&gt;;
}
&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;.content-logo&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;padding-top&lt;/span&gt;: 15px;
  &lt;span style=&quot;color: #3498db;&quot;&gt;padding-left&lt;/span&gt;: 30px;
  &lt;span style=&quot;color: #3498db;&quot;&gt;margin-bottom&lt;/span&gt;: 10px;
}
&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;.content-logo .fa-user-graduate&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;font-size&lt;/span&gt;: 24px;
  &lt;span style=&quot;color: #3498db;&quot;&gt;color&lt;/span&gt;: #2d3436;
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Subjects Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;find subjects commnent&lt;/b&gt; we can display all subjects &lt;/p&gt;

&lt;p&gt;src/app/school/find-subjects.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindSubjectsHtml(selectFindSubjectsHtml)&quot; id=&quot;idBtnFindSubjectsHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindSubjectsHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;example-card&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: 16px;&quot;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-image src&lt;/span&gt;=&quot;https://i.ytimg.com/vi/AnZxeX_8mVk/maxresdefault.jpg&quot;
               &lt;span style=&quot;color: #3498db;&quot;&gt;alt&lt;/span&gt;=&quot;photo&quot;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Exams Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;find subjects commnent&lt;/b&gt; we can display all exams &lt;/p&gt;

&lt;p&gt;src/app/school/find-exams.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindExamsHtml(selectFindExamsHtml)&quot; id=&quot;idBtnFindExamsHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindExamsHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;example-card&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: 16px;&quot;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-image src&lt;/span&gt;=&quot;https://static01.nyt.com/images/2020/11/22/magazine/22Ethicist/22Ethicist-superJumbo.jpg&quot;
               &lt;span style=&quot;color: #3498db;&quot;&gt;alt&lt;/span&gt;=&quot;photo&quot;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Rooms Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;find rooms commnent&lt;/b&gt; we can display all rooms &lt;/p&gt;

&lt;p&gt;src/app/school/find-rooms.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindRoomsHtml(selectFindRoomsHtml)&quot; id=&quot;idBtnFindRoomsHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindRoomsHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;example-card&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: 16px;&quot;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-image src&lt;/span&gt;=&quot;https://thumbs.dreamstime.com/b/illustration-du-vecteur-concept-d-encadrement-professionnel-chef-%C3%A9quipe-promotion-des-employ%C3%A9s-cours-de-perfectionnement-156525531.jpg&quot;
               &lt;span style=&quot;color: #3498db;&quot;&gt;alt&lt;/span&gt;=&quot;photo&quot;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Find Schoolings Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;find schoolings commnent&lt;/b&gt; we can display all schoolings &lt;/p&gt;

&lt;p&gt;src/app/school/find-schoolings.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindSchoolingsHtml(selectFindSchoolingsHtml)&quot; id=&quot;idBtnFindSchoolingsHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindSchoolingsHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&quot;example-card&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: 16px;&quot;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-image src&lt;/span&gt;=&quot;https://i.ytimg.com/vi/AnZxeX_8mVk/maxresdefault.jpg&quot;
               &lt;span style=&quot;color: #3498db;&quot;&gt;alt&lt;/span&gt;=&quot;photo&quot;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add School Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;add school commnent&lt;/b&gt; we can add a new school&lt;/p&gt;

&lt;p&gt;src/app/add-school-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddSchoolTs(selectAddSchoolTs)&quot; id=&quot;idBtnAddSchoolTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddSchoolTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;School &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;SchoolService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/school.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #341f97&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-school&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-school.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-school.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddSchoolComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
   
  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar = false&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt;: School = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; School;
  
    &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; schoolService: SchoolService, @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) {}

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.id&lt;/span&gt; != &lt;span style=&quot;color: #fb766d;&quot;&gt;null&lt;/span&gt;) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSchool&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.id&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((school) =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt;;
      });
    }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addSchool&lt;/span&gt;() {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.id&lt;/span&gt; != &lt;span style=&quot;color: #fb766d;&quot;&gt;null&lt;/span&gt;) {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;editSchool&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.id&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((school) =&gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt;;
          window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
        });
    } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addSchool&lt;/span&gt;(this.school).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((school) =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt;;
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
      });
    }
  }
}
  
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-school-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddSchoolHtml(selectAddSchoolHtml)&quot; id=&quot;idBtnAddSchoolHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddSchoolHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add a new school&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;fill&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter name&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #341f97&quot;&gt; matInput type&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;name&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;name&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;school.name&quot; #&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;ngModel&quot; &lt;span style=&quot;color: #341f97&quot;&gt;required&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;fill&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter city&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #341f97&quot;&gt; matInput type&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;city&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;city&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;school.city&quot;&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;#city&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;required&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;fill&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter department&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #341f97&quot;&gt; matInput type&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;department&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;department&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;school.department&quot;&lt;/span&gt;
                  &lt;span style=&quot;color: #3498db;&quot;&gt;#department&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;required&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter open&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #341f97&quot;&gt; type&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;time&quot;&lt;/span&gt; matInput &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;open&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;open&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;school.open&quot; &lt;span style=&quot;color: #341f97&quot;&gt;#open&lt;/span&gt;=&quot;ngModel&quot; &lt;span style=&quot;color: #341f97&quot;&gt;required&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter close&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #341f97&quot;&gt; type&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;time&quot;&lt;/span&gt; matInput &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;close&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;close&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;school.close&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;#close&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;ngModel&quot;&lt;/span&gt;
                  &lt;span style=&quot;color: #341f97&quot;&gt;required&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter description&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;textarea&lt;/span&gt; matInput &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;Description&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;description&quot;&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;school.description&quot;&lt;/span&gt;
                  &lt;span style=&quot;color: #3498db;&quot;&gt;#description&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;ngModel&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;textarea&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;primary&quot;&lt;/span&gt;
[&lt;span style=&quot;color: #3498db;&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;name.invalid || city.invalid || description.invalid || department.invalid || open.invalid || close.invalid&quot;&lt;/span&gt;
                (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addSchool&lt;/span&gt;()&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 10em !important&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Display School Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;Display school commnent&lt;/b&gt; We will display the school information open time and close time or update/delete. We can also add a new activity, subject, exam, room and schooling&lt;/p&gt;

&lt;p&gt;src/app/display-school-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplaySchoolTs(selectDisplaySchoolTs)&quot; id=&quot;idBtnDisplaySchoolTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplaySchoolTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;AddActivityComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-activity/add-activity.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;AddManagerComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-manager/add-manager.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;School, Manager &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;ManagerService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/manager.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;SchoolService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/school.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;AddSchoolingComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-schooling/add-schooling.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;AddRoomComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-room/add-room.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;AddSubjectComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-subject/add-subject.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;AddExamComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-exam/add-exam.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #341f97&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-display-school&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-school.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-school.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;DisplaySchoolComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt;: School = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; School;
  &lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt;: Manager = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Manager;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt;: number;
  
 &lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; route: ActivatedRoute, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; schoolService: SchoolService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; dialog: MatDialog,
    &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; managerService: ManagerService) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(
      params =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;route.snapshot.params.idSchool&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSchool&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((school) =&gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;school&lt;/span&gt;;
           &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt;!=null) {
            this.&lt;span style=&quot;color: #3498db;&quot;&gt;managerService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findManagerForSchool&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSchool&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((manager) =&gt; {
              this.&lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt;
            })
           }
        })
      })
    }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {}
  
 &lt;span style=&quot;color: #d577e6;&quot;&gt;addManager&lt;/span&gt;(id: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddManagerComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {id},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;320px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
  
   &lt;span style=&quot;color: #d577e6;&quot;&gt;editManager&lt;/span&gt;(idManager: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddManagerComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idManager},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;320px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;deleteManager&lt;/span&gt;(idManager: number, idSchool: number) {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #d577e6;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #341f97&quot;&gt;&#39;Are you sur&#39;&lt;/span&gt;)) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;managerService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteManager&lt;/span&gt;(idManager, idSchool).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
      })
    }
  }
  
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addSchoolling&lt;/span&gt;(idSchool: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddActivityComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idSchool},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;600px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addActivity&lt;/span&gt;(idSchool: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddSchoolingComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idSchool},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;300px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
 
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addRoom&lt;/span&gt;(idSchool: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddRoomComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idSchool},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;370px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }
 
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addSubject&lt;/span&gt;(idSchool: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddSubjectComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idSchool},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;620px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addExam&lt;/span&gt;(idSchool: number) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;open&lt;/span&gt;(AddExamComponent, {
      &lt;span style=&quot;color: #3498db;&quot;&gt;data&lt;/span&gt;: {idSchool},
      &lt;span style=&quot;color: #3498db;&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;480px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #3498db;&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
    });
  }

}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-school-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplaySchoolHtml(selectDisplaySchoolHtml)&quot; id=&quot;idBtnDisplaySchoolHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplaySchoolHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;Welcome to {{school.name}} &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;{{school.createdAt|date}}&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;hr&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-list&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-list-item&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-line style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #222f3e;&quot;&lt;/span&gt;&gt;
                 &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;h2&lt;/span&gt; &lt;span style=&quot;color: #341f97&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;manager!=null&quot;&lt;/span&gt;&gt;Manager: {{manager.firstName}} {{manager.lastName}}
                  &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;material-icons&quot;&lt;/span&gt; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;deleteManager&lt;/span&gt;(manager.id, school.id)&quot; 
                  &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;cursor: pointer; color: #c0392b;&quot;&lt;/span&gt;&gt;close&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;span&lt;/span&gt;&gt;
                &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;h2&lt;/span&gt;&gt;
               &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-line style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #222f3e;&quot;&lt;/span&gt;&gt;City: {{school.city}}&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-line style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;color: #222f3e;&quot;&lt;/span&gt;&gt;Department: {{school.department}}&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-list-item&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-list&lt;/span&gt;&gt;&amp;lt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-chip-list&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;cdkDropList cdkDropListOrientation&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;horizontal&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-chip&lt;/span&gt;&gt;Open: {{school.open}} &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-chip&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-chip&lt;/span&gt;&gt;Close: {{school.close}} &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-chip&lt;/span&gt;&gt;
           &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-chip-list&lt;/span&gt;&gt;
           &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;background: #f5f6fa; padding: 10px; border-radius: 5px; color: #444;&quot;&lt;/span&gt;&gt;
             {{school.description}}
           &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;p&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;hr&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button&lt;/span&gt;&lt;span style=&quot;color: #3498db;&quot;&gt; color&lt;/span&gt;=&quot;&lt;span style=&quot;color: #341f97&quot;&gt;accent&lt;/span&gt;&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;editManager&lt;/span&gt;(manager.id)&quot; &lt;span style=&quot;color: #341f97&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;manager!=null&quot;&lt;/span&gt;&gt;Edit the manager&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button&lt;/span&gt;&lt;span style=&quot;color: #3498db;&quot;&gt; color&lt;/span&gt;=&quot;&lt;span style=&quot;color: #341f97&quot;&gt;accent&lt;/span&gt;&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addManager&lt;/span&gt;(school.id)&quot; &lt;span style=&quot;color: #341f97&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;manager==null&quot;&lt;/span&gt;&gt;Add a manager&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button&lt;/span&gt;&lt;span style=&quot;color: #3498db;&quot;&gt; color&lt;/span&gt;=&quot;&lt;span style=&quot;color: #341f97&quot;&gt;primary&lt;/span&gt;&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addActivity&lt;/span&gt;(school.id)&quot;&gt;Add an activity&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button&lt;/span&gt;&lt;span style=&quot;color: #3498db;&quot;&gt; color&lt;/span&gt;=&quot;&lt;span style=&quot;color: #341f97&quot;&gt;primary&lt;/span&gt;&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addSchoolling&lt;/span&gt;(school.id)&quot;&gt;Add a schooling&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button&lt;/span&gt;&lt;span style=&quot;color: #3498db;&quot;&gt; color&lt;/span&gt;=&quot;&lt;span style=&quot;color: #341f97&quot;&gt;primary&lt;/span&gt;&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addRoom&lt;/span&gt;(school.id)&quot;&gt;Add a room&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button&lt;/span&gt;&lt;span style=&quot;color: #3498db;&quot;&gt; color&lt;/span&gt;=&quot;&lt;span style=&quot;color: #341f97&quot;&gt;primary&lt;/span&gt;&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addSubject&lt;/span&gt;(school.id)&quot;&gt;Add a subject&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-stroked-button&lt;/span&gt;&lt;span style=&quot;color: #3498db;&quot;&gt; color&lt;/span&gt;=&quot;&lt;span style=&quot;color: #341f97&quot;&gt;primary&lt;/span&gt;&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addExam&lt;/span&gt;(school.id)&quot;&gt;Add an exam&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add Manager Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;add manager commnent&lt;/b&gt; we can add a new manager for each school&lt;/p&gt;

&lt;p&gt;src/app/add-manager-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddManagerTs(selectAddManagerTs)&quot; id=&quot;idBtnAddManagerTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddManagerTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Manager &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;ManagerService&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/manager.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #341f97&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-manager&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-manager.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-manager.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddManagerComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar = false&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt;: Manager = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Manager;
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; managerService: ManagerService, @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idManager&lt;/span&gt;!=null) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;managerService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findManager&lt;/span&gt;(this.data.idManager).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((manager) =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt;;
      })
    }
  }
&lt;span style=&quot;color: #d577e6;&quot;&gt;addManager&lt;/span&gt;() {
  this.&lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idManager&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;nul&lt;/span&gt;l) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;managerService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;editManager&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idManager&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((manager) =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt;;
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;()
    })
  } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt; {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;managerService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addManager&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.id&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((manager) =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;manager&lt;/span&gt;;
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;()
    })
  }
}

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-manager-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddManagerHtml(selectAddManagerHtml)&quot; id=&quot;idBtnAddManagerHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddManagerHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;=&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add a new manager&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt; fill&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter firstName&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;text&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;firstName&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;firstName&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;manager.firstName&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#firstName&lt;/span&gt;=&quot;ngModel&quot; required&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt; fill&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter lastName&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;text&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;lastName&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;lastName&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;manager.lastName&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#lastName&lt;/span&gt;=&quot;ngModel&quot; required&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot;
                [&lt;span style=&quot;color: #3498db;&quot;&gt;disabled&lt;/span&gt;]=&quot;firstName.invalid || lastName.invalid&quot;
                (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addManager&lt;/span&gt;()&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 10em !important&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;=
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add Activity Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;add activity commnent&lt;/b&gt; we can add a new activity for each school&lt;/p&gt;

&lt;p&gt;src/app/add-activity-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddActivityTs(selectAddActivityTs)&quot; id=&quot;idBtnAddActivityTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddActivityTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Activity &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;ActivityService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/activity.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #341f97&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-activity&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-activity.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-activity.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddActivityComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar = false&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt;: Activity = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Activity;
  &lt;span style=&quot;color: #3498db;&quot;&gt;weekDay&lt;/span&gt;: any = {};
  
 constructor(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; activityService: ActivityService, @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) {}

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): void {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idActivity&lt;/span&gt;) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;activityService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findActivity&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idActivity&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((activity) =&gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt;;
        });
    }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;onSelectedDay&lt;/span&gt;() {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt;.day = this.&lt;span style=&quot;color: #3498db;&quot;&gt;weekDay&lt;/span&gt;;
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;onDateTime&lt;/span&gt;(e) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt;.date = e.&lt;span style=&quot;color: #3498db;&quot;&gt;target.value&lt;/span&gt;;
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addActivity&lt;/span&gt;() {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idActivity&lt;/span&gt;) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;activityService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;editActivity&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idActivity&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((activity) =&gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt;;
          window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
        });
    } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;activityService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addActivity&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSchool&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;((activity) =&gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;activity&lt;/span&gt;;
          window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
        });
    }
  }
}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-activity-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddActivityHtml(selectAddActivityHtml)&quot; id=&quot;idBtnAddActivityHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddActivityHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add a new activity&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;br&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;appearance&lt;/span&gt;=&quot;fill&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter type&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;text&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;type&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;type&quot; 
                &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;activity.type&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#type&lt;/span&gt;=&quot;ngModel&quot; required&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin-bottom: 15px;&quot;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;strong&lt;/span&gt;&gt;Day&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;strong&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-group&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;weekDay&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;weekDay&quot; (&lt;span style=&quot;color: #3498db;&quot;&gt;change&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;onSelectedDay&lt;/span&gt;()&quot;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;value&lt;/span&gt;=&quot;Monday&quot;&gt;Monday&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-button&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;value&lt;/span&gt;=&quot;Tuesday&quot;&gt;Tesday&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-button&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;value&lt;/span&gt;=&quot;Wednesday&quot;&gt;Wendesday&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-button&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;value&lt;/span&gt;=&quot;Thursday&quot;&gt;Thursday&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-button&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;value&lt;/span&gt;=&quot;Friday&quot;&gt;Friday&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-button&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-radio-group&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;hr&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;date&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;date&quot; min=&quot;minDate&quot;
                       &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;activity.date&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#date&lt;/span&gt;=&quot;ngModel&quot; required (change)=&quot;onDateTime($event)&quot;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;START&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;time&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;startTime&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;startTime&quot;
                       &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;activity.startDate&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#startTime&lt;/span&gt;=&quot;ngModel&quot; required&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;END&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;time&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;endTime&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;endTime&quot;
                       &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;activity.endDate&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#endTime&lt;/span&gt;=&quot;ngModel&quot; required&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter description&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;textarea&lt;/span&gt; matInput &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;Description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;activity.description&quot;
                  #description=&quot;ngModel&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;textarea&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot;
                [&lt;span style=&quot;color: #3498db;&quot;&gt;disabled&lt;/span&gt;]=&quot;type.invalid || description.invalid
                || startTime.invalid  || endTime.invalid&quot;
                (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addActivity&lt;/span&gt;()&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 10em !important&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add schooling Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;add schooling commnent&lt;/b&gt; we can add a new schooling for each school&lt;/p&gt;

&lt;p&gt;src/app/add-schooling-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddSchoolingTs(selectAddSchoolingTs)&quot; id=&quot;idBtnAddSchoolingTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddSchoolingTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Schooling &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;SchoolingService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/schooling.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #341f97&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-schooling&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-schooling.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-schooling.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddSchoolingComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar = false&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt;: Schooling = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Schooling;
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; schoolingService: SchoolingService, @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt;  {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt; (this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSchooling&lt;/span&gt;!=null) {
     this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolingService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSchooling&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSchooling&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(schooling =&gt; {
       this.&lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt;;
     })
    }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addSchoolling&lt;/span&gt;() {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt; (this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSchooling&lt;/span&gt;!=null) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolingService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;editSchooling&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSchooling&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(schooling =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt;;
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
      })
    } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt;  {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;schoolingService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addSchooling&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSchool&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(schooling =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;schooling&lt;/span&gt;;
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
      })
    }
  }
}
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-schooling-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddSchoolingHtml(selectAddSchoolingHtml)&quot; id=&quot;idBtnAddSchoolingHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddSchoolingHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add a new schoolling&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Year&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;number&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;Year&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;year&quot;
                       [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;schooling.year&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#year&lt;/span&gt;=&quot;ngModel&quot; required&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter description&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;textarea&lt;/span&gt; matInput &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;Description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;description&quot; [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;schooling.description&quot;
                  &lt;span style=&quot;color: #3498db;&quot;&gt;#description&lt;/span&gt;=&quot;ngModel&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;textarea&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot;
                [&lt;span style=&quot;color: #3498db;&quot;&gt;disabled&lt;/span&gt;]=&quot;year.invalid || description.invalid&quot;
                (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addSchoolling&lt;/span&gt;()&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 10em !important&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add room Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;add room commnent&lt;/b&gt; we can add a new room for each school&lt;/p&gt;

&lt;p&gt;src/app/add-room-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddRoomTs(selectAddRoomTs)&quot; id=&quot;idBtnAddRoomTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddRoomTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Room &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;RoomService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/room.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #341f97&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-room&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-room.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-room.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddRoomComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar = false&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;room&lt;/span&gt;: Room = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Room;
    
constructor(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; roomService: RoomService, @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idRoom&lt;/span&gt; !=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;roomService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findRoom&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idRoom&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(room =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;room&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;room&lt;/span&gt;;
      })
    }
  }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;addRoom&lt;/span&gt;() {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idRoom&lt;/span&gt; !=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt; ) {
       this.&lt;span style=&quot;color: #3498db;&quot;&gt;roomService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;editRoom&lt;/span&gt;(this.room, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idRoom&lt;/span&gt; ).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(room =&gt; {
         this.&lt;span style=&quot;color: #3498db;&quot;&gt;room&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;room&lt;/span&gt;;
         window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
       })
    } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;roomService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addRoom&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;room&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSchool&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(room =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;room&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;room&lt;/span&gt;;
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
      })
    }
  }
}
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-room-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddRoomHtml(selectAddRoomHtml)&quot; id=&quot;idBtnAddRoomHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddRoomHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add a new room&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Code&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;text&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;Code&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;code&quot;
                       [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;room.code&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#code&lt;/span&gt;=&quot;ngModel&quot; required&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Capacity&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;number&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;Capacity&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;capacity&quot;
                       [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;room.capacity&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#capacity&lt;/span&gt;=&quot;ngModel&quot; required&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter description&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;textarea&lt;/span&gt; matInput &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;Description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;description&quot; 
                [(&lt;span style=&quot;color: #3498db;&quot;&gt;ngModel&lt;/span&gt;)]=&quot;room.description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#description&lt;/span&gt;=&quot;ngModel&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;textarea&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot;
                [&lt;span style=&quot;color: #3498db;&quot;&gt;disabled&lt;/span&gt;]=&quot;capacity.invalid || description.invalid
                || code.invalid&quot;
                (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addRoom&lt;/span&gt;()&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 10em !important&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add subject Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;add subject commnent&lt;/b&gt; we can add a new subject for each school&lt;/p&gt;

&lt;p&gt;src/app/add-subject-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddSubjectTs(selectAddSubjectTs)&quot; id=&quot;idBtnAddSubjectTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddSubjectTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Subject &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;SubjectService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/subject.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #341f97&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-subject&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-subject.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-subject.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddSubjectComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar = false&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;: Subject = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Subject;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;arrayColors&lt;/span&gt;: any = {
    &lt;span style=&quot;color: #3498db;&quot;&gt;color1&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;#f8c291&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;color2&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;#d1f28e&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;color3&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;rgb(255,245,0)&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;color4&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;rgb(236,64,64)&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;color5&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;rgba(45,208,45,1)&#39;&lt;/span&gt;
  };
  &lt;span style=&quot;color: #3498db;&quot;&gt;color1&lt;/span&gt;: &lt;span style=&quot;color: #341f97&quot;&gt;&#39;#d1f28e&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #fb766d;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;selectedColor&lt;/span&gt; = &lt;span style=&quot;color: #341f97&quot;&gt;&#39;color2&#39;&lt;/span&gt;;
  
constructor(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; subjectService: SubjectService, @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSubject&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSubject&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSubject&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(subject =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;;
      })
    }
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;updateColor&lt;/span&gt;(event) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;color1&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;event&lt;/span&gt;;
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;subject.color&lt;/span&gt; = this.&lt;span style=&quot;color: #3498db;&quot;&gt;color1&lt;/span&gt;;
   }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addMatter&lt;/span&gt;() {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSubject&lt;/span&gt;!=null) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;editSubject&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSubject&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(subject =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;;
      window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
    })
    } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addSubject&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSchool&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(subject =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;;
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
      })
    }
  }
}
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-subject-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddSubjectHtml(selectAddSubjectHtml)&quot; id=&quot;idBtnAddSubjectHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddSubjectHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add a new subject&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Name&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;text&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;Name&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;name&quot;
                       &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;subject.name&quot; #&lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;ngModel&quot; required&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Description&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;textarea  matInput &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;Description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;description&quot;
                           &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;subject.description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#description&lt;/span&gt;=&quot;ngModel&quot; required&gt;&amp;lt;/textarea&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;span&lt;/span&gt; [&lt;span style=&quot;color: #3498db;&quot;&gt;style.background&lt;/span&gt;]=&quot;arrayColors[selectedColor]&quot;
                      [&lt;span style=&quot;color: #3498db;&quot;&gt;cpToggle&lt;/span&gt;]=&quot;true&quot;
                      [&lt;span style=&quot;color: #3498db;&quot;&gt;cpDialogDisplay&lt;/span&gt;]=&quot;&#39;inline&#39;&quot;
                      [&lt;span style=&quot;color: #3498db;&quot;&gt;cpCancelButton&lt;/span&gt;]=&quot;true&quot;
                      [(&lt;span style=&quot;color: #3498db;&quot;&gt;colorPicker&lt;/span&gt;)]=&quot;arrayColors[selectedColor]&quot;
                      (&lt;span style=&quot;color: #3498db;&quot;&gt;colorPickerChange&lt;/span&gt;)=&quot;updateColor($event)&quot; &gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;span&lt;/span&gt;&gt;
                &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot;
                [&lt;span style=&quot;color: #3498db;&quot;&gt;disabled&lt;/span&gt;]=&quot;name.invalid || description.invalid&quot;
                (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addMatter&lt;/span&gt;()&quot; style=&quot;width: 10em !important&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add exam Components&lt;/h2&gt;
&lt;p&gt;In &lt;b&gt;add exam commnent&lt;/b&gt; we can add a new exam for each school&lt;/p&gt;

&lt;p&gt;src/app/add-exam-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddExamTs(selectAddExamTs)&quot; id=&quot;idBtnAddExamTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddExamTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;Exam, Subject &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;ExamService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/exam.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;dashCaseToCamelCase &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/compiler/src/util&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #341f97&quot;&gt;SubjectService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/subject.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #341f97&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-exam&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-exam.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #341f97&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-exam.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddExamComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;progressBar = false&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt;: Exam = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Exam;
  &lt;span style=&quot;color: #3498db;&quot;&gt;idSubject&lt;/span&gt;: number;
  &lt;span style=&quot;color: #3498db;&quot;&gt;subjects&lt;/span&gt;: Subject[];
  &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;: Subject = {} &lt;span style=&quot;color: #fb766d;&quot;&gt;as&lt;/span&gt; Subject;
  
&lt;span style=&quot;color: #d577e6;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; examService: ExamService, &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; subjectService: SubjectService,
    @Inject(MAT_DIALOG_DATA) &lt;span style=&quot;color: #fb766d;&quot;&gt;private&lt;/span&gt; data: any) { }

  &lt;span style=&quot;color: #d577e6;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #fb766d;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idExam&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      this.&lt;span style=&quot;color: #d577e6;&quot;&gt;examService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findExam&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idExam&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(exam =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt;;
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findSubjectForExam&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idExam&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(subject =&gt; {
          this.&lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;subject&lt;/span&gt;;
        })
      })
    }
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjectService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;findAllSubjectsForSchool&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSchool&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(subjects =&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;subjects&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;subjects&lt;/span&gt;;
    })
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;onSelecSubject&lt;/span&gt;(e) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSubject&lt;/span&gt; = e.&lt;span style=&quot;color: #3498db;&quot;&gt;target.value&lt;/span&gt;;
 }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;onDateTime&lt;/span&gt;(e) {
    this.&lt;span style=&quot;color: #3498db;&quot;&gt;exam.date&lt;/span&gt; = e.&lt;span style=&quot;color: #3498db;&quot;&gt;target.value&lt;/span&gt;;
  }
  &lt;span style=&quot;color: #d577e6;&quot;&gt;addExam&lt;/span&gt;() {
  this.&lt;span style=&quot;color: #3498db;&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #fb766d;&quot;&gt;if&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idExam&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
     this.&lt;span style=&quot;color: #3498db;&quot;&gt;examService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;editExam&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idExam&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(exam =&gt; {
       this.&lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt;;
       window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
     })
    } &lt;span style=&quot;color: #fb766d;&quot;&gt;else&lt;/span&gt; {
      this.&lt;span style=&quot;color: #3498db;&quot;&gt;examService&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;addExam&lt;/span&gt;(this.&lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;data.idSchool&lt;/span&gt;, this.&lt;span style=&quot;color: #3498db;&quot;&gt;idSubject&lt;/span&gt;).&lt;span style=&quot;color: #d577e6;&quot;&gt;subscribe&lt;/span&gt;(exam =&gt; {
        this.&lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;exam&lt;/span&gt;;
        window.&lt;span style=&quot;color: #3498db;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #d577e6;&quot;&gt;reload&lt;/span&gt;();
      })
    }
  }
}

   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-exam-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddExamHtml(selectAddExamHtml)&quot; id=&quot;idBtnAddExamHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddExamHtml&quot;&gt;

    &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;margin: auto; width: 100%; border: 3px solid #73AD21;&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add a new exam&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-title&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-header&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mode&lt;/span&gt;=&quot;buffer&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngIf&lt;/span&gt;=&quot;progressBar&quot;&gt;&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Please choose a subject&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;select&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;matNativeControl required&lt;/span&gt; (&lt;span style=&quot;color: #3498db;&quot;&gt;change&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;onSelecSubject&lt;/span&gt;($event)&quot;&gt;
                  &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;option&lt;/span&gt; selected disabled&gt;Subjects&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;option&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;*ngFor&lt;/span&gt;=&quot;let s of subjects&quot; [&lt;span style=&quot;color: #3498db;&quot;&gt;value&lt;/span&gt;]=&quot;s.id&quot; [&lt;span style=&quot;color: #3498db;&quot;&gt;selected&lt;/span&gt;]=&quot;s.name==subject.name&quot;&gt;{{s.name}}&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;option&lt;/span&gt;&gt;
                &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;select&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;date&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;date&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;min&lt;/span&gt;=&quot;minDate&quot;
                       &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;exam.date&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#date&lt;/span&gt;=&quot;ngModel&quot; required (&lt;span style=&quot;color: #3498db;&quot;&gt;change&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;onDateTime&lt;/span&gt;($event)&quot;&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;START&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;time&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;startTime&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;start&quot;
                       &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;exam.start&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#startTime&lt;/span&gt;=&quot;ngModel&quot; required&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;END&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; matInput&lt;/span&gt;&lt;span style=&quot;color: #3498db&quot;&gt; type&lt;/span&gt;=&quot;time&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;endTime&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;end&quot;
                       &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;exam.end&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;#endTime&lt;/span&gt;=&quot;ngModel&quot; required&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #341f97&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;Enter description&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-label&lt;/span&gt;&gt;
                &amp;lt;textarea matInput &lt;span style=&quot;color: #3498db;&quot;&gt;placeholder&lt;/span&gt;=&quot;Description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;name&lt;/span&gt;=&quot;description&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;[(ngModel)]&lt;/span&gt;=&quot;exam.description&quot;
                  #description=&quot;ngModel&quot;&gt;&amp;lt;/textarea&gt;
              &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;br&lt;/span&gt;&gt;
      
              &amp;lt;&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-raised-button color&lt;/span&gt;=&quot;primary&quot;
                [&lt;span style=&quot;color: #3498db;&quot;&gt;disabled&lt;/span&gt;]=&quot;description.invalid
                || startTime.invalid  || endTime.invalid&quot;
                (&lt;span style=&quot;color: #3498db;&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d577e6;&quot;&gt;addExam&lt;/span&gt;()&quot; &lt;span style=&quot;color: #3498db;&quot;&gt;style&lt;/span&gt;=&quot;width: 10em !important&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;button&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;form&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card-content&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;mat-card&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: rgb(98, 253, 111);&quot;&gt;div&lt;/span&gt;&gt;
   
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;div style=&quot;background: none 0% 0% repeat scroll rgb(255, 118, 0); border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring.html&quot;&gt;Building application School with Spring boot and Angular Part 4&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: none 0% 0% repeat scroll rgb(0, 137, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/school-angular&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download This Application My School From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;

&lt;div style=&quot;background: #fff; border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://www.programmingwithdrama.com/2021/02/building-application-bank-with-spring.html&quot;&gt;Building application School with Spring boot and Angular Part 4&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: #fff; border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/school-angular&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download This Application My School From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;

&lt;br /&gt;
&lt;style&gt; 
 pre:before {
   content: none;
  }
  pre {
   background-color: #1e1e1f;
   border-radius: 7px;
   line-height: 20px; 
   position: relative;
   overflow: auto;
   width: 100%;
  }
  
  code {
  color: #c23616;
  font-size: 13px;
  background-color: #1e1e1f;
  padding: 3px 10px 20px;
  }
 div::-moz-selection,
 b::-moz-selection,
 strong::-moz-selection,
 code::-moz-selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
div::selection,
strong::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: #000;
  border-radius: 3px;
}
&lt;/style&gt;


&lt;script data-ad-client=&quot;ca-pub-7401879888732563&quot; async src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
  function copyFindSchoolTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindSchoolTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindSchoolHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindSchoolHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindSchoolCss(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindSchoolCss&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppRouting(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppRouting&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCreateComponents(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCreateComponents&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindActivitiesHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindActivitiesHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindSchoolingsHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindSchoolingsHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindExamsHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindExamsHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindRoomsHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindRoomsHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindSubjectsHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindSubjectsHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAwesome(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAwesome&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyMaterialModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnMaterialModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyModal(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnModal&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyActivityService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnActivityService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCoefficientService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCoefficientService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCourseService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCourseService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyExamService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnExamService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLevelService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLevelService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyManagerService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnManagerService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyNoteService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNoteService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProgramService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProgramService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyRoomService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnRoomService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySchoolService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchoolService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySchoolingService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchoolingService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySubjectService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSubjectService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyTreeApp(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnTreeApp&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyApp(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnApp&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyHomeTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnHomeTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyHomeHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnHomeHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDashboardTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDashboardTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDashboardHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDashboardHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDashboardCss(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDashboardCss&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddSchoolTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddSchoolTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddSchoolHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddSchoolHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplaySchoolTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplaySchoolTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplaySchoolHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplaySchoolHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddManagerTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddManagerTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddManagerHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddManagerHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddActivityTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddActivityTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddActivityHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddActivityHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddSchoolingTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddSchoolingTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddSchoolingHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddSchoolingHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddRoomTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddRoomTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddRoomHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddRoomHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddSubjectTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddSubjectTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddSubjectHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddSubjectHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddExamTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddExamTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddExamHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddExamHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}

&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/8712239664979157551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-gestion-school-with-spring_51.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/8712239664979157551'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/8712239664979157551'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-gestion-school-with-spring_51.html' title='Building management school with Spring boot &amp; Angular Pt 3'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/r2F4_kj371A/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-2679999843693646709</id><published>2022-01-18T03:45:00.016-08:00</published><updated>2022-08-26T08:50:44.073-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Spring boot"/><title type='text'>Building gestion school with Spring boot &amp; Angular Pt 2</title><content type='html'>&lt;h1 style=&quot;background: none 0% 0% repeat scroll rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Spring Boot&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/07/k0kp.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;406&quot; data-original-width=&quot;800&quot; src=&quot;https://zupimages.net/up/21/07/k0kp.png&quot; style=&quot;border: 1px solid;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr /&gt;

&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;r2F4_kj371A&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/r2F4_kj371A&quot;&gt;&lt;/iframe&gt;

&lt;h1&gt; Build an application enterprise with Spring boot and Angular use Jpa&lt;/h1&gt;

&lt;p&gt;
In this part we will continue with Repositories and Services
&lt;/p&gt;

&lt;p&gt;When using &lt;b style=&quot;color: purple;&quot;&gt;Spring Data JPA&lt;/b&gt; to implement the persistence layer, the repository typically returns one or more instances of the root class. However, more often than not, we don&#39;t need all the properties of the returned objects.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;In such cases, it may be desirable to retrieve data as objects of customized types. &lt;b&gt;These types reflect partial views of the root class, containing only properties we care about&lt;/b&gt;. This is where projections come in handy.&lt;/p&gt;
&lt;h2&gt;We need to create these interface dao &lt;/h2&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; ActivityDao.java&lt;/p&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; CoefficientDao.java&lt;/p&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; CourseDao.java&lt;/p&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; ExamDao.java&lt;/p&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; LevelDao.java&lt;/p&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; ManagerDao.java&lt;/p&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; NoteDao.java&lt;/p&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; ProgramDao.java&lt;/p&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; RoomDao.java&lt;/p&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; SchoolDao.java&lt;/p&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; SchoolingDao.java&lt;/p&gt;
 &lt;p class=&quot;sub-title&quot;&gt;-&gt; SubjectDao.java&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an interface ActivityDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/ActivityDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyActivityDao(selectActivityDao)&quot; id=&quot;idBtnActivityDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectActivityDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Activity;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ActivityDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Activity, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface CoefficientDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/CoefficientDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCoefficientDao(selectCoefficientDao)&quot; id=&quot;idBtnCoefficientDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCoefficientDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Coefficient;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; CoefficientDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Coefficient, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface CourseDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/CourseDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCourseDao(selectCourseDao)&quot; id=&quot;idBtnCourseDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCourseDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Course;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; CourseDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Course, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface ExamDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/ExamDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyExamDao(selectExamDao)&quot; id=&quot;idBtnExamDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectExamDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Exam;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ExamDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Exam, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface LevelDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/LevelDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyLevelDao(selectLevelDao)&quot; id=&quot;idBtnLevelDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLevelDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Level;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; LevelDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Level, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface ManagerDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/ManagerDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyManagerDao(selectManagerDao)&quot; id=&quot;idBtnManagerDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectManagerDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Manager;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ManagerDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Manager, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface NoteDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/NoteDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyNoteDao(selectNoteDao)&quot; id=&quot;idBtnNoteDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNoteDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Note;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; NoteDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Note, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface ProgramDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/ProgramDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyProgramDao(selectProgramDao)&quot; id=&quot;idBtnProgramDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProgramDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Program;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ProgramDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Program, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface RoomDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/RoomDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyRoomDao(selectRoomDao)&quot; id=&quot;idBtnRoomDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectRoomDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Room;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; RoomDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Room, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface SchoolDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/SchoolDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySchoolDao(selectSchoolDao)&quot; id=&quot;idBtnSchoolDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchoolDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.School;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Room;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; SchoolDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;School, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface SchoolingDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/SchoolingDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySchoolingDao(selectSchoolingDao)&quot; id=&quot;idBtnSchoolingDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchoolingDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.School;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Schooling;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; SchoolingDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Schooling, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface SubjectDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/dao/SubjectDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySubjectDao(selectSubjectDao)&quot; id=&quot;idBtnSubjectDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSubjectDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.School;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Subject;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; SubjectDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Subject, Long&gt;{

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;h2 class=&quot;h2-title&quot;&gt;The services&lt;/h2&gt;
&lt;p&gt;Service Components are the class file which contains @Service annotation. These class files are used to write business logic in a different layer, separated from @RestController class file. The logic for creating a service component class file is shown here &lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;We will create these interfaces in service package:&lt;/h2&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; ActivityService.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; CoefficientService.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; CourseService.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; ExamService.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; LevelService.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; ManagerService.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; NoteService.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; ProgramService.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; RoomService.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; SchoolService.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; SchoolingService.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; SubjectService.java&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an interface ActivityService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/ActivityService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyActivityService(selectActivityService)&quot; id=&quot;idBtnActivityService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectActivityService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Activity;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ActivityService {
	
  Activity addActivity(Activity activity, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
  Activity editActivity(Activity activity, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
  Activity findActivity(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
  &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteActivity(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
  List&amp;lt;Activity&gt; findActivitiesForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface CoefficientService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/CoefficientService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCoefficientService(selectCoefficientService)&quot; id=&quot;idBtnCoefficientService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCoefficientService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Coefficient;

@Service
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; CoefficientService {
	
 Coefficient addCoefficient(Coefficient coefficient, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Coefficient editCoefficient(Coefficient coefficient, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Coefficient findCoefficient(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteCoefficient(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface CourseService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/CourseService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCourseService(selectCourseService)&quot; id=&quot;idBtnCourseService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCourseService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Course;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; CourseService {

 Course addCourse(Course &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;);
	
 Course editCourse(Course &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idCourse&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;);
	
 Course findCourse(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteCourse(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idCourse&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;);
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface ExamService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/ExamService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copy(select)&quot; id=&quot;idBtn&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;select&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Exam;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ExamService {

 Exam addExam(Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSchool&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;  &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;);
	
 Exam editExam(Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Exam findExam(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteExam(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;);
	
 List&amp;lt;Exam&gt; findExamsForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface LevelService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/LevelService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyLevelService(selectLevelService)&quot; id=&quot;idBtnLevelService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLevelService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Level;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; LevelService {
	
 Level addLevel(Level &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Level editLevel(Level &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Level findLevel(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Level findLevelForRoom(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteLevel(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; addLevelToRoom(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;);
	
 List&amp;lt;Level&gt; findLevels();
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteLevelFromRoom(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;);
	
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface ManagerService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/ManagerService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyManagerService(selectManagerService)&quot; id=&quot;idBtnManagerService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectManagerService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Manager;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ManagerService {

 Manager addManager(Manager &lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Manager editManager(Manager &lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Manager findManager(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Manager findManagerForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteManager(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSchhol&lt;/span&gt;);
 
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface NoteService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/NoteService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyNoteService(selectNoteService)&quot; id=&quot;idBtnNoteService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNoteService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Note;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; NoteService {
	
 Note addNote(Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Note editNote(Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Note findNote(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteNote(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface ProgramService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/ProgramService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyProgramService(selectProgramService)&quot; id=&quot;idBtnProgramService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProgramService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Program;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ProgramService {

 Program addProgram(Program &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Program editProgram(Program &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Program findProgram(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteProgram(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface RoomService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/RoomService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyRoomService(selectRoomService)&quot; id=&quot;idBtnRoomService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectRoomService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Room;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; RoomService {
	
 Room addRoom(Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Room editRoom(Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Room findRoom(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteRoom(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;Room&gt; findRoomsForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface SchoolService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/SchoolService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySchoolService(selectSchoolService)&quot; id=&quot;idBtnSchoolService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchoolService&quot;&gt;
 
&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.School;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; SchoolService {
	
 School addSchool(School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;);
	
 School editSchool(School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 School findSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;School&gt; findSchools();

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface SchoolingService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/SchoolingService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySchoolingService(selectSchoolingService)&quot; id=&quot;idBtnSchoolingService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchoolingService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Schooling;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; SchoolingService {
	
 Schooling addSchooling(Schooling &lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Schooling editSchooling(Schooling &lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Schooling findSchooling(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteSchooling(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;Schooling&gt; findSchoolingsForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface SubjectService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/service/SubjectService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySubjectService(selectSubjectService)&quot; id=&quot;idBtnSubjectService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSubjectService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Subject;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; SubjectService {

 Subject addSubject(Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSchool&lt;/span&gt;);
	
 Subject editSubject(Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Subject findSubject(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Subject findSubjectForExam(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Subject findSubjectForCourse(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteSubject(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;Subject&gt; findAllSubjectsForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;Subject&gt; findSubjectsForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;The managers classes implementation&lt;/h2&gt;
&lt;p&gt;An impl class is usually a class that implements the behaviour described by one of these interfaces. While the internal implementation class,  With transactions configured, we can now annotation a bean with &lt;b&gt;@Transactional&lt;/b&gt; and &lt;b&gt;@Service&lt;/b&gt; either at the class or method level. Then conversion Entity to DTO. This is stands for Data Transfer Object and is a simple Plain Old Java Object which contains class properties and getters and settings methods for accessing those properties.&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;We will create these class in the impl package &lt;/h2&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; ActivityServiceImpl.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; CoefficientServiceImpl.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; CourseServiceImpl.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; ExamServiceImpl.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; LevelServiceImpl.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; ManagerServiceImpl.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; NoteServiceImpl.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; ProgramServiceImpl.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; RoomServiceImpl.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; SchoolServiceImpl.java&lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; SchoolingServiceImpl.java &lt;/p&gt;
  &lt;p class=&quot;sub-title&quot;&gt;-&gt; SubjectServiceImpl.java&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating a class ActivityServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/ActivityServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyActivityServiceImpl(selectActivityServiceImpl)&quot; id=&quot;idBtnActivityServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectActivityServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.transaction.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.ActivityDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SchoolDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Activity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.School;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.ActivityService;

&lt;span style=&quot;color: #8a8787;&quot;&gt; @Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ActivityServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; ActivityService {
	
   &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
   &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ActivityDao &lt;span style=&quot;color: #0984e3;&quot;&gt;activityDao&lt;/span&gt;;
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
    &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SchoolDao &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Activity addActivity(Activity &lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;,  &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.addActivity(&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;);
		&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;.setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;activityDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Activity editActivity(Activity &lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;,  &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Activity &lt;span style=&quot;color: #82590f;&quot;&gt;existActivity&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;activityDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existActivity&lt;/span&gt;.setType(&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;.getType());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existActivity&lt;/span&gt;.setDay(&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;.getDay());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existActivity&lt;/span&gt;.setStartDate(&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;.getStartDate());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existActivity&lt;/span&gt;.setEndDate(&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;.getEndDate());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existActivity&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;.getDescription());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existActivity&lt;/span&gt;.setDate(&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;.getDate());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;activityDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existActivity&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Activity findActivity( &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;activityDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteActivity( &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		 &lt;span style=&quot;color: #0984e3;&quot;&gt;activityDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Activity&gt; findActivitiesForSchool( &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;activityDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getActivities();
	}

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class CoefficientServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/CoefficientServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCoefficientServiceImpl(selectCoefficientServiceImpl)&quot; id=&quot;idBtnCoefficientServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCoefficientServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.CoefficientDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.ProgramDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Coefficient;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Program;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.CoefficientService;

&lt;span style=&quot;color: #8a8787;&quot;&gt; @Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CoefficientServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; CoefficientService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CoefficientDao &lt;span style=&quot;color: #0984e3;&quot;&gt;coefficientDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ProgramDao &lt;span style=&quot;color: #0984e3;&quot;&gt;programDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Coefficient addCoefficient(Coefficient &lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt; id&lt;/span&gt;) {
		Program &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;programDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;.setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
	     &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;.addCoefficient(&lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;);
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;coefficientDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Coefficient editCoefficient(Coefficient &lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt; id&lt;/span&gt;) {
		Coefficient &lt;span style=&quot;color: #82590f;&quot;&gt;existCoefficient&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;coefficientDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existCoefficient&lt;/span&gt;.setGrade(&lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;.getGrade());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existCoefficient&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;.getDescription());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;coefficientDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existCoefficient&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Coefficient findCoefficient(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt; id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;coefficientDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteCoefficient(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt; id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;coefficientDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);		
	}
		
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class CourseServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/CourseServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCourseServiceImpl(selectCourseServiceImpl)&quot; id=&quot;idBtnCourseServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCourseServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.CourseDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.LevelDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SubjectDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Course;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Level;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Subject;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.CourseService;

&lt;span style=&quot;color: #8a8787;&quot;&gt; @Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CourseServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; CourseService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CourseDao &lt;span style=&quot;color: #0984e3;&quot;&gt;courseDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; LevelDao &lt;span style=&quot;color: #0984e3;&quot;&gt;levelDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SubjectDao &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Course addCourse(Course &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;) {
		Level &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;levelDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;).get();
		Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt; = subjectDao.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;.setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
		&lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;.addCourse(course);
		&lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;.setSubject(subject);
		&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;.setCourse(&lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;);
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;courseDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Course editCourse(Course &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idCourse&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;) {
		Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;).get();
		Course &lt;span style=&quot;color: #82590f;&quot;&gt;existsCourse&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;courseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idCourse&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existsCourse&lt;/span&gt;.setDate(&lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;.getDate());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existsCourse&lt;/span&gt;.setStartDate(&lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;.getStartDate());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existsCourse&lt;/span&gt;.setEndDate(&lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;.getEndDate());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existsCourse&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;.getDescription());
		&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;.setCourse(&lt;span style=&quot;color: #82590f;&quot;&gt;existsCourse&lt;/span&gt;);
		&lt;span style=&quot;color: #82590f;&quot;&gt;existsCourse&lt;/span&gt;.setSubject(&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;);
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;courseDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existsCourse&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Course findCourse(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;courseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteCourse(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idCourse&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;) {
		Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt; = subjectDao.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;).get();
		Course &lt;span style=&quot;color: #82590f;&quot;&gt;existsCourse&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;courseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idCourse&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;.setCourse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
		&lt;span style=&quot;color: #82590f;&quot;&gt;existsCourse&lt;/span&gt;.setSubject(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
		&lt;span style=&quot;color: #0984e3;&quot;&gt;courseDao&lt;/span&gt;.delete(&lt;span style=&quot;color: #82590f;&quot;&gt;existsCourse&lt;/span&gt;);	
	}
	
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class ExamServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/ExamServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyExamServiceImpl(selectExamServiceImpl)&quot; id=&quot;idBtnExamServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectExamServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.ExamDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SubjectDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SchoolDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Exam;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Subject;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.School;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.ExamService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ExamServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; ExamService {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ExamDao &lt;span style=&quot;color: #0984e3;&quot;&gt;examDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SchoolDao &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SubjectDao &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Exam addExam(Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSchool&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idSchool&lt;/span&gt;).get();
		Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;.setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
		&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.addExam(&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;);
		&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;.setSubject(&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;);
		&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;.setExam(&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;);
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;examDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Exam editExam(Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Exam &lt;span style=&quot;color: #82590f;&quot;&gt;existExam&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;examDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existExam&lt;/span&gt;.setDate(&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;.getDate());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existExam&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;.getDescription());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existExam&lt;/span&gt;.setStart(&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;.getStart());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existExam&lt;/span&gt;.setEnd(&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;.getEnd());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;examDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existExam&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Exam findExam(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;examDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteExam(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; id, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;) {
		Exam &lt;span style=&quot;color: #82590f;&quot;&gt;existExam&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;examDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existExam&lt;/span&gt;.setSubject(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
		&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;.setExam(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
		&lt;span style=&quot;color: #0984e3;&quot;&gt;examDao&lt;/span&gt;.delete(&lt;span style=&quot;color: #82590f;&quot;&gt;existExam&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Exam&gt; findExamsForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getExams();
	}

}
 

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class LevelServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/LevelServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyLevelServiceImpl(selectLevelServiceImpl)&quot; id=&quot;idBtnLevelServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLevelServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.LevelDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.RoomDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SchoolingDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Level;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Room;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Schooling;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.LevelService;

&lt;span style=&quot;color: #8a8787;&quot;&gt; @Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; LevelServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; LevelService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; LevelDao &lt;span style=&quot;color: #0984e3;&quot;&gt;levelDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SchoolingDao &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; RoomDao &lt;span style=&quot;color: #0984e3;&quot;&gt;roomDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Level addLevel(Level level, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Schooling &lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;.setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
		&lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;.addLevel(level);
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;levelDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Level editLevel(Level level, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Level &lt;span style=&quot;color: #82590f;&quot;&gt;existLevel&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;levelDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existLevel&lt;/span&gt;.setLabel(&lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;.getLabel());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existLevel&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;.getDescription());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;levelDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existLevel&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Level findLevel(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		return &lt;span style=&quot;color: #0984e3;&quot;&gt;levelDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteLevel(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;levelDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);	
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; addLevelToRoom(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;) {
		Level &lt;span style=&quot;color: #82590f;&quot;&gt;existLevel&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;levelDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;).get();
		Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;roomDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existLevel&lt;/span&gt;.setRoom(&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;);
		&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;.setLevel(&lt;span style=&quot;color: #82590f;&quot;&gt;existLevel&lt;/span&gt;);
	}


 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Level&gt; findLevels() {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;levelDao&lt;/span&gt;.findAll();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteLevelFromRoom(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;) {
		Level &lt;span style=&quot;color: #82590f;&quot;&gt;existLevel&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;levelDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;).get();
		Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;roomDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existLevel&lt;/span&gt;.setRoom(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
		&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;.setLevel(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Level findLevelForRoom(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;) {
		Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;roomDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;).get();
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;.getLevel();
	}
}
 

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class ManagerServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/ManagerServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyManagerServiceImpl(selectManagerServiceImpl)&quot; id=&quot;idBtnManagerServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectManagerServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.transaction.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.ManagerDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SchoolDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Manager;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.School;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.ManagerService;

&lt;span style=&quot;color: #8a8787;&quot;&gt; @Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ManagerServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; ManagerService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ManagerDao &lt;span style=&quot;color: #0984e3;&quot;&gt;managerDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SchoolDao &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Manager addManager(Manager &lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;.setSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;);
		&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.setManager(&lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;);
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;managerDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Manager editManager(Manager &lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Manager &lt;span style=&quot;color: #82590f;&quot;&gt;existManager&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;managerDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existManager&lt;/span&gt;.setFirstName(&lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;.getFirstName());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existManager&lt;/span&gt;.setLastName(&lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;.getLastName());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;managerDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existManager&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Manager findManager(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;managerDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteManager(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idSchool&lt;/span&gt;) {
	   School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idSchhol&lt;/span&gt;).get();
	   &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.setManager(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
       &lt;span style=&quot;color: #0984e3;&quot;&gt;managerDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);	
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Manager findManagerForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getManager();
	}

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class NoteServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/NoteServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyNoteServiceImpl(selectNoteServiceImpl)&quot; id=&quot;idBtnNoteServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNoteServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.ExamDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.NoteDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Exam;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Note;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.NoteService;

&lt;span style=&quot;color: #8a8787;&quot;&gt; @Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; NoteServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; NoteService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; NoteDao &lt;span style=&quot;color: #0984e3;&quot;&gt;noteDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ExamDao &lt;span style=&quot;color: #0984e3;&quot;&gt;examDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Note addNote(Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;examDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;.setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
		&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;.addNote(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;);
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;noteDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Note editNote(Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Note &lt;span style=&quot;color: #82590f;&quot;&gt;existNote&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;noteDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existNote&lt;/span&gt;.setScore(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;.getScore());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existNote&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;.getDescription());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;noteDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existNote&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Note findNote(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;noteDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteNote(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;noteDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}	

}


&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class ProgramServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/ProgramServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyProgramServiceImpl(selectProgramServiceImpl)&quot; id=&quot;idBtnProgramServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProgramServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SubjectDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.ProgramDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Subject;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Program;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.ProgramService;

&lt;span style=&quot;color: #8a8787;&quot;&gt; @Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ProgramServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; ProgramService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ProgramDao &lt;span style=&quot;color: #0984e3;&quot;&gt;programDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SubjectDao &lt;span style=&quot;color: #0984e3;&quot;&gt;matterDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Program addProgram(Program &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Subject &lt;span style=&quot;color: #82590f;&quot;&gt;matter&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;matterDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;.setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
		&lt;span style=&quot;color: #82590f;&quot;&gt;matter&lt;/span&gt;.addProgram(&lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;);
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;programDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Program editProgram(Program &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
	   Program &lt;span style=&quot;color: #82590f;&quot;&gt;existProgram&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;programDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	   &lt;span style=&quot;color: #82590f;&quot;&gt;existProgram&lt;/span&gt;.setName(&lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;.getName());
	   &lt;span style=&quot;color: #82590f;&quot;&gt;existProgram&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;.getDescription());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;programDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existProgram&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Program findProgram(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;programDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteProgram(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
        &lt;span style=&quot;color: #0984e3;&quot;&gt;programDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class RoomServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/RoomServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyRoomServiceImpl(selectRoomServiceImpl)&quot; id=&quot;idBtnRoomServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectRoomServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.LevelDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.RoomDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SchoolDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Level;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Room;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.School;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.RoomService;

&lt;span style=&quot;color: #8a8787;&quot;&gt; @Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; RoomServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; RoomService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; RoomDao &lt;span style=&quot;color: #0984e3;&quot;&gt;roomDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SchoolDao &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Room addRoom(Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;.setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
		&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.addRoom(&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;);
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;roomDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Room editRoom(Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Room &lt;span style=&quot;color: #82590f;&quot;&gt;existRoom&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;roomDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existRoom&lt;/span&gt;.setCode(&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;.getCode());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existRoom&lt;/span&gt;.setCapacity(&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;.getCapacity());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existRoom&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;.getDescription());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;roomDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existRoom&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Room findRoom(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;roomDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteRoom(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;roomDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Room&gt; findRoomsForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getRooms();
	}

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class SchoolServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/SchoolServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySchoolServiceImpl(selectSchoolServiceImpl)&quot; id=&quot;idBtnSchoolServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchoolServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SchoolDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.School;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.SchoolService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; SchoolServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; SchoolService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SchoolDao &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; School addSchool(School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;) {
		&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; School editSchool(School school, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;existSchool&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existSchool&lt;/span&gt;.setName(&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getName());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existSchool&lt;/span&gt;.setCity(&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getCity());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existSchool&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getDescription());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existSchool&lt;/span&gt;.setOpen(&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getOpen());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existSchool&lt;/span&gt;.setClose(&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getClose());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existSchool&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; School findSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;School&gt; findSchools() {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findAll();
	}

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class SchoolingServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/SchoolingServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySchoolingServiceImpl(selectSchoolingServiceImpl)&quot; id=&quot;idBtnSchoolingServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchoolingServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SchoolDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SchoolingDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.School;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Schooling;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.SchoolingService;

&lt;span style=&quot;color: #8a8787;&quot;&gt; @Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; SchoolingServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; SchoolingService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SchoolingDao &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SchoolDao &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Schooling addSchooling(Schooling &lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.addSchooling(&lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;);
		&lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;.setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Schooling editSchooling(Schooling schooling, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Schooling &lt;span style=&quot;color: #82590f;&quot;&gt;existSchooling&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existSchooling&lt;/span&gt;.setYear(&lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;.getYear());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existSchooling&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;.getDescription());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existSchooling&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Schooling findSchooling(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteSchooling(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);		
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Schooling&gt; findSchoolingsForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getSchoolings();
	}

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class SubjectServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/impl/SubjectServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySubjectServiceImpl(selectSubjectServiceImpl)&quot; id=&quot;idBtnSubjectServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSubjectServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SubjectDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.CourseDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.ExamDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.dao.SchoolDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Subject;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Course;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Exam;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.School;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.SubjectService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Component
@Transactional &lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; SubjectServiceImpl implements SubjectService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SubjectDao &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SchoolDao &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ExamDao &lt;span style=&quot;color: #0984e3;&quot;&gt;examDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CourseDao &lt;span style=&quot;color: #0984e3;&quot;&gt;courseDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Subject addSubject(Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idSchool&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idSchool&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;.setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
		&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.addSubject(&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;);
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectDao&lt;/span&gt;.save(subject);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Subject editSubject(Subject subject, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Subject &lt;span style=&quot;color: #82590f;&quot;&gt;existSubject&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;span style=&quot;color: #82590f;&quot;&gt;existSubject&lt;/span&gt;.setName(&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;.getName());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existSubject&lt;/span&gt;.setColor(&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;.getColor());
		&lt;span style=&quot;color: #82590f;&quot;&gt;existSubject&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;.getDescription());
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existSubject&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Subject findSubject(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteSubject(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;subjectDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Subject&gt; findAllSubjectsForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getSubjects();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Subject findSubjectForExam(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;examDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;.getSubject();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Subject findSubjectForCourse(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		Course &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;courseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;.getSubject();
	}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Subject&gt; findSubjectsForSchool(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;.getSubjects();
	}
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;@RestController API&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;@RestController&lt;/b&gt; is a convenience annotation for creating Restful controllers. It is a specialization of @Component and is autodetected through classpath scanning. It adds the @Controller and @ResponseBody annotations. It converts the response to JSON or XML. It does not work with the view technology, so the methods cannot return ModelAndView. It is typically used in combination with annotated handler methods based on the @RequestMapping annotation.&lt;/p&gt;&lt;br/&gt;

&lt;h2&gt;We will create these class in controller package:&lt;/h2&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ActivityController.java&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CoefficientController.java&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CourseController.java&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ExamController.java&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; LevelController.java&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ManagerConntroller.java&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; NoteController.java&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ProgramController.java&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; RoomController.java&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; SchoolController.java&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; SchoolingController.java&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; SubjectController.java&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating a class ActivityController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/ActivityController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyActivityController(selectActivityController)&quot; id=&quot;idBtnActivityController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectActivityController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Activity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.ActivityService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ActivityController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ActivityService &lt;span style=&quot;color: #0984e3;&quot;&gt;activityService&lt;/span&gt;;

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addActivity/{id}&quot;&lt;/span&gt;)
	Activity addActivity(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Activity &lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;activityService&lt;/span&gt;.addActivity(&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editActivity/{id}&quot;&lt;/span&gt;)
	Activity editActivity(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Activity activity, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;activityService&lt;/span&gt;.editActivity(&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findActivity/{id}&quot;&lt;/span&gt;)
	Activity findActivity(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;activityService&lt;/span&gt;.findActivity(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteActivity/{id}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteActivity(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;activityService&lt;/span&gt;.deleteActivity(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findActivitiesForSchool/{id}&quot;&lt;/span&gt;)
	Listélt;Activity&gt; findActivitiesForSchool(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;activityService&lt;/span&gt;.findActivitiesForSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class CoefficientController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/CoefficientController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCoefficientController(selectCoefficientController)&quot; id=&quot;idBtnCoefficientController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCoefficientController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Coefficient;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.CoefficientService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CoefficientController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CoefficientService &lt;span style=&quot;color: #0984e3;&quot;&gt;coefficientService&lt;/span&gt;;

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addCoefficient/{id}&quot;&lt;/span&gt;)
	Coefficient addCoefficient(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Coefficient &lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;coefficientService&lt;/span&gt;.addCoefficient(&lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editCoefficient/{id}&quot;&lt;/span&gt;)
	Coefficient editCoefficient(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Coefficient &lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;coefficientService&lt;/span&gt;.editCoefficient(&lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findCoefficient/{id}&quot;&lt;/span&gt;)
	Coefficient findCoefficient(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;coefficientService&lt;/span&gt;.findCoefficient(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteCoefficient/{id}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteCoefficient(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;coefficientService&lt;/span&gt;.deleteCoefficient(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class CourseController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/CourseController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCourseController(selectCourseController)&quot; id=&quot;idBtnCourseController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCourseController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Course;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.CourseService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CourseController {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CourseService &lt;span style=&quot;color: #0984e3;&quot;&gt;courseService&lt;/span&gt;;

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addCourse/{idLevel}/{idSubject}&quot;&lt;/span&gt;)
	Course addCourse(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Course &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;courseService&lt;/span&gt;.addCourse(&lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editCourse/{idCourse}/{idSubject}&quot;&lt;/span&gt;)
	Course editCourse(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Course &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idCourse&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;courseService&lt;/span&gt;.editCourse(&lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idCourse&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findCourse/{id}&quot;&lt;/span&gt;)
	Course findCourse(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;courseService&lt;/span&gt;.findCourse(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteCourse/{idCourse}/{idSubject}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteCourse(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idCourse&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;courseService&lt;/span&gt;.deleteCourse(&lt;span style=&quot;color: #82590f;&quot;&gt;idCourse&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;);
	}

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class ExamController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/ExamController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyExamController(selectExamController)&quot; id=&quot;idBtnExamController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectExamController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Exam;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.ExamService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ExamController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ExamService &lt;span style=&quot;color: #0984e3;&quot;&gt;examService&lt;/span&gt;;

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addExam/{idSchool}/{idSubject}&quot;&lt;/span&gt;)
	Exam addExam(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idSchool&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;examService&lt;/span&gt;.addExam(&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idSchool&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editExam/{id}&quot;&lt;/span&gt;)
	Exam editExam(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;examService&lt;/span&gt;.editExam(&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findExam/{id}&quot;&lt;/span&gt;)
	Exam findExam(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;examService&lt;/span&gt;.findExam(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteExam/{id}/{idSubject}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteExam(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;examService&lt;/span&gt;.deleteExam(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idSubject&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findExamsForSchool/{id}&quot;&lt;/span&gt;)
	List&amp;lt;Exam&gt; findExamsForSchool(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;examService&lt;/span&gt;.findExamsForSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class LevelController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/LevelController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyLevelController(selectLevelController)&quot; id=&quot;idBtnLevelController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLevelController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Level;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.LevelService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; LevelController {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; LevelService &lt;span style=&quot;color: #0984e3;&quot;&gt;levelService&lt;/span&gt;;
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addLevel/{id}&quot;&lt;/span&gt;)
	Level addLevel(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Level &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;levelService&lt;/span&gt;.addLevel(&lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editLevel/{id}&quot;&lt;/span&gt;)
	Level editLevel(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Level &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;levelService&lt;/span&gt;.editLevel(&lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findLevel/{id}&quot;&lt;/span&gt;)
	Level findLevel(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;levelService&lt;/span&gt;.findLevel(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteLevel/{id}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteLevel(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;levelService&lt;/span&gt;.deleteLevel(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addLevelToRoom/{idRoom}/{idLevel}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; addLevelToRoom(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;levelService&lt;/span&gt;.addLevelToRoom(&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findLevels&quot;&lt;/span&gt;)
	List&amp;lt;Level&gt; findLevels() {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;levelService&lt;/span&gt;.findLevels();
	}
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteLevelFromRoom/{idRoom}/{idLevel}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteLevelFromRoom(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;)  {
	    &lt;span style=&quot;color: #0984e3;&quot;&gt;levelService&lt;/span&gt;.deleteLevelFromRoom(&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idLevel&lt;/span&gt;);
	}
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findLevelForRoom/{idRoom}&quot;&lt;/span&gt;)
	Level findLevelForRoom(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;levelService&lt;/span&gt;.findLevelForRoom(&lt;span style=&quot;color: #82590f;&quot;&gt;idRoom&lt;/span&gt;);
	}
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class ManagerConntroller&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/ManagerConntroller.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyManagerConntroller(selectManagerConntroller)&quot; id=&quot;idBtnManagerConntroller&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectManagerConntroller&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Manager;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.ManagerService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ManagerConntroller {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ManagerService &lt;span style=&quot;color: #0984e3;&quot;&gt;managerService&lt;/span&gt;;

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addManager/{id}&quot;&lt;/span&gt;)
	Manager addManager(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Manager &lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;managerService&lt;/span&gt;.addManager(&lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editManager/{id}&quot;&lt;/span&gt;)
	Manager editManager(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Manager &lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;managerService&lt;/span&gt;.editManager(&lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findManager/{id}&quot;&lt;/span&gt;)
	Manager findManager(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;managerService&lt;/span&gt;.findManager(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findManagerForSchool/{id}&quot;&lt;/span&gt;)
	Manager findManagerForSchool(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;managerService&lt;/span&gt;.findManagerForSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteManager/{id}/{idSchhol}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteManager(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;idSchool&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;managerService&lt;/span&gt;.deleteManager(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idSchhol&lt;/span&gt;);
	}

}


&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class NoteController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/NoteController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyNoteController(selectNoteController)&quot; id=&quot;idBtnNoteController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNoteController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Note;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.NoteService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; NoteController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; NoteService &lt;span style=&quot;color: #0984e3;&quot;&gt;noteService&lt;/span&gt;;

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;/addNote/{id}&quot;&lt;/span&gt;)
	Note addNote(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;noteService&lt;/span&gt;.addNote(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;/editNote/{id}&quot;&lt;/span&gt;)
	Note editNote(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;noteService&lt;/span&gt;.editNote(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;/findNote/{id}&quot;&lt;/span&gt;)
	Note findNote(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;noteService&lt;/span&gt;.findNote(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;/deleteNote/{id}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteNote(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;noteService&lt;/span&gt;.deleteNote(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class ProgramController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/ProgramController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyProgramController(selectProgramController)&quot; id=&quot;idBtnProgramController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProgramController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Program;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.ProgramService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ProgramController {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ProgramService &lt;span style=&quot;color: #0984e3;&quot;&gt;programService&lt;/span&gt;;
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addProgram/{id}&quot;&lt;/span&gt;)
	Program addProgram(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Program &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;programService&lt;/span&gt;.addProgram(&lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editProgram/{id}&quot;&lt;/span&gt;)
	Program editProgram(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Program &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;programService&lt;/span&gt;.editProgram(&lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findProgram/{id}&quot;&lt;/span&gt;)
	Program findProgram(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;programService&lt;/span&gt;.findProgram(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteProgram/{id}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteProgram(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;programService&lt;/span&gt;.deleteProgram(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class RoomController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/RoomController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyRoomController(selectRoomController)&quot; id=&quot;idBtnRoomController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectRoomController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Room;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.RoomService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; RoomController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; RoomService &lt;span style=&quot;color: #0984e3;&quot;&gt;roomService&lt;/span&gt;;

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addRoom/{id}&quot;&lt;/span&gt;)
	Room addRoom(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;roomService&lt;/span&gt;.addRoom(&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editRoom/{id}&quot;&lt;/span&gt;)
	Room editRoom(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;roomService&lt;/span&gt;.editRoom(&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findRoom/{id}&quot;&lt;/span&gt;)
	Room findRoom(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;roomService&lt;/span&gt;.findRoom(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteRoom/{id}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteRoom(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;roomService&lt;/span&gt;.deleteRoom(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findRoomsForSchool/{id}&quot;&lt;/span&gt;)
	List&amp;lt;Room&gt; findRoomsForSchool(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;roomService&lt;/span&gt;.findRoomsForSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class SchoolController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/SchoolController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySchoolController(selectSchoolController)&quot; id=&quot;idBtnSchoolController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchoolController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.School;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.SchoolService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; SchoolController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SchoolService &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolService&lt;/span&gt;;

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addSchool&quot;&lt;/span&gt;)
	School addSchool(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolService&lt;/span&gt;.addSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editSchool/{id}&quot;&lt;/span&gt;)
	School editSchool(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolService&lt;/span&gt;.editSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findSchool/{id}&quot;&lt;/span&gt;)
	School findSchool(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolService&lt;/span&gt;.findSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteSchool/{id}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteSchool(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;schoolService&lt;/span&gt;.deleteSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findSchools&quot;&lt;/span&gt;)
	List&amp;lt;School&gt; findSchools() {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolService&lt;/span&gt;.findSchools();
	}

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class SchoolingController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/SchoolingController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySchoolingController(selectSchoolingController)&quot; id=&quot;idBtnSchoolingController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchoolingController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Schooling;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.SchoolingService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; SchoolingController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SchoolingService &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingService&lt;/span&gt;;

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addSchooling/{id}&quot;&lt;/span&gt;)
	Schooling addSchooling(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Schooling &lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingService&lt;/span&gt;.addSchooling(&lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editSchooling/{id}&quot;&lt;/span&gt;)
	Schooling editSchooling(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Schooling schooling, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingService&lt;/span&gt;.editSchooling(&lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findSchooling/{id}&quot;&lt;/span&gt;)
	Schooling findSchooling(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingService&lt;/span&gt;.findSchooling(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteSchooling/{id}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteSchooling(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingService&lt;/span&gt;.deleteSchooling(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findSchoolingsForSchool/{id}&quot;&lt;/span&gt;)
	List&amp;lt;Schooling&gt; findSchoolingsForSchool(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolingService&lt;/span&gt;.findSchoolingsForSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class SubjectController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/controller/SubjectController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySubjectController(selectSubjectController)&quot; id=&quot;idBtnSubjectController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSubjectController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.modal.Subject;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.school.service.SubjectService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; SubjectController {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; SubjectService &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectService&lt;/span&gt;;
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addSubject/{id}&quot;&lt;/span&gt;)
	Subject addSubject(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectService&lt;/span&gt;.addSubject(&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editSubject/{id}&quot;&lt;/span&gt;)
	Subject editSubject(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectService&lt;/span&gt;.editSubject(&lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findSubject/{id}&quot;&lt;/span&gt;)
	Subject findSubject(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectService&lt;/span&gt;.findSubject(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findSubjectForExam/{id}&quot;&lt;/span&gt;)
	Subject findSubjectForExam(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectService&lt;/span&gt;.findSubjectForExam(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteSubject/{id}&quot;&lt;/span&gt;)
	&lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteSubject(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;span style=&quot;color: #0984e3;&quot;&gt;subjectService&lt;/span&gt;.deleteSubject(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findAllSubjectsForSchool/{id}&quot;&lt;/span&gt;)
	List&amp;lt;Subject&gt; findAllSubjectsForSchool(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectService&lt;/span&gt;.findAllSubjectsForSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findSubjectForCourse/{id}&quot;&lt;/span&gt;)
	Subject findSubjectForCourse(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectService&lt;/span&gt;.findSubjectForCourse(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}
	
	&lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findSubjectsForSchool/{id}&quot;&lt;/span&gt;)
	List&amp;lt;Subject&gt; findSubjectsForSchool(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable &lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long &lt;/b&gt;&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
		&lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjectService&lt;/span&gt;.findSubjectsForSchool(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	}

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;SchoolApplication&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;@BookStoreApplication&lt;/b&gt; and its use in a simple Spring Boot application. We use the @SpringBootApplication annotation in our Application or Main class to enable a host of features, e.g. Java-based Spring configuration, component scanning, and in particular for enabling Spring &lt;/p&gt;&lt;br /&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/SchoolApplication.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySchoolApplication(selectSchoolApplication)&quot; id=&quot;idBtnSchoolApplication&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchoolApplication&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.shcool;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.boot.SpringApplication;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.boot.autoconfigure.SpringBootApplication;

&lt;span style=&quot;color: #8a8787;&quot;&gt;
@SpringBootApplication&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; SchoolApplication {

 &lt;b style=&quot;color: purple;&quot;&gt;public static void&lt;/b&gt; main(String[] &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;) {
   SpringApplication.run(SchoolApplication.&lt;b style=&quot;color: purple;&quot;&gt;class&lt;/b&gt;, &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;);		
   System.&lt;b style=&quot;color: blue;&quot;&gt;out&lt;/b&gt;.println(&lt;span style=&quot;color: blue;&quot;&gt;&quot;App started....&quot;&lt;/span&gt;);
  }
  
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Spring Boot example when building a @RestController API.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp; Spring Data JPA, as well, we are gooing to continue with Angular project structure for building a front-end app to make HTTP requests and consume responses.&lt;/p&gt;&lt;br&gt;&lt;br&gt;


&lt;div style=&quot;background: none 0% 0% repeat scroll rgb(255, 118, 0); border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring.html&quot;&gt;Building application School with Spring boot and Angular Part 3&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: #fff; border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/school-spring&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download This Application My School From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;


&lt;style&gt;
pre:before {
   content: none;
}
pre {
background: #ddd;
line-height: 20px;
position: relative;
overflow: auto;
width: 100%;
border: 1px solid #d0c6c6;
}
  
code {
 padding: 0px 0px 0 20px;
 display: block; 
 color: #000; 
 font-family: monospace; 
 font-size: 16px;
 margin-top: -30px;
}
  .h2-title {
   background: #10ac84; 
   border-left: 10px solid; 
   padding: 10px !important;
  } 
    .h3-title {
   background: #01a3a4; 
   padding: 10px !important;
   margin-bottom: -16px !important;
  }
 pre div::selection,
 b::selection,
 code::selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
   padding: 0px 16px;
}
pre div::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
  padding: 0px 16px;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
&lt;/style&gt;


&lt;script&gt;

  function copyActivityDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnActivityDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCoefficientDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCoefficientDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCourseDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCourseDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyExamDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnExamDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLevelDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLevelDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyManagerDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnManagerDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyNoteDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNoteDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProgramDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProgramDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyRoomDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnRoomDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySchoolDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchoolDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySchoolingDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchoolingDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySubjectDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSubjectDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyActivityService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnActivityService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCoefficientService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCoefficientService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCourseService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCourseService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyExamService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnExamService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLevelService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLevelService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyManagerService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnManagerService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyNoteService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNoteService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProgramService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProgramService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyRoomService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnRoomService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySchoolService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchoolService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySchoolingService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchoolingService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySubjectService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSubjectService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyActivityServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnActivityServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCoefficientServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCoefficientServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCourseServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCourseServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyExamServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnExamServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLevelServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLevelServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyManagerServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnManagerServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyNoteServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNoteServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProgramServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProgramServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyRoomServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnRoomServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySchoolServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchoolServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySchoolingServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchoolingServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySubjectServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSubjectServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyActivityController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnActivityController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCoefficientController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCoefficientController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCourseController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCourseController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyExamController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnExamController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLevelController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLevelController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyManagerConntroller(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnManagerConntroller&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyNoteController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNoteController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyProgramController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProgramController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyRoomController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnRoomController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copySchoolController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchoolController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copySchoolingController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchoolingController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copySubjectController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSubjectController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copySchoolApplication(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchoolApplication&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/2679999843693646709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-gestion-school-with-spring_18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/2679999843693646709'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/2679999843693646709'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-gestion-school-with-spring_18.html' title='Building gestion school with Spring boot &amp; Angular Pt 2'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/r2F4_kj371A/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-3930703744449866689</id><published>2022-01-18T03:44:00.017-08:00</published><updated>2022-08-26T08:53:08.120-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Spring boot"/><title type='text'>Building gestion school with Spring boot &amp; Angular</title><content type='html'>&lt;h1 style=&quot;background: rgb(255, 118, 0) none repeat scroll 0% 0%; border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Spring Boot&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/07/k0kp.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;406&quot; data-original-width=&quot;800&quot; src=&quot;https://zupimages.net/up/21/07/k0kp.png&quot; style=&quot;border: 1px solid;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr /&gt;

&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;r2F4_kj371A&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/r2F4_kj371A&quot;&gt;&lt;/iframe&gt;

&lt;h1&gt; Build an application enterprise with Spring boot and Angular use Jpa&lt;/h1&gt;

&lt;h2&gt;Objective:&lt;/h2&gt;
&lt;p&gt;
This tutoral is to develop a application of school management modules, such as the management of: Schools, activities, subjects, exams, rooms, schooling etc.... Using the different techniques and development tools mentioned.
&lt;/p&gt;
&lt;p&gt;
  As for the technical aspect, new technologies and good development practices have been used since Maven, which allows to create a standard tree of the code and its resources, to Framework &amp;amp; technologies: Hibernate / JPA, Spring, Spring security, JavaEE, Angular, Typescript... etc.
&lt;/p&gt;
&lt;br /&gt;

&lt;h2&gt;Used Skills in this project:&lt;/h2&gt;
&lt;p&gt;Java, SpringBoot, MicroServices, REST WebServices, JPA, Hibernate, MySQL Database, Maven, Angular, GitHub, SpringBoot Embedded Tomcat Server, STS-Eclipse IDE&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;Tools to be used&lt;/h2&gt;
&lt;p&gt; ° Use any IDE to develop the Spring and Hibernate project. It may be STS/Eclipse/Netbeans. Here, we are using STS (Spring Tool Suite). &lt;/p&gt;
&lt;p&gt; ° Mysql for the database.&lt;/p&gt;
&lt;p&gt; ° Use any IDE to develop the Angular project. It may be Visual Studio Code/Sublime. Here, we are using Visual Studio Code.&lt;/p&gt;
&lt;p&gt; ° Server: Apache Tomcat/JBoss/Glassfish/Weblogic/Websphere.&lt;/p&gt;


&lt;br /&gt;&lt;h2 class=&quot;h2-title&quot;&gt;Spring MVC&lt;/h2&gt;
&lt;p&gt;Spring MVC is the primary web framework built on the Servlet API. It is build on the popular MVC design pattern. MVC (Model-View-Controller) is a software architecture pattern, which separates application into three areas: model, view, and controller. The model represents a Java object carrying data. The view represents the visualization of the data that the model contains. The controller controls the data flow into model object and updates the view when the data changes. It separates the view and model.&lt;/p&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #fb4834;&quot;&gt;Spring Boot Architecture&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/07/5mhi.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;519&quot; src=&quot;https://zupimages.net/up/21/07/5mhi.png&quot; style=&quot;border: 1px solid rgb(204, 204, 204);&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Spring Boot is a module of the Spring Framework. It is used to create stand-alone, production-grade Spring Based Applications with minimum efforts. It is developed on top of the core Spring Framework.&lt;/p&gt;&lt;hr /&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Introduction mysql to database &lt;/h2&gt;
&lt;p&gt;&lt;b&gt;MySQL&lt;/b&gt; is a database management system that allows you to manage relational databases. It is open source software backed by Oracle. It means you can use MySQL without paying a dime. Also, if you want, you can change its source code to suit your needs. &lt;b&gt;MySQL&lt;/b&gt; can run on various platforms UNIX, Linux, Windows, etc. You can install it on a server or even in a desktop. Besides, MySQL is reliable, scalable, and fast.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Introduction to the POM&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;POM&lt;/b&gt; A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects. Examples for this is the build directory, which is &lt;b&gt;target&lt;/b&gt;; the source directory, which is &lt;b&gt;src/main/java&lt;/b&gt;; the test source directory, which is &lt;b&gt;src/main/java&lt;/b&gt;; and so on. When executing a task or goal, Maven looks for the POM in the current directory. It reads the POM, gets the needed configuration information, then executes the goal.&lt;/p&gt;

&lt;h3 class=&quot;h3-title&quot;&gt;pom.xml&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: darkcyan;&quot;&gt;
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPom&quot; onclick=&quot;copyPom(selectPom)&quot; style=&quot;cursor: pointer; float: right;&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;
  &lt;div id=&quot;selectPom&quot;&gt; 
 &amp;lt;?xml &lt;span style=&quot;color: purple;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;UTF-8&quot;&lt;/span&gt;?&amp;gt;
 &amp;lt;project &lt;span style=&quot;color: purple;&quot;&gt;xmlns&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xmlns:xsi&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xsi:schemaLocation&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&lt;/span&gt;&amp;gt;
  &amp;lt;modelVersion&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;4.0.0&lt;/span&gt;&amp;gt;/modelVersion&amp;gt;
   &amp;lt;parent&amp;gt;
   &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
   &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-parent&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;2.4.1&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;relativePath/&amp;gt; 
  &amp;lt;/parent&amp;gt;
    
    &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.school&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;school&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;0.0.1-SNAPSHOT&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;name&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;school&lt;/span&gt;&amp;lt;/name&amp;gt;
	&amp;lt;description&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;Demo project for Spring Boot&lt;/span&gt;&amp;lt;/description&amp;gt;
    
    &amp;lt;properties&amp;gt;
	 &amp;lt;java.version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;1.8&lt;/span&gt;&amp;lt;/java.version&amp;gt;
    &amp;lt;/properties&amp;gt;
    
    &amp;lt;dependencies&amp;gt;
    
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-data-jpa&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
    
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-web&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;javax.validation&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;validation-api&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	 &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	 &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-devtools&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
     &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;runtime&lt;/span&gt;&amp;lt;/scope&amp;gt;
     &amp;lt;optional&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;true&lt;/span&gt;&amp;lt;/optional&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-test&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;test&lt;/span&gt;&amp;lt;/scope&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql&lt;/span&gt;&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql-connector-java&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;runtime&lt;/span&gt;&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
    
  &amp;lt;/dependencies&amp;gt;
  
  &amp;lt;build&amp;gt;
    &amp;lt;plugins&amp;gt;
	 &amp;lt;plugin&amp;gt;
		&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
		&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-maven-plugin&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	 &amp;lt;/plugin&amp;gt;
	&amp;lt;/plugins&amp;gt;
 &amp;lt;/build&amp;gt;
 
 &amp;lt;/project&amp;gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #c0392b;&quot;&gt;Properties File&lt;/h2&gt;
&lt;p&gt;Properties files are used to keep ‘N’ number of properties in a single file to run the application in a different environment. In Spring Boot, properties are kept in the application.properties file under the classpath.&lt;/p&gt;
&lt;p&gt;The application.properties file is located in the src/main/resources directory. The code for sample application.properties&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;span style=&quot;color: black;&quot;&gt; We need to create database name it bank &lt;/span&gt;&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/resources/application.properties&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: black;&quot;&gt;
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPro&quot; onclick=&quot;copyPro(selectPro)&quot; style=&quot;cursor: pointer; float: right;&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectPro&quot;&gt; 
&lt;span&gt;spring.datasource.url=&lt;span style=&quot;color: darkcyan;&quot;&gt;jdbc:mysql://localhost:3306/&lt;span style=&quot;background: orange none repeat scroll 0% 0%; color: white;&quot;&gt;school&lt;/span&gt;?useUnicode=true&amp;amp;useJDBCCompliantTimezoneShift=true&amp;amp;useLegacyDatetimeCode=false&amp;amp;serverTimezone=UTC&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.datasource.username=&lt;span style=&quot;color: darkcyan;&quot;&gt;root&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.activemq.password=&lt;/span&gt;
&lt;span&gt;spring.datasource.driver-class-name=&lt;span style=&quot;color: darkcyan;&quot;&gt;com.mysql.jdbc.Driver&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.properties.hibernate.dialect=&lt;span style=&quot;color: darkcyan;&quot;&gt;org.hibernate.dialect.MySQL5Dialect&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.hibernate.ddl-auto=&lt;span style=&quot;color: darkcyan;&quot;&gt;update&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;server.port=&lt;span style=&quot;color: darkcyan;&quot;&gt;8080&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.database=&lt;span style=&quot;color: darkcyan;&quot;&gt;MYSQL&lt;/span&gt;&lt;/span&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2&gt;Class Diagram &lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://nsa40.casimages.com/img/2021/02/21/210221111316651184.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;157&quot; data-original-width=&quot;521&quot; src=&quot;https://nsa40.casimages.com/img/2021/02/21/210221111316651184.png&quot; style=&quot;border: 1px solid rgb(204, 204, 204);&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2&gt;
&lt;/h2&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Modals / Entities&lt;/h2&gt;
&lt;p&gt;An &lt;b&gt;entity&lt;/b&gt; is a lightweight persistence domain object. Typically, an &lt;b&gt;entity&lt;/b&gt; represents a table in a relational database, and each &lt;b&gt;entity&lt;/b&gt; instance corresponds to a row in that table. The primary programming artifact of an &lt;b&gt;entity&lt;/b&gt; is the &lt;b&gt;entity&lt;/b&gt; class, although &lt;b&gt;entities&lt;/b&gt; can use helper classes.&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;We need to create these entities in modal package&lt;/h2&gt;
&lt;div style=&quot;color: #27ae60; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; Activity&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; Coefficient&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; Course&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; Exam&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; Level&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; Manager&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; Note&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; PersistableElement&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; Program&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; Room&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; School&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; Schooling&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&amp;gt; Subject&lt;/p&gt;&lt;br /&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Activity.java &lt;/b&gt; This object content type, day, date, startDate, endDate and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with School&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/Activity.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnActivity&quot; onclick=&quot;copyActivity(selectActivity)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectActivity&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.ManyToOne;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Table;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;activites&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Activity &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: #0984e3;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;type&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;day&lt;/span&gt;;
	
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;date&lt;/span&gt;;
	
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;startDate&lt;/span&gt;;
	
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;endDate&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;school&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; School &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Activity() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 
&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Activity(String &lt;span style=&quot;color: #82590f;&quot;&gt;type&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;day&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;, School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;type&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;type&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;day&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;day&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;date&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getType() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;type&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setType(String &lt;span style=&quot;color: #82590f;&quot;&gt;type&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;type&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;type&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getDay() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;day&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDate(String &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;date&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getDate() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDay(String &lt;span style=&quot;color: #82590f;&quot;&gt;day&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;day&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;day&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getStartDate() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;startDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setStartDate(String &lt;span style=&quot;color: #82590f;&quot;&gt;startDate&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;startDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;startDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getEndDate() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;endDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt;setEndDate(String &lt;span style=&quot;color: #82590f;&quot;&gt;endDate&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;endDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;endDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; School getSchool() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSchool(School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Coefficient.java &lt;/b&gt; This object content id, name, and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Program&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/Coefficient.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnCoefficient&quot; onclick=&quot;copyCoefficient(selectCoefficient)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCoefficient&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.ManyToOne;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Table;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;coefficients&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Coefficient &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: #0984e3;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;b style=&quot;color: purple;&quot;&gt;private int&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;grade&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;program&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Program &lt;span style=&quot;color: #0984e3;&quot;&gt;program&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Coefficient() {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Coefficient(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;grade&lt;/span&gt;, Program &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;grade&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;grade&lt;/span&gt;;
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;program&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; getGrade() {
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;grade&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setGrade(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;grade&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;grade&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;grade&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Program getProgram() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;program&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setProgram(Program &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;program&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;;
 }       
}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Course.java &lt;/b&gt; This object content id, name, and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Level and &lt;b&gt;@OneToOne&lt;/b&gt; with Subject&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/Course.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnCourse&quot; onclick=&quot;copyCourse(selectCourse)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCourse&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;courses&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Course &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: #0984e3;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;date&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;startDate&lt;/span&gt;;	
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;endDate&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;subject&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToOne&lt;/span&gt;(cascade = CascadeType.ALL)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Subject &lt;span style=&quot;color: #0984e3;&quot;&gt;subject&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;level&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Level &lt;span style=&quot;color: #0984e3;&quot;&gt;level&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Course() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
}
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Course(String &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;startDate&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;endDate&lt;/span&gt;, Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;, Level &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;date&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;startDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;startDate&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;endDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;endDate&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;level&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getDate() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;date&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDate(String &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;date&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getStartDate() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;startDate&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setStartDate(String &lt;span style=&quot;color: #82590f;&quot;&gt;startDate&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;startDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;startDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getEndDate() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;endDate&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setEndDate(String &lt;span style=&quot;color: #82590f;&quot;&gt;endDate&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;endDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;endDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Subject getSubject() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSubject(Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Level getLevel() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setLevel(Level &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;level&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;;
 }	
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Exam.java &lt;/b&gt; This object content id, name, and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with School and Subject and &lt;b&gt;@OneToMany&lt;/b&gt; with Note&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/Exam.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnExam&quot; onclick=&quot;copyExam(selectExam)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectExam&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;exams&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Exam &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: #0984e3;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;date&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;start&lt;/span&gt;;	
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;end&lt;/span&gt;;
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;school&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; School &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.ALL, mappedBy = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;exam&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Note&amp;gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;notes&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;subject&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Subject &lt;span style=&quot;color: #0984e3;&quot;&gt;subject&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Exam() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }

&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Exam(String &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;start&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;end&lt;/span&gt;, School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;, List&amp;lt;Note&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;notes&lt;/span&gt;, Subject subject) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;date&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;start&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;start&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;end&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;end&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;notes&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;notes&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getDate() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDate(String &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;date&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;date&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getStart() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;start&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setStart(String &lt;span style=&quot;color: #82590f;&quot;&gt;start&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;start&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;start&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getEnd() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;end&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setEnd(String &lt;span style=&quot;color: #82590f;&quot;&gt;end&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;end&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;end&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; School getSchool() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSchool(School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Note&amp;gt; getNotes() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;notes&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setNotes(List&amp;lt;Note&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;notes&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;notes&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;notes&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Subject getSubject() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSubject(Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subjects&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;subjects&lt;/span&gt;;
 }

&lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addNote(Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getNotes() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;notes&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&amp;gt;();
   }
   getNotes().add(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;.setExam(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }
}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Level.java &lt;/b&gt; This object content id, name, and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Schooling and &lt;b&gt;@OneToMany&lt;/b&gt; Course and &lt;b&gt;@OneToOne&lt;/b&gt; with Room&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/Level.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnLevel&quot; onclick=&quot;copyLevel(selectLevel)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLevel&quot;&gt;
 
&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;levels&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Level &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: #0984e3;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(unique = &lt;b style=&quot;color: purple;&quot;&gt;true&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;label&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;schooling&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Schooling &lt;span style=&quot;color: #0984e3;&quot;&gt;schooling&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.ALL, mappedBy = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;level&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Course&amp;gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;courses&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;room&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Room &lt;span style=&quot;color: #0984e3;&quot;&gt;room&lt;/span&gt;;
    
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Level() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
}

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Level(String &lt;span style=&quot;color: #82590f;&quot;&gt;label&lt;/span&gt;, Schooling &lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;, List&amp;lt;Course&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;courses&lt;/span&gt;, Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;label&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;label&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;schooling&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;courses&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;courses&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;room&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getLabel() {
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;label&lt;/span&gt;;
  }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setLabel(String &lt;span style=&quot;color: #82590f;&quot;&gt;label&lt;/span&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;label&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;label&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Schooling getSchooling() {
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schooling&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSchooling(Schooling &lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;schooling&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Course&amp;gt; getCourses() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;courses&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCourses(List&amp;lt;Course&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;courses&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;courses&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;courses&lt;/span&gt;;
 }
	
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Room getRoom() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;room&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setRoom(Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;room&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addCourse(Course &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getCourses()== &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #82590f;&quot;&gt;courses&lt;/span&gt; =  &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&amp;gt;();
 }
   getCourses().add(&lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;);
  &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;.setLevel(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Manager.java &lt;/b&gt; This object content id, name, and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with School&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/Manager.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnManager&quot; onclick=&quot;copyManager(selectManager)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectManager&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;managers&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Manager &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: #0984e3;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;firstName&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;lastName&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;school&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; School &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Manager() {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Manager(String &lt;span style=&quot;color: #82590f;&quot;&gt;firstName&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;lastName&lt;/span&gt;, School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;firstName&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;firstName&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;lastName&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;lastName&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public long&lt;/b&gt; getId() {
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(long &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getFirstName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;firstName&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setFirstName(String &lt;span style=&quot;color: #82590f;&quot;&gt;firstName&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;firstName&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;firstName&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getLastName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;lastName&lt;/span&gt;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setLastName(String &lt;span style=&quot;color: #82590f;&quot;&gt;lastName&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;lastName&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;lastName&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; School getSchool() {
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSchool(School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
 }
} 

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note.java &lt;/b&gt; This object content id, name, and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Exam&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/Note.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnNote&quot; onclick=&quot;copyNote(selectNote)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNote&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;notes&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Note &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: #0984e3;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;b style=&quot;color: purple;&quot;&gt;private double&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;score&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;exam&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Exam &lt;span style=&quot;color: #0984e3;&quot;&gt;exam&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Note() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Note(&lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;score&lt;/span&gt;, Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;score&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;score&lt;/span&gt;;
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;exam&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public double&lt;/b&gt; getScore() {
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;score&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setScore(&lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;score&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;score&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;score&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Exam getExam() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setExam(Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;exam&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;;
 }
}
    

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;PersistableElement.java &lt;/b&gt; This object content id, createdAt, and description &lt;b&gt;This class is abstract for extends for all entities&lt;/b&gt;&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/PersistableElement.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPersistableElement&quot; onclick=&quot;copyPersistableElement(selectPersistableElement)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectPersistableElement&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.io.Serializable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Column;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.GeneratedValue;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.GenerationType;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Id;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.MappedSuperclass;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Temporal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.TemporalType;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@MappedSuperclass&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public abstract class&lt;/b&gt; PersistableElement &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Serializable {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;/**
  * 
  */&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; serialVersionUID = &lt;b style=&quot;color: #0984e3;&quot;&gt;1L&lt;/b&gt;;
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: purple;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private long&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;id&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Temporal&lt;/span&gt;(TemporalType.&lt;b style=&quot;color: purple;&quot;&gt;TIMESTAMP&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private Date&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;createdAt&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(columnDefinition = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;TEXT&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;description&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public Date&lt;/b&gt; getCreatedAt() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;createdAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCreatedAt(&lt;b style=&quot;color: purple;&quot;&gt;Date&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;createdAt&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;createdAt&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;createdAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getDescription() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;description&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDescription(String &lt;span style=&quot;color: #0984e3;&quot;&gt;description&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;description&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;description&lt;/span&gt;;
 }
	
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Program.java &lt;/b&gt; This object content name, and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Subject and &lt;b&gt;@OneToMany&lt;/b&gt; With Coefficient&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/Program.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnProgram&quot; onclick=&quot;copyProgram(selectProgram)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProgram&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.CascadeType;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.ManyToOne;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.OneToMany;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Table;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;programs&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Program &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {

 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: #0984e3;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;subject&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Subject &lt;span style=&quot;color: #0984e3;&quot;&gt;subject&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: purple;&quot;&gt;ALL&lt;/b&gt;, mappedBy = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;program&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Coefficient&amp;gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;coefficients&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Program() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
}
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Program(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;, Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;, List&amp;lt;Coefficient&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;coefficients&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;coefficients&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;coefficients&lt;/span&gt;;
 }

 public String getName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt;;
 }

 public void setName(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }

 public Subject getSubject() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subject&lt;/span&gt;;
 }

 public void setSubject(Subject &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;subject&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;subject&lt;/span&gt;;
 }

 public List&amp;lt;Coefficient&amp;gt; getCoefficients() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;coefficients&lt;/span&gt;;
 }

 public void setCoefficients(List&amp;lt;Coefficient&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;coefficients&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;coefficients&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;coefficients&lt;/span&gt;;
 }

 public void addCoefficient(Coefficient &lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;) {
   if (getCoefficients() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
      &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;coefficients&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&amp;gt;();
    }
  getCoefficients().add(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
  &lt;span style=&quot;color: #82590f;&quot;&gt;coefficient&lt;/span&gt;.setProgram(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Room.java &lt;/b&gt; This object content code, capacity, and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with School and &lt;b&gt;@OneToOne&lt;/b&gt; with Level&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/Room.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnRoom&quot; onclick=&quot;copyRoom(selectRoom)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectRoom&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.CascadeType;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.ManyToOne;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.OneToOne;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Table;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;rooms&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Room &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {

 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: #0984e3;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;code&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private int&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;capacity&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;school&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; School &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;level&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToOne&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: purple;&quot;&gt;ALL&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Level &lt;span style=&quot;color: #0984e3;&quot;&gt;level&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Room() {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Room(String &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, int &lt;span style=&quot;color: #82590f;&quot;&gt;capacity&lt;/span&gt;, School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;, Level &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;code&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;capacity&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;capacity&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;level&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getCode() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;code&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCode(String &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;code&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; getCapacity() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;capacity&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCapacity(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;capacity&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;capacity&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;capacity&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; School getSchool() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSchool(School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Level getLevel() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;level&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setLevel(Level &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;level&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;;
 }  
	
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;School.java &lt;/b&gt; This object content id, name, city, department, open, close and relational &lt;b&gt;@OneToMany&lt;/b&gt; with Activity, Schooling, Exam and Room &lt;b&gt;@OneToOne&lt;/b&gt; with Manager&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/School.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnSchool&quot; onclick=&quot;copySchool(selectSchool)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchool&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.CascadeType;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.OneToMany;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.OneToOne;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Table;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;
&lt;span style=&quot;color: #8a8787;&quot;&gt;
@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;schools&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; School &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {

 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; serialVersionUID = &lt;span style=&quot;color: #0984e3;&quot;&gt;1L&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;city&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;department&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;open&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;close&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: purple;&quot;&gt;ALL&lt;/b&gt;, mappedBy = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;school&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Activity&amp;gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;activities&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: purple;&quot;&gt;ALL&lt;/b&gt;, mappedBy = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;school&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Schooling&amp;gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolings&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: purple;&quot;&gt;ALL&lt;/b&gt;, mappedBy = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;school&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Exam&amp;gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;exams&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: purple;&quot;&gt;ALL&lt;/b&gt;, mappedBy = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;school&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Subject&amp;gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjects&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: purple;&quot;&gt;ALL&lt;/b&gt;, mappedBy = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;school&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Room&amp;gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;rooms&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;manager&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToOne&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: purple;&quot;&gt;ALL&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Manager &lt;span style=&quot;color: #0984e3;&quot;&gt;manager&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; School() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
}
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; School(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;city&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;open&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;close&lt;/span&gt;,
			List&amp;lt;Activity&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;activities&lt;/span&gt;, List&amp;lt;Schooling&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;schoolings&lt;/span&gt;, List&amp;lt;Exam&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;exams&lt;/span&gt;,
			List&amp;lt;Subject&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;subjects&lt;/span&gt;, List&amp;lt;Room&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;rooms&lt;/span&gt;, Manager &lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;) {
	&lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;city&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;city&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;open&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;open&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;close&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;close&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;activities&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;activities&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;schoolings&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;schoolings&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;exams&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;exams&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;subjects&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;subjects&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;rooms&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;rooms&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;manager&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setName(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getCity() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;city&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCity(String &lt;span style=&quot;color: #82590f;&quot;&gt;city&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;city&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;city&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getDepartment() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;department&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDepartment(String &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getOpen() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;open&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setOpen(String &lt;span style=&quot;color: #82590f;&quot;&gt;open&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;open&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;open&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getClose() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;close&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setClose(String &lt;span style=&quot;color: #82590f;&quot;&gt;close&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;close&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;close&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Activity&amp;gt; getActivities() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;activities&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setActivities(List&amp;lt;Activity&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;activities&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;activities&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;activities&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Schooling&amp;gt; getSchoolings() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;schoolings&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSchoolings(List&amp;lt;Schooling&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;schoolings&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;schoolings&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;schoolings&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Exam&amp;gt; getExams() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;exams&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setExams(List&amp;lt;Exam&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;exams&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;exams&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;exams&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Subject&amp;gt; getSubjects() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;subjects&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSubjects(List&amp;lt;Subject&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;subjects&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;subjects&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;subjects&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Room&amp;gt; getRooms() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;rooms&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setRooms(List&amp;lt;Room&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;rooms&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;rooms&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;rooms&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Manager getManager() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;manager&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setManager(Manager &lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;manager&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;manager&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addActivity(Activity &lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getActivities() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
     &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;activities&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&amp;gt;();
    }
   getActivities().add(&lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;activity&lt;/span&gt;.setSchool(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addSchooling(Schooling &lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;) {
	&lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getSchoolings() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
	 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;schoolings&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&amp;gt;();
	 }
   getSchoolings().add(&lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;schooling&lt;/span&gt;.setSchool(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addExam(Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getExams() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
	&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;exams&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&amp;gt;();
   }
   getExams().add(&lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;.setSchool(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addSubject(Subject &lt;span style=&quot;color: #82590f;&quot;&gt;matter&lt;/span&gt;) {
     &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getSubjects() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
	 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;subjects&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&amp;gt;();
    }
  getSubjects().add(&lt;span style=&quot;color: #82590f;&quot;&gt;matter&lt;/span&gt;);
  &lt;span style=&quot;color: #82590f;&quot;&gt;matter&lt;/span&gt;.setSchool(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addRoom(Room &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;) {
	&lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getRooms() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
	 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;rooms&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&amp;gt;();
     }
	getRooms().add(&lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;);
    &lt;span style=&quot;color: #82590f;&quot;&gt;room&lt;/span&gt;.setSchool(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
  }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Schooling.java &lt;/b&gt; This object content id, year, and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with School &lt;b&gt;@OneToMany&lt;/b&gt; with Level&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/Schooling.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnSchooling&quot; onclick=&quot;copySchooling(selectSchooling)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSchooling&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.CascadeType;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.ManyToOne;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.OneToMany;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Table;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;schoolings&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Schooling &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {
 
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; serialVersionUID = &lt;span style=&quot;color: #0984e3;&quot;&gt;1L&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private int&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;year&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;school&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; School &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: purple;&quot;&gt;ALL&lt;/b&gt;, mappedBy = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;schooling&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Level&amp;gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;levels&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Schooling() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
}

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Schooling(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;year&lt;/span&gt;, School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;, List&amp;lt;Level&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;levels&lt;/span&gt;) {
	&lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;year&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;year&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;levels&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;levels&lt;/span&gt;;
  }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; getYear() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;year&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setYear(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;year&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;year&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;year&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; School getSchool() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSchool(School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Level&amp;gt; getLevels() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;levels&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setLevels(List&amp;lt;Level&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;levels&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;levels&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;levels&lt;/span&gt;;
 }
	
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addLevel(Level &lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;) {
	&lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt;(getLevels()==&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
	 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;levels&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&amp;gt;();
	}
	getLevels().add(&lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;);
	&lt;span style=&quot;color: #82590f;&quot;&gt;level&lt;/span&gt;.setSchooling(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }	
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;


&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Subject.java &lt;/b&gt; This object content id, name, color and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with School&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/school/model/Subject.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button class=&quot;btnCopy&quot; id=&quot;idBtnSubject&quot; onclick=&quot;copySubject(selectSubject)&quot; title=&quot;Copy this code&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSubject&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.school.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.CascadeType;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.ManyToOne;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.OneToMany;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.OneToOne;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Table;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;subjects&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Subject &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; PersistableElement {

 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; serialVersionUID = &lt;span style=&quot;color: #0984e3;&quot;&gt;1L&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: #0984e3;&quot;&gt;color&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;school&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; School &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.ALL, mappedBy = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;subject&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Program&amp;gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;programs&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;exam&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Exam &lt;span style=&quot;color: #0984e3;&quot;&gt;exam&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: #0984e3;&quot;&gt;&quot;course&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Course &lt;span style=&quot;color: #0984e3;&quot;&gt;course&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Subject() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
}
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Subject(String &lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt;, String &lt;span style=&quot;color: #0984e3;&quot;&gt;color&lt;/span&gt;, 
			School &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;, List&amp;lt;Program&amp;gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;programs&lt;/span&gt;, Exam &lt;span style=&quot;color: #0984e3;&quot;&gt;exam&lt;/span&gt;, Course &lt;span style=&quot;color: #0984e3;&quot;&gt;course&lt;/span&gt;) {
	&lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;color&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;color&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;programs&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;programs&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;exam&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;exam&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;course&lt;/span&gt; = &lt;span style=&quot;color: #0984e3;&quot;&gt;course&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setName(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getColor() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;color&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setColor(String &lt;span style=&quot;color: #82590f;&quot;&gt;color&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;color&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;color&lt;/span&gt;;
 }
	
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; School getSchool() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSchool(School &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;school&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;school&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Program&amp;gt; getPrograms() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;programs&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setPrograms(List&amp;lt;Program&amp;gt; &lt;span style=&quot;color: #82590f;&quot;&gt;programs&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;programs&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;programs&lt;/span&gt;;
 }
	
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Exam getExam() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;exam&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setExam(Exam &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;exam&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;exam&lt;/span&gt;;
 }
	
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Course getCourse() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #0984e3;&quot;&gt;course&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCourse(Course &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;course&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;course&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addProgram(Program &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt;(getPrograms() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
	  &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #0984e3;&quot;&gt;programs&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&amp;gt;();
    }
	getPrograms().add(&lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;program&lt;/span&gt;.setSubject(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
  }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;div style=&quot;background: #fff; border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring.html&quot;&gt;Building application School with Spring boot and Angular Part 2&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: rgb(0, 137, 255) none repeat scroll 0% 0%; border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/school-spring&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download This Application My School From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;

&lt;style&gt;
pre:before {
   content: none;
}
pre {
background: #ddd;
line-height: 20px;
position: relative;
overflow: auto;
width: 100%;
border: 1px solid #d0c6c6;
}
  
code {
 padding: 0px 0px 0 20px;
 display: block; 
 color: #000; 
 font-family: monospace; 
 font-size: 16px;
 margin-top: -30px;
}
  .h2-title {
   background: #10ac84; 
   border-left: 10px solid; 
   padding: 10px !important;
  } 
    .h3-title {
   background: #01a3a4; 
   padding: 10px !important;
   margin-bottom: -16px !important;
  }
 pre div::selection,
 b::selection,
 code::selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
   padding: 0px 16px;
}
pre div::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
  padding: 0px 16px;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
&lt;/style&gt;

&lt;script async=&quot;&quot; data-ad-client=&quot;ca-pub-7401879888732563&quot; src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
 
&lt;script&gt;
  function copyPom(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPom&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyPro(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPro&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyActivity(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnActivity&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCoefficient(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCoefficient&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCourse(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCourse&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyExam(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnExam&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLevel(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLevel&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyManager(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnManager&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyNote(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNote&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyPersistableElement(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPersistableElement&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProgram(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProgram&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyRoom(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnRoom&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySchool(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchool&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySchooling(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSchooling&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySubject(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSubject&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  
&lt;/script&gt;
</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/3930703744449866689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-gestion-school-with-spring.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/3930703744449866689'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/3930703744449866689'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-gestion-school-with-spring.html' title='Building gestion school with Spring boot &amp; Angular'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/r2F4_kj371A/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-4347552960760394446</id><published>2022-01-18T03:44:00.015-08:00</published><updated>2022-08-26T08:48:11.083-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><title type='text'>Building an application Company with Spring boot and Angular Part 3</title><content type='html'>&lt;h1 style=&quot;background: rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Building an application Company with Spring boot and Angular Part 3&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/06/voo8.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;452&quot; data-original-width=&quot;800&quot; src=&quot;https://zupimages.net/up/21/06/voo8.png&quot; style=&quot;border: 1px solid;&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;bE4iUcBWUt8&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/bE4iUcBWUt8&quot;&gt;&lt;/iframe&gt;

&lt;h2&gt;Angular 10 Front-end&lt;/h2&gt;
&lt;p&gt;
We will continue to complete this project with add and display Company, Department, Employee and Project
&lt;/p&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Components&lt;/h2&gt;
&lt;p&gt;The @Component decorator identifies the class immediately below it as a component class, and specifies its metadata. In the example code below, you can see that Component is just a class, with no special Angular notation or syntax at all. It&#39;s not a component until you mark it as one with the @Component decorator. &lt;/p&gt;&lt;br&gt;
&lt;p&gt;The metadata for a component tells Angular where to get the major building blocks that it needs to create and present the component and its view. In particular, it associates a template with the component, either directly with inline code, or by reference. Together, the component and its template describe a view.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;In addition to containing or pointing to the template, the @Component metadata configures, for example, how the component can be referenced in HTML and what services it requires.&lt;/p&gt;&lt;br&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;b&gt;- add-company.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- add-company.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;/div&gt;  

&lt;p&gt;src/app/add-company.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddCompanyTs(selectAddCompanyTs)&quot; id=&quot;idBtnAddCompanyTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddCompanyTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Component, OnInit, Inject&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Router &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Company &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;CompanyService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/company.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-company&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-company.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-company.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;AddCompanyComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Company&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;Company&lt;/span&gt;;
  &lt;span style=&quot;color: #0097e6&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;companyService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;CompanyService&lt;/span&gt;, @Inject(&lt;span style=&quot;color: #2f3640;&quot;&gt;MAT_DIALOG_DATA&lt;/span&gt;) &lt;span style=&quot;color: #3498db;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;any&lt;/span&gt;) { }

  &lt;span style=&quot;color: #c23616;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #2f3640;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idCompany&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;companyService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findCompany&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idCompany&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt;;
      })
    }
  }
 &lt;span style=&quot;color: #c23616;&quot;&gt;addCompany&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
   &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idCompany&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;companyService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;editCompany&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idCompany&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt; =&gt; {
       &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt;;
       &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
     })
   } &lt;span style=&quot;color: #8e44ad;&quot;&gt;else&lt;/span&gt; {
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;companyService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;addCompany&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idUser&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt; =&gt; {
       &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt;;
       &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
     })
   }
 }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-company.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddCompanyHtml(selectAddCompanyHtml)&quot; id=&quot;idBtnAddCompanyHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddCompanyHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: auto; width: 100%; border: 3px solid #3f51b5;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add company&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
       &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter name&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Name&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;name&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;company.name&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;required&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter location&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Location&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;location&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;company.location&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#location&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;required&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter description&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;textarea&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Description&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;description&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;company.description&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#description&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;textarea&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
         &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; [&lt;span style=&quot;color: #0097e6&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;name.invalid || location.invalid || description.invalid&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;addCompany&lt;/span&gt;()&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 10em !important&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-company.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayCompanyTs(selectDisplayCompanyTs)&quot; id=&quot;idBtnDisplayCompanyTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayCompanyTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Company &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;CompanyService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/company.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddCompanyComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-company/add-company.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddDepartmentComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-department/add-department.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-display-company&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-company.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-company.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;DisplayCompanyComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Company&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;Company&lt;/span&gt;;
  &lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;companyService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;CompanyService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;ActivatedRoute&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;MatDialog&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(
        params =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;route.snapshot.params.id&lt;/span&gt;;
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;companyService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findCompany&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt; =&gt; {
            &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;company&lt;/span&gt;;
          })
        }
      )
    }
    
  &lt;span style=&quot;color: #c23616;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }

  &lt;span style=&quot;color: #c23616;&quot;&gt;editCompany&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idCompany&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #2f3640;&quot;&gt;AddCompanyComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #0097e6&quot;&gt;idCompany&lt;/span&gt;},
      &lt;span style=&quot;color: #0097e6&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #0097e6&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      })
}
  &lt;span style=&quot;color: #c23616;&quot;&gt;deleteCompany&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idCompany&lt;/span&gt;) {
   &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #c23616;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;companyService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;deleteCompany&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idCompany&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`/dashbaord`&lt;/span&gt;);
     })
   }
  }
  &lt;span style=&quot;color: #c23616;&quot;&gt;addDepartment&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idCompany&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #2f3640;&quot;&gt;AddDepartmentComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #0097e6&quot;&gt;idCompany&lt;/span&gt;},
      &lt;span style=&quot;color: #0097e6&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #0097e6&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      })
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-company.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayCompanyHtml(selectDisplayCompanyHtml)&quot; id=&quot;idBtnDisplayCompanyHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayCompanyHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;example-card&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Company: {{company.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;Location: {{company.location}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;background: #f5f6fa; padding: 15px;border-radius: 6px; color: rgba(0,0,0,.54);&quot;&lt;/span&gt;&gt;
      {{company.description}}
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;addDepartment&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;company.id&lt;/span&gt;)&quot;&gt;Add department&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;accent&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;editCompany&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;company.id&lt;/span&gt;)&quot;&gt;Update&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;deleteCompany&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;company.id&lt;/span&gt;)&quot;&gt;Delete&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button disabled&lt;/span&gt;&gt;{{company.createAt|date}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-department.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddDepartmentTs(selectAddDepartmentTs)&quot; id=&quot;idBtnAddDepartmentTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddDepartmentTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Department &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DepartmentService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/department.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-department&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-department.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-department.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;AddDepartmentComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Department&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;Department&lt;/span&gt;;
  &lt;span style=&quot;color: #0097e6&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(@Inject(&lt;span style=&quot;color: #2f3640;&quot;&gt;MAT_DIALOG_DATA&lt;/span&gt;) &lt;span style=&quot;color: #3498db;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;departmentService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;DepartmentService&lt;/span&gt;) { }

  &lt;span style=&quot;color: #c23616;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #2f3640;&quot;&gt;void&lt;/span&gt; {
     &lt;span style=&quot;color: #8e44ad;&quot;&gt; if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idDepartment&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;departmentService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findDepartment&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idDepartment&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt;;
      })
    }
  }
  &lt;span style=&quot;color: #c23616;&quot;&gt;addDeprtmant&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idDepartment&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;departmentService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;editDepartment&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idDepartment&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt; =&gt; {
       &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt;;
       &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
     })
    } &lt;span style=&quot;color: #8e44ad;&quot;&gt; else&lt;/span&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;departmentService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;addDepartment&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt; , &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idCompany&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt;;
        &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
      })
    }
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-department.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddDepartmentHtml(selectAddDepartmentHtml)&quot; id=&quot;idBtnAddDepartmentHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddDepartmentHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: auto; width: 100%; border: 3px solid #3f51b5;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add department&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
       &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter code&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Code&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;code&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;department.code&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#code&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;required&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter location&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Location&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;location&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;department.location&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#location&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;required&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter description&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;textarea&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Description&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;description&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;department.description&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#description&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;textarea&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
         &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; [&lt;span style=&quot;color: #0097e6&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;code.invalid || location.invalid || description.invalid&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;addDeprtmant&lt;/span&gt;()&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 10em !important&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-department.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayDepartmentTs(selectDisplayDepartmentTs)&quot; id=&quot;idBtnDisplayDepartmentTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayDepartmentTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Department &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DepartmentService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/department.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MatDialog&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddEmployeeComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-employee/add-employee.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddDepartmentComponent&lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-department/add-department.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddProjectToDeprtmentComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-project-to-deprtment/add-project-to-deprtment.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-display-department&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-department.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-department.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;DisplayDepartmenntComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Department&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;Department&lt;/span&gt;;
  &lt;span style=&quot;color: #0097e6&quot;&gt;idDepartment&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;ActivatedRoute&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;departmentService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;DepartmentService&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;MatDialog&lt;/span&gt;) { }

  &lt;span style=&quot;color: #c23616;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;idDepartment&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;route.snapshot.params.id&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;departmentService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findDepartment&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;idDepartment&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;department&lt;/span&gt;;
    })
  }
  &lt;span style=&quot;color: #c23616;&quot;&gt;addEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idDepartment&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #2f3640;&quot;&gt;AddEmployeeComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #0097e6&quot;&gt;idDepartment&lt;/span&gt;},
      &lt;span style=&quot;color: #0097e6&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;540px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #0097e6&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      })
  }
   &lt;span style=&quot;color: #c23616;&quot;&gt;editDepartment&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idDepartment&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #2f3640;&quot;&gt;AddDepartmentComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #0097e6&quot;&gt;idDepartment&lt;/span&gt;},
      &lt;span style=&quot;color: #0097e6&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #0097e6&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      })
  }
  &lt;span style=&quot;color: #c23616;&quot;&gt;addProject&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idDepartment&lt;/span&gt;) {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #2f3640;&quot;&gt;AddProjectToDeprtmentComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #0097e6&quot;&gt;idDepartment&lt;/span&gt;},
      &lt;span style=&quot;color: #0097e6&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #0097e6&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      })
  }
 &lt;span style=&quot;color: #c23616;&quot;&gt;deleteDepartment&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idDepartment&lt;/span&gt;) {
     &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #c23616;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
       &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;departmentService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;deleteDepartment&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idDepartment&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
        &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`/dashbaord`&lt;/span&gt;);
       })
     }
  }
 }
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-department.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayDepartmentHtml(selectDisplayDepartmentHtml)&quot; id=&quot;idBtnDisplayDepartmentHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayDepartmentHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;example-card&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Department: {{department.code}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;Location: {{department.location}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;background: #f5f6fa; padding: 15px;border-radius: 6px; color: rgba(0,0,0,.54);&quot;&lt;/span&gt;&gt;
      {{department.description}}
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-subheader&lt;/span&gt;&gt;Projects&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let pro of department.projects&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-icon&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-list-icon&lt;/span&gt;&gt;folder&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-icon&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-line&lt;/span&gt;&gt;{{pro.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-line&lt;/span&gt;&gt; {{pro.createAt | date}} &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; [&lt;span style=&quot;color: #0097e6&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;/dashbaord/display-department/&#39;&lt;/span&gt; + &lt;span style=&quot;color: #0097e6&quot;&gt;department.id&lt;/span&gt; + &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;/display-project/&#39;&lt;/span&gt;, &lt;span style=&quot;color: #0097e6&quot;&gt;pro.id&lt;/span&gt;]&quot; &gt;Project &lt;span style=&quot;color: #0097e6&quot;&gt;details&lt;/span&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-divider&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-divider&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;addEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;department.id&lt;/span&gt;)&quot;&gt;Add employee&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;addProject&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;department.id&lt;/span&gt;)&quot;&gt;Add project&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;accent&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;editDepartment&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;department.id&lt;/span&gt;)&quot;&gt;Update department&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;deleteDepartment&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;department.id&lt;/span&gt;)&quot;&gt;Delete department&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button disabled&lt;/span&gt;&gt;{{company.createAt|date}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button disabled&lt;/span&gt;&gt;{{&lt;span style=&quot;color: #0097e6&quot;&gt;department.createAt&lt;/span&gt;|&lt;span style=&quot;color: #c23616;&quot;&gt;date&lt;/span&gt;}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin-top: 15px; margin-bottom: 40px;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;router-outlet&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;router-outlet&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-employee.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddEmployeeTs(selectAddEmployeeTs)&quot; id=&quot;idBtnAddEmployeeTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddEmployeeTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Component, OnInit, Inject&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Employee &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;EmployeeService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/employee.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-employee&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-employee.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-employee.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;AddEmployeeComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Employee&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;Employee&lt;/span&gt;;
  &lt;span style=&quot;color: #0097e6&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(@Inject&lt;span style=&quot;color: #2f3640;&quot;&gt;@Inject(MAT_DIALOG_DATA&lt;/span&gt;) &lt;span style=&quot;color: #3498db;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;employeeService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;EmployeeService&lt;/span&gt;) { }

 &lt;span style=&quot;color: #c23616;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt;  {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idEmployee&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeeService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findEmployee&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idEmployee&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt;;
      })
    }
  }
 &lt;span style=&quot;color: #c23616;&quot;&gt;addEmployee&lt;/span&gt;() {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
   &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idEmployee&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeeService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;editEmployee&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idEmployee&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt; =&gt; {
       &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt;;
       &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
     })
   } &lt;span style=&quot;color: #8e44ad;&quot;&gt;else&lt;/span&gt; {
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeeService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;addEmployee&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idDepartment&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt; =&gt; {
       &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt;;
       &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
     })
   }
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-employee.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddEmployeeHtml(selectAddEmployeeHtml)&quot; id=&quot;idBtnAddEmployeeHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddEmployeeHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: auto; width: 100%; border: 3px solid #3f51b5;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add employee&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
      
       &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter name&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Name&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;name&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;employee.name&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;required&lt;/span&gt;&gt;      
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter address&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Address&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;address&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;employee.address&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#address&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;required&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter birth date&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Birth date&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;birthDate&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;employee.birthDate&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#birthDate&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;required&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter hiring date&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Hiring date&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;hiringDate&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;employee.hiringDate&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#hiringDate&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;required&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;  
               
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter salary&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Salary&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;salary&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;employee.salary&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#salary&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;required&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;  
        
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; [&lt;span style=&quot;color: #0097e6&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;name.invalid || salary.invalid || address.invalid || birthDate.invalid || hiringDate.invalid&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;addEmployee&lt;/span&gt;()&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 10em !important&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-employee.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayEmployeeTs(selectDisplayEmployeeTs)&quot; id=&quot;idBtnDisplayEmployeeTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayEmployeeTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;ActivatedRoute&lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Employee, EmployeePhone, Project&lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;EmployeeService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/employee.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MatDialog&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddEmployeeComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-employee/add-employee.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddProjectToEmployeComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-project-to-employe/add-project-to-employe.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddEmployeePhoneComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-employee-phone/add-employee-phone.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;EmployeePhoneService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/employee-phone.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;ProjectService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/project.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-display-employee&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-employee.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-employee.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;DisplayEmployeeComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #0097e6&quot;&gt;employeePhones&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;EmployeePhone&lt;/span&gt;[];
  &lt;span style=&quot;color: #0097e6&quot;&gt;projects&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Project&lt;/span&gt;[];  
  &lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Employee&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;Employee&lt;/span&gt;;
  &lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;employeeService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;EmployeeService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;ActivatedRoute&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;MatDialog&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;employeePhoneService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;EmployeePhoneService&lt;/span&gt;,
     &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;ProjectService&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(
        params =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;route.snapshot.params.id&lt;/span&gt;;
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findProjectsForEmplopyee&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;projects&lt;/span&gt; =&gt; {
            &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projects&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;projects&lt;/span&gt;;
          });
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeeService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findEmployee&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt; =&gt; {
            &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;employee&lt;/span&gt;;
            &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhoneService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findEmployeePhones&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhones&lt;/span&gt; =&gt; {
              &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhones&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;employeePhones&lt;/span&gt;;
            })
          })
        }
      )
    }
  &lt;span style=&quot;color: #c23616;&quot;&gt;deleteEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;) {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #c23616;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeeService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;deleteEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
        &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`/dashbaord`&lt;/span&gt;);
      })
    }
  }
 &lt;span style=&quot;color: #c23616;&quot;&gt;editEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;) {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #2f3640;&quot;&gt;AddEmployeeComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;},
      &lt;span style=&quot;color: #0097e6&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;540px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #0097e6&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      })
  }
 &lt;span style=&quot;color: #c23616;&quot;&gt;addProjectToEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;) {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #2f3640;&quot;&gt;AddProjectToEmployeComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;},
      &lt;span style=&quot;color: #0097e6&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;220px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #0097e6&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      })
  }
 &lt;span style=&quot;color: #c23616;&quot;&gt;addPhone&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;) {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #2f3640;&quot;&gt;AddEmployeePhoneComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;},
      &lt;span style=&quot;color: #0097e6&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;250px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #0097e6&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      })
  }
 &lt;span style=&quot;color: #c23616;&quot;&gt;editPhoone&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idPhone&lt;/span&gt;) {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #2f3640;&quot;&gt;AddEmployeePhoneComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #0097e6&quot;&gt;idPhone&lt;/span&gt;},
      &lt;span style=&quot;color: #0097e6&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;250px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #0097e6&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      })
  }
 &lt;span style=&quot;color: #c23616;&quot;&gt;deletePhoone&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idPhone&lt;/span&gt;) {
   &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #c23616;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhoneService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;deleteEmployeePhone&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idPhone&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
       &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
     })
   }
  }
 &lt;span style=&quot;color: #c23616;&quot;&gt;deleteProjectFromEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;, &lt;span style=&quot;color: #0097e6&quot;&gt;idProject&lt;/span&gt;) {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #c23616;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)){
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;deleteProjectFromEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idEmployee&lt;/span&gt;, &lt;span style=&quot;color: #0097e6&quot;&gt;idProject&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
     })
    }
  }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-employee.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayEmployeeHtml(selectDisplayEmployeeHtml)&quot; id=&quot;idBtnDisplayEmployeeHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayEmployeeHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;example-card&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Name: {{employee.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;Address: {{employee.address}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;
    
     &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;background: #f5f6fa; padding: 15px;border-radius: 6px;&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;role&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;list&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;role&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;listitem&quot;&lt;/span&gt;&gt;Birth date: {{employee.birthDate}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;role&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;listitem&quot;&lt;/span&gt;&gt;Hiring date: {{employee.hiringDate}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;role&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;listitem&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;accent&quot;&lt;/span&gt;&gt;Salary: {{employee.salary}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;background-color: #ecf0f1; padding: 15px;border-radius: 6px;&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-subheader&lt;/span&gt;&gt;Phones&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let phone of employeePhones&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-icon&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-list-icon&lt;/span&gt;&gt;phone&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-icon&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-line&lt;/span&gt;&gt;{{phone.phone}} &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fas fa-edit&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;cursor: pointer; color: cadetblue; margin-right: 15px;&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;editPhoone&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;phone.id&lt;/span&gt;)&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fas fa-trash-alt&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;cursor: pointer; color: #c0392b;&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;deletePhoone&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;phone.id&lt;/span&gt;)&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;background-color: #dcdde1; padding: 15px;border-radius: 6px; color: rgba(0,0,0,.54);&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-subheader&lt;/span&gt;&gt;Projects&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let pro of projects&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-icon&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-list-icon&lt;/span&gt;&gt;model_training&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-icon&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-line&lt;/span&gt;&gt;{{pro.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fas fa-eye-slash&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;cursor: pointer; color: #8e44ad; margin-right: 15px;&quot;&lt;/span&gt;
            [&lt;span style=&quot;color: #0097e6&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;/dashbaord/display-project-employee/&#39;&lt;/span&gt;, &lt;span style=&quot;color: #0097e6&quot;&gt;pro.id&lt;/span&gt;]&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fas fa-trash-alt&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;cursor: pointer; color: #c0392b;&quot;&lt;/span&gt;
            (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;deleteProjectFromEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employee.id&lt;/span&gt;, &lt;span style=&quot;color: #0097e6&quot;&gt;pro.id&lt;/span&gt;)&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
       
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;addProjectToEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employee.id&lt;/span&gt;)&quot;&gt;Add project&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;addPhone&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employee.id&lt;/span&gt;)&quot;&gt;Add phone&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;accent&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;editEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employee.id&lt;/span&gt;)&quot;&gt;Update employee&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;deleteEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employee.id&lt;/span&gt;)&quot;&gt;Delete employee&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button disabled&lt;/span&gt;&gt;{{company.createAt|date}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-employee-phone.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddEmployeePhoneTs(selectAddEmployeePhoneTs)&quot; id=&quot;idBtnAddEmployeePhoneTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddEmployeePhoneTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;EmployeePhone &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;EmployeePhoneService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/employee-phone.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-employee-phone&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-employee-phone.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-employee-phone.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;AddEmployeePhoneComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;OnInit&lt;/span&gt; {

  &lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;EmployeePhone&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;EmployeePhone&lt;/span&gt;;
  &lt;span style=&quot;color: #0097e6&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(@Inject(&lt;span style=&quot;color: #2f3640;&quot;&gt;MAT_DIALOG_DATA&lt;/span&gt;) &lt;span style=&quot;color: #3498db;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;any&lt;/span&gt;,  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;employeePhoneService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;EmployeePhoneService&lt;/span&gt;) { }

  &lt;span style=&quot;color: #c23616;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt;  {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idPhone&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhoneService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findEmployeePhone&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idPhone&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt;;
      })
    }
  }
  &lt;span style=&quot;color: #c23616;&quot;&gt;addPhone&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idPhone&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhoneService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;editEmployeePhone&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idPhone&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt;;
        &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
      })
    } &lt;span style=&quot;color: #8e44ad;&quot;&gt;else&lt;/span&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhoneService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;addEmployeePhone&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idEmployee&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;employeePhone&lt;/span&gt;;
        &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
      })
    }

  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-employee-phone.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddEmployeePhoneHtml(selectAddEmployeePhoneHtml)&quot; id=&quot;idBtnAddEmployeePhoneHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddEmployeePhoneHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: auto; width: 100%; border: 3px solid #3f51b5;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add employee phone&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
       &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter phone&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Phone&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;code&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;employeePhone.phone&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#phone&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;required&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; [&lt;span style=&quot;color: #0097e6&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;phone.invalid&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;addPhone&lt;/span&gt;()&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 10em !important&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-employee-phone.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayPhoneTs(selectDisplayPhoneTs)&quot; id=&quot;idBtnDisplayPhoneTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayPhoneTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Project &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;ProjectService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/project.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddProjectToDeprtmentComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-project-to-deprtment/add-project-to-deprtment.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-display-project-employee&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-project-employee.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-project-employee.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;DisplayProjectEmployeeComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Project&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;Project&lt;/span&gt;;
  &lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;ProjectService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;ActivatedRoute&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;MatDialog&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(
      params =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;route.snapshot.params.id&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findProject&lt;/span&gt;(this.&lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt;;
        })
      }
    )
  }
  
 &lt;span style=&quot;color: #c23616;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }

  &lt;span style=&quot;color: #c23616;&quot;&gt;deleteProject&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #c23616;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)){
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;deleteProejct&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`/dashbaord`&lt;/span&gt;);
     });
   }
  }

 &lt;span style=&quot;color: #c23616;&quot;&gt;editProject&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idProject&lt;/span&gt;) {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #2f3640;&quot;&gt;AddProjectToDeprtmentComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #0097e6&quot;&gt;idProject&lt;/span&gt;},
      &lt;span style=&quot;color: #0097e6&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;480px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #0097e6&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      })
  }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-employee-phone.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayPhoneHtml(selectDisplayPhoneHtml)&quot; id=&quot;idBtnDisplayPhoneHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayPhoneHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;example-card&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;{{project.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;{{project.createAt|&lt;span style=&quot;color: #c23616;&quot;&gt;date&lt;/span&gt;}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;background: #f5f6fa; padding: 15px;border-radius: 6px; color: rgba(0,0,0,.54);&quot;&lt;/span&gt;&gt;
      {{project.description}}
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;

  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #0097e6&quot;&gt;project.process&lt;/span&gt;==[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;TODO&#39;&lt;/span&gt;]&quot;&gt;{{project.process}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;accent&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #0097e6&quot;&gt;project.process&lt;/span&gt;==[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;WORKON&#39;&lt;/span&gt;]&quot;&gt;{{project.process}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warn&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #0097e6&quot;&gt;project.process&lt;/span&gt;==[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;DONE&#39;&lt;/span&gt;]&quot;&gt;{{project.process}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;editProject&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;project.id&lt;/span&gt;)&quot;&gt;Edit project&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;accent&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;deleteProject&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;project.id&lt;/span&gt;)&quot;&gt;Delete project&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-project-to-deprtment.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddProjectToDeprtmentTs(selectAddProjectToDeprtmentTs)&quot; id=&quot;idBtnAddProjectToDeprtmentTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddProjectToDeprtmentTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Project &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;ProjectService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/project.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-project-to-deprtment&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-project-to-deprtment.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-project-to-deprtment.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;AddProjectToDeprtmentComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #0097e6&quot;&gt;process&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;any&lt;/span&gt; = {};
  &lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Project&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;Project&lt;/span&gt;;
  &lt;span style=&quot;color: #0097e6&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(@Inject(&lt;span style=&quot;color: #2f3640;&quot;&gt;MAT_DIALOG_DATA&lt;/span&gt;) &lt;span style=&quot;color: #3498db;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;ProjectService&lt;/span&gt;) { }

  &lt;span style=&quot;color: #c23616;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idProject&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt; projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findProject&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idProject&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt;
      })
  }
}
 &lt;span style=&quot;color: #c23616;&quot;&gt;setProcess&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;e&lt;/span&gt;) {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;process&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;e&lt;/span&gt;;
 }
&lt;span style=&quot;color: #c23616;&quot;&gt;addProject&lt;/span&gt;() {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;process&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;process&lt;/span&gt;;
  &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idProject&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;editProject&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idProject&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt;;
      &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
    })
  } &lt;span style=&quot;color: #8e44ad;&quot;&gt;else&lt;/span&gt; {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;addProjectToDeprtment&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idDepartment&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt;;
      &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;reload&lt;/span&gt;();
    })
  }
 }
}

 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-project-to-deprtment.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddProjectToDepartmentHtml(selectAddProjectToDepartmentHtml)&quot; id=&quot;idBtnAddProjectToDepartmentHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddProjectToDepartmentHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: auto; width: 100%; border: 3px solid #3f51b5;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add project to department&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
       &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter name&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Name&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;name&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;project.name&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;required&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        
         &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter description&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
         &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;textarea&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;matInput placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Description&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;description&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;project.description&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;#description&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;textarea&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;font-weight: bold;&quot;&lt;/span&gt;&gt;Process&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-radio-group&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;process&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #0097e6&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;process&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;ngModelChange&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;setProcess&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;$event&lt;/span&gt;)&quot;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-radio-button&lt;/span&gt; [&lt;span style=&quot;color: #0097e6&quot;&gt;checked&lt;/span&gt;]=&quot;&lt;span style=&quot;color: #0097e6&quot;&gt;project.process&lt;/span&gt;==[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;TODO&#39;&lt;/span&gt;]&quot; [&lt;span style=&quot;color: #0097e6&quot;&gt;value&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&#39;TODO&#39;&quot;&lt;/span&gt;&gt; To do &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-radio-button&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-radio-button&lt;/span&gt; [&lt;span style=&quot;color: #0097e6&quot;&gt;checked&lt;/span&gt;]=&quot;&lt;span style=&quot;color: #0097e6&quot;&gt;project.process&lt;/span&gt;==[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;WORKON&#39;&lt;/span&gt;]&quot; [&lt;span style=&quot;color: #0097e6&quot;&gt;value&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&#39;WORKON&#39;&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: 10px 0&quot;&lt;/span&gt;&gt; Workon&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-radio-button&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-radio-button&lt;/span&gt; [&lt;span style=&quot;color: #0097e6&quot;&gt;checked&lt;/span&gt;]=&quot;&lt;span style=&quot;color: #0097e6&quot;&gt;project.process&lt;/span&gt;==[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;DONE&#39;&lt;/span&gt;]&quot; [&lt;span style=&quot;color: #0097e6&quot;&gt;value&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&#39;DONE&#39;&quot;&lt;/span&gt;&gt; Done &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-radio-button&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-radio-group&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;       
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; [&lt;span style=&quot;color: #0097e6&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;name.invalid || description.invalid&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;addCompany&lt;/span&gt;()&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 10em !important&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;        
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-project.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayProjectTs(selectDisplayProjectTs)&quot; id=&quot;idBtnDisplayProjectTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayProjectTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Project &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;ProjectService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/project.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddProjectToDeprtmentComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-project-to-deprtment/add-project-to-deprtment.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-display-project&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-project.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./display-project.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;HomeComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Project&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;Project&lt;/span&gt;;
  &lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
 
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;ProjectService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;ActivatedRoute&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;MatDialog&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(
      params =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;route.snapshot.params.id&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findProject&lt;/span&gt;(this.&lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;project&lt;/span&gt;;
        })
      }
    )
  }

 &lt;span style=&quot;color: #c23616;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }

  &lt;span style=&quot;color: #c23616;&quot;&gt;deleteProject&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #c23616;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)){
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;deleteProejct&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`/dashbaord`&lt;/span&gt;);
     });
   }
  }

 &lt;span style=&quot;color: #c23616;&quot;&gt;editProject&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;idProject&lt;/span&gt;) {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #2f3640;&quot;&gt;AddProjectToDeprtmentComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #0097e6&quot;&gt;idProject&lt;/span&gt;},
      &lt;span style=&quot;color: #0097e6&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;480px&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #0097e6&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
      })
  }
}

 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-project.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayProjectHtml(selectDisplayProjectHtml)&quot; id=&quot;idBtnDisplayProjectHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayProjectHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;example-card&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;{{project.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;{{project.createAt|&lt;span style=&quot;color: #c23616;&quot;&gt;date&lt;/span&gt;}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;background: #f5f6fa; padding: 15px;border-radius: 6px; color: rgba(0,0,0,.54);&quot;&lt;/span&gt;&gt;
      {{project.description}}
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;

  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #0097e6&quot;&gt;project.process&lt;/span&gt;==[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;TODO&#39;&lt;/span&gt;]&quot;&gt;{{project.process}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;accent&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #0097e6&quot;&gt;project.process&lt;/span&gt;==[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;WORKON&#39;&lt;/span&gt;]&quot;&gt;{{project.process}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warn&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #0097e6&quot;&gt;project.process&lt;/span&gt;==[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;DONE&#39;&lt;/span&gt;]&quot;&gt;{{project.process}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;editProject&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;project.id&lt;/span&gt;)&quot;&gt;Edit project&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;accent&quot;&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;deleteProject&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;project.id&lt;/span&gt;)&quot;&gt;Delete project&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-project-to-employee.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddProjectToEmployeeTs(selectAddProjectToEmployeeTs)&quot; id=&quot;idBtnAddProjectToEmployeeTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddProjectToEmployeeTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Project &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;ProjectService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/project.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-project-to-employe&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-project-to-employe.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #0097e6&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-project-to-employe.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;AddProjectToEmployeComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #0097e6&quot;&gt;projects&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Project&lt;/span&gt;[];
  &lt;span style=&quot;color: #0097e6&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;ProjectService&lt;/span&gt;, @Inject(&lt;span style=&quot;color: #2f3640;&quot;&gt;MAT_DIALOG_DATA&lt;/span&gt;) &lt;span style=&quot;color: #3498db;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;any&lt;/span&gt;,
  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;ActivatedRoute&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(
      params =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findProjects&lt;/span&gt;().&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;projects&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projects&lt;/span&gt; = &lt;span style=&quot;color: #0097e6&quot;&gt;projects&lt;/span&gt;;
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;findProjectsForEmplopyee&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idEmployee&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;filterProjects&lt;/span&gt; =&gt; {
            &lt;span style=&quot;color: #0097e6&quot;&gt;filterProjects&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;forEach&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;pro&lt;/span&gt; =&gt; {
            &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projects&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projects&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;filter&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;p&lt;/span&gt; =&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;p.id&lt;/span&gt; !== &lt;span style=&quot;color: #0097e6&quot;&gt;pro.id&lt;/span&gt;);
          })
          })
        })
      }
    )
   }
   
&lt;span style=&quot;color: #c23616;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }

&lt;span style=&quot;color: #c23616;&quot;&gt;AddProjectToEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;e&lt;/span&gt;) {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;projectService&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;addProjectToEmployee&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0097e6&quot;&gt;data.idEmployee&lt;/span&gt;, &lt;span style=&quot;color: #0097e6&quot;&gt;e.value&lt;/span&gt;).&lt;span style=&quot;color: #c23616;&quot;&gt;forEach&lt;/span&gt;(() =&gt; {
    &lt;span style=&quot;color: #0097e6&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`/dashbaord`&lt;/span&gt;);
  })
 }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-project-to-employee.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddProjectEmployeeHtml(selectAddProjectEmployeeHtml)&quot; id=&quot;idBtnAddProjectEmployeeHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddProjectEmployeeHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: auto; width: 100%; border: 3px solid #3f51b5;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Add project to employee&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
       &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
        
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Choose a project&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-select&lt;/span&gt; (&lt;span style=&quot;color: #0097e6&quot;&gt;selectionChange&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #c23616;&quot;&gt;AddProjectToEmployee&lt;/span&gt;(&lt;span style=&quot;color: #0097e6&quot;&gt;$event&lt;/span&gt;)&quot;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-option&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let pro of projects&quot;&lt;/span&gt; [&lt;span style=&quot;color: #0097e6&quot;&gt;value&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;pro.id&quot;&lt;/span&gt;&gt;{{pro.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-option&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-select&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;
        
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add the AppRoutingModule&lt;/h2&gt;
&lt;p&gt;In Angular, the best practice is to load and configure the router in a separate, top-level module that is dedicated to routing and imported by the root AppModule.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;By convention, the module class name is AppRoutingModule and it belongs in the app-routing.module.ts in the src/app folder.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;app-routing-module.ts&lt;/p&gt;

&lt;p&gt;src/app/app-routing.module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppRoutingModule(selectAppRoutingModule)&quot; id=&quot;idBtnAppRoutingModule&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppRoutingModule&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;LoginComponent&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./login/login.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DashboardComponent&lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./dashboard/dashboard.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;NgModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DisplayCompanyComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./display-company/display-company.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;Routes, RouterModule &lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DisplayDepartmenntComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./display-departmennt/display-departmennt.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DisplayEmployeeComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./display-employee/display-employee.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DisplayProjectComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./display-project/display-project.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DisplayProjectEmployeeComponent&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./display-project-employee/display-project-employee.component&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0097e6&quot;&gt;routes&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;Routes&lt;/span&gt; = [
  { &lt;span style=&quot;color: #0097e6&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;&#39;&lt;/span&gt;, &lt;span style=&quot;color: #0097e6&quot;&gt;redirectTo&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;/login&#39;&lt;/span&gt;, &lt;span style=&quot;color: #0097e6&quot;&gt;pathMatch&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;full&#39;&lt;/span&gt; },
  {
    &lt;span style=&quot;color: #0097e6&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;login&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #0097e6&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;LoginComponent&lt;/span&gt;
  },
  {
    &lt;span style=&quot;color: #0097e6&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;dashbaord&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #0097e6&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;DashboardComponent&lt;/span&gt;,
    &lt;span style=&quot;color: #0097e6&quot;&gt;children&lt;/span&gt;: [
      {
        &lt;span style=&quot;color: #0097e6&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;display-company/:id&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #0097e6&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;DisplayCompanyComponent&lt;/span&gt;
      },
      {
        &lt;span style=&quot;color: #0097e6&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;display-department/:id&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #0097e6&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;DisplayDepartmenntComponent&lt;/span&gt;,
        &lt;span style=&quot;color: #0097e6&quot;&gt;children&lt;/span&gt;: [
          {
            &lt;span style=&quot;color: #0097e6&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;display-project/:id&#39;&lt;/span&gt;,
            &lt;span style=&quot;color: #0097e6&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;DisplayProjectComponent&lt;/span&gt;
          }
        ]
      },
      {
        &lt;span style=&quot;color: #0097e6&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;display-employee/:id&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #0097e6&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;DisplayEmployeeComponent&lt;/span&gt;
      },
      {
        &lt;span style=&quot;color: #0097e6&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;display-project-employee/:id&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #0097e6&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #2f3640;&quot;&gt;DisplayProjectEmployeeComponent&lt;/span&gt;
      }
    ]
  },
];

@&lt;span style=&quot;color: #2f3640;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;declarations&lt;/span&gt;: [],
  &lt;span style=&quot;color: #0097e6&quot;&gt;imports&lt;/span&gt;: [&lt;span style=&quot;color: #2f3640;&quot;&gt;RouterModule&lt;/span&gt;.&lt;span style=&quot;color: #c23616;&quot;&gt;forRoot&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;routes&lt;/span&gt;)],
  &lt;span style=&quot;color: #0097e6&quot;&gt;exports&lt;/span&gt;: [&lt;span style=&quot;color: #2f3640;&quot;&gt;RouterModule&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;AppRoutingModule&lt;/span&gt; { }
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;NgModules and JavaScript modules&lt;/h2&gt;
&lt;p&gt;The NgModule system is different from and unrelated to the JavaScript (ES2015) module system for managing collections of JavaScript objects. These are complementary module systems that you can use together to write your apps.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;In JavaScript each file is a module and all objects defined in the file belong to that module. The module declares some objects to be public by marking them with the export key word. Other JavaScript modules use import statements to access public objects from other modules.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;app-module.ts&lt;/p&gt;&lt;br&gt;

&lt;p&gt;src/app/app-module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppModule(selectAppModule)&quot; id=&quot;idBtnAppModule&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppModule&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;BrowserModule&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;@angular/platform-browser&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;HttpClientModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AppComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./app.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AppRoutingModule&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./app-routing.module&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;FormsModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;@angular/forms&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;NoopAnimationsModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;@angular/platform-browser/animations&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;MaterialModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./material-module&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;LoginComponent&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./login/login.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DashboardComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./dashboard/dashboard.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddCompanyComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./add-company/add-company.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DisplayCompanyComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./display-company/display-company.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddDepartmentComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./add-department/add-department.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DisplayDepartmenntComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./display-departmennt/display-departmennt.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddEmployeeComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./add-employee/add-employee.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DisplayEmployeeComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./display-employee/display-employee.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddProjectToDeprtmentComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./add-project-to-deprtment/add-project-to-deprtment.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DisplayProjectComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./display-project/display-project.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddProjectToEmployeComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./add-project-to-employe/add-project-to-employe.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DisplayProjectEmployeeComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./display-project-employee/display-project-employee.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;AddEmployeePhoneComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;./add-employee-phone/add-employee-phone.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #0097e6&quot;&gt;DatePipe &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;@angular/common&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #2f3640;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #0097e6&quot;&gt;declarations&lt;/span&gt;: [
    &lt;span style=&quot;color: #2f3640;&quot;&gt;AppComponent,
    AppComponent,
    LoginComponent,
    DashboardComponent,
    AddCompanyComponent,
    DisplayCompanyComponent,
    AddDepartmentComponent,
    DisplayDepartmenntComponent,
    AddEmployeeComponent,
    DisplayEmployeeComponent,
    AddProjectToDeprtmentComponent,
    DisplayProjectComponent,
    AddProjectToEmployeComponent,
    DisplayProjectEmployeeComponent,
    AddEmployeePhoneComponent&lt;/span&gt;
  ],
  &lt;span style=&quot;color: #0097e6&quot;&gt;imports&lt;/span&gt;: [
    &lt;span style=&quot;color: #2f3640;&quot;&gt;BrowserModule,
    HttpClientModule,
    FormsModule,
    NoopAnimationsModule,
    MaterialModule,
    AppRoutingModule&lt;/span&gt;
  ],
  &lt;span style=&quot;color: #0097e6&quot;&gt;providers&lt;/span&gt;: [&lt;span style=&quot;color: #2f3640;&quot;&gt;DatePipe&lt;/span&gt;],
  &lt;span style=&quot;color: #0097e6&quot;&gt;bootstrap&lt;/span&gt;: [&lt;span style=&quot;color: #2f3640;&quot;&gt;AppComponent&lt;/span&gt;],
  &lt;span style=&quot;color: #0097e6&quot;&gt;schemas&lt;/span&gt;: [ &lt;span style=&quot;color: #0097e6;&quot;&gt;CUSTOM_ELEMENTS_SCHEMA&lt;/span&gt;, &lt;span style=&quot;color: #0097e6;&quot;&gt;NO_ERRORS_SCHEMA&lt;/span&gt; ]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2f3640;&quot;&gt;AppModule&lt;/span&gt; { }
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Angular 10 + Spring Boot App.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp;#38; Spring Data JPA, as well as Angular 10 project structure for building a front-end app to make HTTP requests and consume responses.&lt;/p&gt;&lt;br&gt;&lt;br&gt;

&lt;hr/&gt;
&lt;div style=&quot;background: #fff; border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/building-application-company-with.html&quot;&gt;Building an application Company with Spring boot and Angular Part 1&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: none 0% 0% repeat scroll rgb(0, 137, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/company-angular&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download My Company Application From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;

&lt;br /&gt;
&lt;style&gt; 
 pre:before {
   content: none;
  }
  pre {
   background-color: #1e1e1f;
   border-radius: 7px;
   line-height: 20px; 
   position: relative;
   overflow: auto;
   width: 100%;
  }
  .h2-title {   
 background: #ecf0f1;
 color: #2c3e50;
 padding: 10px !important;
 border-left: 15px solid #8e44ad;
  }
  code {
  color: #2f3640;
  font-size: 13px;
  background-color: #1e1e1f;
  padding: 3px 10px 20px;
  }
 div::-moz-selection,
 b::-moz-selection,
 strong::-moz-selection,
 code::-moz-selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
div::selection,
strong::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
&lt;/style&gt;

&lt;script&gt;
  function copyAddCompanyTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddCompanyTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddCompanyHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddCompanyHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddDepartmentTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddDepartmentTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddDepartmentHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddDepartmentHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddEmployeeTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddEmployeeTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddEmployeeHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddEmployeeHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddEmployeePhoneTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddEmployeePhoneTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddEmployeePhoneHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddEmployeePhoneHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddProjectToDeprtmentTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddProjectToDeprtmentTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddProjectToDepartmentHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddProjectToDepartmentHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddProjectToEmployeeTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddProjectToEmployeeTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddProjectEmployeeHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddProjectEmployeeHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplayCompanyTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayCompanyTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplayCompanyHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayCompanyHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplayDepartmentTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayDepartmentTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplayDepartmentHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayDepartmentHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplayEmployeeTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayEmployeeTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplayEmployeeHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayEmployeeHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplayPhoneTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayPhoneTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplayPhoneHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayPhoneHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplayProjectTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayProjectTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDisplayProjectHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayProjectHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppRoutingModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppRoutingModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/4347552960760394446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-company-with_24.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/4347552960760394446'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/4347552960760394446'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-company-with_24.html' title='Building an application Company with Spring boot and Angular Part 3'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/bE4iUcBWUt8/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-5156380753561829799</id><published>2022-01-18T03:43:00.021-08:00</published><updated>2023-05-21T07:57:24.311-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Spring boot"/><title type='text'>Building an application Company with Spring boot and Angular Part 1</title><content type='html'>&lt;h1 style=&quot;background: none 0% 0% repeat scroll rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Spring Boot&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/06/xr8g.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;406&quot; data-original-width=&quot;800&quot; src=&quot;https://zupimages.net/up/21/06/xr8g.png&quot; style=&quot;border: 1px solid;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr /&gt;

&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;bE4iUcBWUt8&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/bE4iUcBWUt8&quot;&gt;&lt;/iframe&gt;

&lt;h1&gt; Build an application enterprise with Spring boot and Angular use Jpa&lt;/h1&gt;

&lt;h2&gt;Objective:&lt;/h2&gt;
&lt;p&gt;
In this tutorial We will build an application Company To display departments with code, location and description, employees with name, hiring date, salary etc... and projects with name, description and process. Each employee can have one project or many projects to work on and every user can management the functionality Add, update or delete.
&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;Used Skills in this project:&lt;/h2&gt;
&lt;p&gt;Java, SpringBoot, MicroServices, REST WebServices, JPA, Hibernate, MySQL Database, Maven, Angular, GitHub, SpringBoot Embedded Tomcat Server, STS-Eclipse IDE&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;Tools to be used&lt;/h2&gt;
&lt;p&gt; ° Use any IDE to develop the Spring and Hibernate project. It may be STS/Eclipse/Netbeans. Here, we are using STS (Spring Tool Suite). &lt;/p&gt;
&lt;p&gt; ° Mysql for the database.&lt;/p&gt;
&lt;p&gt; ° Use any IDE to develop the Angular project. It may be Visual Studio Code/Sublime. Here, we are using Visual Studio Code.&lt;/p&gt;
&lt;p&gt; ° Server: Apache Tomcat/JBoss/Glassfish/Weblogic/Websphere.&lt;/p&gt;


&lt;br /&gt;&lt;h2 class=&quot;h2-title&quot;&gt;Spring MVC&lt;/h2&gt;
&lt;p&gt;Spring MVC is the primary web framework built on the Servlet API. It is build on the popular MVC design pattern. MVC (Model-View-Controller) is a software architecture pattern, which separates application into three areas: model, view, and controller. The model represents a Java object carrying data. The view represents the visualization of the data that the model contains. The controller controls the data flow into model object and updates the view when the data changes. It separates the view and model.&lt;/p&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #fb4834;&quot;&gt;Spring Boot Architecture&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/06/49jz.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;519&quot; src=&quot;https://zupimages.net/up/21/06/49jz.png&quot; style=&quot;border: 1px solid rgb(204, 204, 204);&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Spring Boot is a module of the Spring Framework. It is used to create stand-alone, production-grade Spring Based Applications with minimum efforts. It is developed on top of the core Spring Framework.&lt;/p&gt;&lt;hr /&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Introduction mysql to database &lt;/h2&gt;
&lt;p&gt;&lt;b&gt;MySQL&lt;/b&gt; is a database management system that allows you to manage relational databases. It is open source software backed by Oracle. It means you can use MySQL without paying a dime. Also, if you want, you can change its source code to suit your needs. &lt;b&gt;MySQL&lt;/b&gt; can run on various platforms UNIX, Linux, Windows, etc. You can install it on a server or even in a desktop. Besides, MySQL is reliable, scalable, and fast.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Introduction to the POM&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;POM&lt;/b&gt; A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects. Examples for this is the build directory, which is &lt;b&gt;target&lt;/b&gt;; the source directory, which is &lt;b&gt;src/main/java&lt;/b&gt;; the test source directory, which is &lt;b&gt;src/main/java&lt;/b&gt;; and so on. When executing a task or goal, Maven looks for the POM in the current directory. It reads the POM, gets the needed configuration information, then executes the goal.&lt;/p&gt;

&lt;h3 class=&quot;h3-title&quot;&gt;pom.xml&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: darkcyan;&quot;&gt;
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPom&quot; onclick=&quot;copyPom(selectPom)&quot; style=&quot;cursor: pointer; float: right;&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;
  &lt;div id=&quot;selectPom&quot;&gt; 
 &amp;lt;?xml &lt;span style=&quot;color: purple;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;UTF-8&quot;&lt;/span&gt;?&amp;gt;
 &amp;lt;project &lt;span style=&quot;color: purple;&quot;&gt;xmlns&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xmlns:xsi&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xsi:schemaLocation&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&lt;/span&gt;&amp;gt;
  &amp;lt;modelVersion&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;4.0.0&lt;/span&gt;&amp;gt;/modelVersion&amp;gt;
   &amp;lt;parent&amp;gt;
   &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
   &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-parent&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;2.4.1&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;relativePath/&amp;gt; 
  &amp;lt;/parent&amp;gt;
    
    &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.company&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;company&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;0.0.1-SNAPSHOT&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;name&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;company&lt;/span&gt;&amp;lt;/name&amp;gt;
	&amp;lt;description&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;Demo project for Spring Boot&lt;/span&gt;&amp;lt;/description&amp;gt;
    
    &amp;lt;properties&amp;gt;
	 &amp;lt;java.version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;1.8&lt;/span&gt;&amp;lt;/java.version&amp;gt;
    &amp;lt;/properties&amp;gt;
    
    &amp;lt;dependencies&amp;gt;
    
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-data-jpa&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
    
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-web&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;javax.validation&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;validation-api&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	 &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	 &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-devtools&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
     &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;runtime&lt;/span&gt;&amp;lt;/scope&amp;gt;
     &amp;lt;optional&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;true&lt;/span&gt;&amp;lt;/optional&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-test&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;test&lt;/span&gt;&amp;lt;/scope&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql&lt;/span&gt;&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql-connector-java&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;runtime&lt;/span&gt;&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
    
  &amp;lt;/dependencies&amp;gt;
  
  &amp;lt;build&amp;gt;
    &amp;lt;plugins&amp;gt;
	 &amp;lt;plugin&amp;gt;
		&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
		&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-maven-plugin&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	 &amp;lt;/plugin&amp;gt;
	&amp;lt;/plugins&amp;gt;
 &amp;lt;/build&amp;gt;
 
 &amp;lt;/project&amp;gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #c0392b;&quot;&gt;Properties File&lt;/h2&gt;
&lt;p&gt;Properties files are used to keep ‘N’ number of properties in a single file to run the application in a different environment. In Spring Boot, properties are kept in the application.properties file under the classpath.&lt;/p&gt;
&lt;p&gt;The application.properties file is located in the src/main/resources directory. The code for sample application.properties&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;span style=&quot;color: black;&quot;&gt; We need to create database name it bank &lt;/span&gt;&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/resources/application.properties&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: black;&quot;&gt;
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPro&quot; onclick=&quot;copyPro(selectPro)&quot; style=&quot;cursor: pointer; float: right;&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectPro&quot;&gt; 
&lt;span&gt;spring.datasource.url=&lt;span style=&quot;color: darkcyan;&quot;&gt;jdbc:mysql://localhost:3306/&lt;span style=&quot;background: none 0% 0% repeat scroll orange; color: white;&quot;&gt;company&lt;/span&gt;?useUnicode=true&amp;amp;useJDBCCompliantTimezoneShift=true&amp;amp;useLegacyDatetimeCode=false&amp;amp;serverTimezone=UTC&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.datasource.username=&lt;span style=&quot;color: darkcyan;&quot;&gt;root&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.activemq.password=&lt;/span&gt;
&lt;span&gt;spring.datasource.driver-class-name=&lt;span style=&quot;color: darkcyan;&quot;&gt;com.mysql.jdbc.Driver&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.properties.hibernate.dialect=&lt;span style=&quot;color: darkcyan;&quot;&gt;org.hibernate.dialect.MySQL5Dialect&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.hibernate.ddl-auto=&lt;span style=&quot;color: darkcyan;&quot;&gt;update&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;server.port=&lt;span style=&quot;color: darkcyan;&quot;&gt;8080&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.database=&lt;span style=&quot;color: darkcyan;&quot;&gt;MYSQL&lt;/span&gt;&lt;/span&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2&gt;Class Diagram &lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://nsa40.casimages.com/img/2021/02/12/210212094932592820.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;157&quot; data-original-width=&quot;521&quot; src=&quot;https://nsa40.casimages.com/img/2021/02/12/210212094932592820.png&quot; style=&quot;border: 1px solid rgb(204, 204, 204);&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2&gt;
&lt;/h2&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Modals / Entities&lt;/h2&gt;
&lt;p&gt;An &lt;b&gt;entity&lt;/b&gt; is a lightweight persistence domain object. Typically, an &lt;b&gt;entity&lt;/b&gt; represents a table in a relational database, and each &lt;b&gt;entity&lt;/b&gt; instance corresponds to a row in that table. The primary programming artifact of an &lt;b&gt;entity&lt;/b&gt; is the &lt;b&gt;entity&lt;/b&gt; class, although &lt;b&gt;entities&lt;/b&gt; can use helper classes.&lt;/p&gt;&lt;br&gt;
&lt;h2&gt;We need to create these entities in modal package&lt;/h2&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Company&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Department&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Employee&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EmployeePhone&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Project&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; User&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Company.java &lt;/b&gt; This object content id, name, location, createAt and relational &lt;b&gt;@ManyToOne&lt;/b&gt; User and &lt;b&gt;@OneToMany&lt;/b&gt; with Department&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/model/Company.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCompany(selectCompany)&quot; id=&quot;idBtnCompany&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCompany&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Company {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(unique = true)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;location&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(columnDefinition = &lt;span style=&quot;color: blue;&quot;&gt;&quot;TEXT&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Temporal&lt;/span&gt;(TemporalType.&lt;b style=&quot;color: blue;&quot;&gt;TIMESTAMP&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Date &lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne
 @JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;user&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; User &lt;span style=&quot;color: blue;&quot;&gt;user&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: blue;&quot;&gt;ALL&lt;/b&gt;, mappedBy = &lt;span style=&quot;color: blue;&quot;&gt;&quot;company&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Department&gt; &lt;span style=&quot;color: blue;&quot;&gt;departments&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Company() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }

&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Company(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;location&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;, Date &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;, User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;, List&amp;lt;Department&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;departments&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;location&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;location&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;departments&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;departments&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setName(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getLocation() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;location&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setLocation(String &lt;span style=&quot;color: #82590f;&quot;&gt;location&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;location&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;location&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getDescription() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDescription(String &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Date getCreateAt() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCreateAt(Date &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; User getUser() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;user&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setUser(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Department&gt; getDepartments() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;departments&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDepartments(List&amp;lt;Department&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;departments&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;departments&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;departments&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addDepartment(Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt;(getDepartments() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;departments&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&gt;();
   }
   getDepartments().add(&lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt; department&lt;/span&gt;.setCompany(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Department.java &lt;/b&gt; This object content id, code, location, createAt and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Company and &lt;b&gt;@OneToMany&lt;/b&gt; with Employee and Project&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/model/Department.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyDepartment(selectDepartment)&quot; id=&quot;idBtnDepartment&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDepartment&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

@Entity
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Department {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(unique = true)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;code&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;location&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(columnDefinition = &lt;span style=&quot;color: blue;&quot;&gt;&quot;TEXT&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Temporal&lt;/span&gt;(TemporalType.&lt;b style=&quot;color: blue;&quot;&gt;TIMESTAMP&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Date &lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne
 @JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;company&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Company &lt;span style=&quot;color: blue;&quot;&gt;company&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: blue;&quot;&gt;ALL&lt;/b&gt;, mappedBy = &lt;span style=&quot;color: blue;&quot;&gt;&quot;department&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Employee&gt; &lt;span style=&quot;color: blue;&quot;&gt;employees&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: blue;&quot;&gt;ALL&lt;/b&gt;, mappedBy = &lt;span style=&quot;color: blue;&quot;&gt;&quot;department&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Project&gt; &lt;span style=&quot;color: blue;&quot;&gt;projects&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Department() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Department(String &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;location&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;, Date &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;, Company &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;, List&amp;lt;Employee&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;employees&lt;/span&gt;, List&amp;lt;Project&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;projects&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;code&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;location&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;location&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;company&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;employees&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;employees&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;projects&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;projects&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getCode() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;code&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCode(String &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;code&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getLocation() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;location&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setLocation(String &lt;span style=&quot;color: #82590f;&quot;&gt;location&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;location&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;location&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getDescription() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDescription(String &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Date getCreateAt() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCreateAt(Date &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Company getCompany() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;company&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCompany(Company &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;company&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Employee&gt; getEmployees() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employees&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setEmployees(List&amp;lt;Employee&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;employees&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;employees&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;employees&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Project&gt; getProjects() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projects&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setProjects(List&amp;lt;Project&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;projects&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;projects&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;projects&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addEmployee(Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt;(getEmployees() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;employees&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&gt;();
   }
   getEmployees().add(&lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;.setDepartment(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addProjectToDepratment(Project &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt;(getProjects() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue&quot;&gt;projects&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&gt;();
   }
   getProjects().add(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;.setDepartment(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Employee.java &lt;/b&gt; This object content id, name, address, salary, hiringDate, birthDate and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Department &lt;b&gt;@OneToMany&lt;/b&gt; With EmployeePhone &lt;b&gt;@ManyToMany&lt;/b&gt; with Project&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/model/Employee.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEmployee(selectEmployee)&quot; id=&quot;idBtnEmployee&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployee&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonProperty;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonProperty.Access;

@Entity
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Employee {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;address&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private double&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;salary&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;hiringDate&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;birthDate&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonBackReference&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;&quot;department&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Department &lt;span style=&quot;color: blue;&quot;&gt;department&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: blue;&quot;&gt;ALL&lt;/b&gt;, mappedBy = &lt;span style=&quot;color: blue;&quot;&gt;&quot;employee&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;EmployeePhone&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeePhones&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JsonProperty&lt;/span&gt;(access = Access.WRITE_&lt;b style=&quot;color: blue;&quot;&gt;ONLY&lt;/b&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToMany&lt;/span&gt;(fetch = FetchType.&lt;b style=&quot;color: blue;&quot;&gt;LAZY&lt;/b&gt;)
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@JoinTable&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;employee_projects&quot;&lt;/span&gt;, joinColumns = &lt;span style=&quot;color: #8a8787;&quot;&gt;@JoinColumn&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;project_id&quot;&lt;/span&gt;), inverseJoinColumns = &lt;span style=&quot;color: #8a8787;&quot;&gt;@JoinColumn&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;employee_id&quot;&lt;/span&gt;))
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Project&gt; &lt;span style=&quot;color: blue;&quot;&gt;projects&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Employee() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Employee(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;address&lt;/span&gt;, double &lt;span style=&quot;color: #82590f;&quot;&gt;salary&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;hiringDate&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;birthDate&lt;/span&gt;, Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;, List&amp;lt;EmployeePhone&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhones&lt;/span&gt;, List&amp;lt;Project&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;projects&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;address&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;address&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;salary&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;salary&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;hiringDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;hiringDate&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;birthDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;birthDate&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;employeePhones&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhones&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;projects&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;projects&lt;/span&gt;;
 }
    
 &lt;b style=&quot;color: purple;&quot;&gt;public long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setName(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getAddress() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;address&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setAddress(String &lt;span style=&quot;color: #82590f;&quot;&gt;address&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;address&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;address&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public double&lt;/b&gt; getSalary() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;salary&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setSalary(&lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;salary&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;salary&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;salary&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getHiringDate() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;hiringDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setHiringDate(String &lt;span style=&quot;color: #82590f;&quot;&gt;hiringDate&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;hiringDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;hiringDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getBirthDate() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;birthDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setBirthDate(String &lt;span style=&quot;color: #82590f;&quot;&gt;birthDate&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;birthDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;birthDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Department getDepartment() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;department&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDepartment(Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;EmployeePhone&gt; getEmployeePhones() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeePhones&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setEmployeePhones(List&amp;lt;EmployeePhone&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhones&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;employeePhones&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhones&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Project&gt; getProjects() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projects&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setProjects(List&amp;lt;Project&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;projects&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;projects&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;projects&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addEmployeePhone(EmployeePhone &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getEmployeePhones() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
     &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;employeePhones&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&gt;();
    }
    getEmployeePhones().add(&lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;);
    &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;.setEmployee(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
   }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addProjectToEmploye(Project &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getProjects() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;projects&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&gt;();
   }
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (!getProjects().contains(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;)) {
    getProjects().add(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;);
    }
  }

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Arbitrate.java &lt;/b&gt; This object content id, phone, and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Employee&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/model/Arbitrate.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEmployeePhone(selectEmployeePhone)&quot; id=&quot;idBtnEmployeePhone&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployeePhone&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; EmployeePhone {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;phone&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne
 @JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;employee&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Employee &lt;span style=&quot;color: blue;&quot;&gt;employee&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; EmployeePhone() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; EmployeePhone(String &lt;span style=&quot;color: #82590f;&quot;&gt;phone&lt;/span&gt;, Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;phone&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;phone&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;;
 }
    
  &lt;b style=&quot;color: purple;&quot;&gt;public long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getPhone() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;phone&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setPhone(String &lt;span style=&quot;color: #82590f;&quot;&gt;phone&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;phone&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;phone&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Employee getEmployee() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employee&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt;setEmployee(Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;;
 }
		
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Project.java &lt;/b&gt; This object content id, name, location, createAt and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Employee and Department&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/model/Project.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyProject(selectProject)&quot; id=&quot;idBtnProject&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProject&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Project {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(unique = true)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(columnDefinition = &lt;span style=&quot;color: blue;&quot;&gt;&quot;TEXT&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Temporal&lt;/span&gt;(TemporalType.&lt;b style=&quot;color: blue;&quot;&gt;TIMESTAMP&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Date &lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt;;
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Enumerated&lt;/span&gt;(EnumType.&lt;b style=&quot;color: blue;&quot;&gt;STRING&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Process &lt;span style=&quot;color: blue;&quot;&gt;process&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne
 @JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;employee&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Employee &lt;span style=&quot;color: blue;&quot;&gt;employee&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne
 @JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;department&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Department &lt;span style=&quot;color: blue;&quot;&gt;department&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Project() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Project(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;, Date &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;, Process &lt;span style=&quot;color: #82590f;&quot;&gt;process&lt;/span&gt;, Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;, Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;process&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;process&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setName(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getDescription() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDescription(String &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Date getCreateAt() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCreateAt(Date &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Process getProcess() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;process&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt;setProcess(Process &lt;span style=&quot;color: #82590f;&quot;&gt;process&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;process&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;process&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Employee getEmployee() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employee&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setEmployee(Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Department getDepartment() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;department&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDepartment(Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;;
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;User.java &lt;/b&gt; This object content id, username, password, admin and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Company&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/model/User.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyUser(selectUser)&quot; id=&quot;idBtnUser&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUser&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; User {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;username&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;password&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;private boolean&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;admin&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(cascade = CascadeType.ALL, mappedBy = &lt;span style=&quot;color: blue;&quot;&gt;&quot;user&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Company&gt; &lt;span style=&quot;color: blue;&quot;&gt;companies&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; User() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; User(String &lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;password&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;boolean&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;admin&lt;/span&gt;, List&amp;lt;Company&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;companies&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;username&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;password&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;password&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;admin&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;admin&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;companies&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;companies&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getUsername() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;username&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setUsername(String &lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;username&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getPassword() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;password&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setPassword(String &lt;span style=&quot;color: #82590f;&quot;&gt;password&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;password&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;password&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public boolean&lt;/b&gt; isAdmin() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;admin&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setAdmin(&lt;b style=&quot;color: purple;&quot;&gt;boolean&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;admin&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;admin&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;admin&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Company&gt; getCompanies() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;companies&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCompanies(List&amp;lt;Company&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;companies&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;companies&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;companies&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addCompany(Company &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getCompanies() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;companies&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&gt;();
   }
    getCompanies().add(&lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;);
    &lt;span style=&quot;color: #82590f;&quot;&gt; company&lt;/span&gt;.setUser(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;p&gt;Here, we are creating an enum Process&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/model/Process.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyProcess(selectProcess)&quot; id=&quot;idBtnProcess&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProcess&quot;&gt;
 
&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.modal;

&lt;b style=&quot;color: purple;&quot;&gt;public enum&lt;/b&gt; Process {
  &lt;b style=&quot;color: blue;&quot;&gt;TODO&lt;/b&gt;, &lt;b style=&quot;color: blue;&quot;&gt;WORKON&lt;/b&gt;, &lt;b style=&quot;color: blue;&quot;&gt;DONE&lt;/b&gt;
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Spring Data JPA Projections&lt;/h2&gt;

&lt;p&gt;When using &lt;b style=&quot;color: purple;&quot;&gt;Spring Data JPA&lt;/b&gt; to implement the persistence layer, the repository typically returns one or more instances of the root class. However, more often than not, we don&#39;t need all the properties of the returned objects.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;In such cases, it may be desirable to retrieve data as objects of customized types. &lt;b&gt;These types reflect partial views of the root class, containing only properties we care about&lt;/b&gt;. This is where projections come in handy.&lt;/p&gt;
&lt;h2&gt;We need to create these interface dao &lt;/h2&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CompanyDao&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; DepartmentDao&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EmployeeDao&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EmployeePhoneDao&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ProjectDao&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; UserDao&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an interface CompanyDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/dao/CompanyDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCompanyDao(selectCompanyDao)&quot; id=&quot;idBtnCompanyDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCompanyDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Company;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; CompanyDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Company, Long&gt;{

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface DepartmentDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/dao/DepartmentDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyDepartmentDao(selectDepartmentDao)&quot; id=&quot;idBtnDepartmentDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDepartmentDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Department;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; DepartmentDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Department, Long&gt;{

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface EmployeeDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/dao/EmployeeDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEmployeeDao(selectEmployeeDao)&quot; id=&quot;idBtnEmployeeDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployeeDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Employee;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; EmployeeDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Employee, Long&gt;{

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface EmployeePhoneDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/dao/EmployeePhoneDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEmployeePhoneDao(selectEmployeePhoneDao)&quot; id=&quot;idBtnEmployeePhoneDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployeePhoneDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.EmployeePhone;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; EmployeePhoneDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;EmployeePhone, Long&gt;{

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface ProjectDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/dao/ProjectDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyProjectDao(selectProjectDao)&quot; id=&quot;idBtnProjectDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProjectDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Project;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ProjectDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Project, Long&gt;{

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;
&lt;p&gt;Here, we are creating an interface UserDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/dao/UserDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyUserDao(selectUserDao)&quot; id=&quot;idBtnUserDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUserDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Repository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.User;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Repository&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; UserDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;User, Long&gt;{

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;The services&lt;/h2&gt;
&lt;p&gt;Service Components are the class file which contains @Service annotation. These class files are used to write business logic in a different layer, separated from @RestController class file. The logic for creating a service component class file is shown here &lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;We will create these interfaces in service package:&lt;/h2&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CompanyService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; DepartmentService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EmployeeService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EmployeePhoneService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ProjectService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; UserService&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an interface CompanyService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/service/CompanyService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCompanyService(selectCompanyService)&quot; id=&quot;idBtnCompanyService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCompanyService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Company;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; CompanyService {
	
 Company addCompany(Company &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Company editCompany(Company &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Company findCompany(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteCompany(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;Company&gt; findCompanies();

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;p&gt;Here, we are creating an interface DepartmentService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/service/DepartmentService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyDepartmentService(selectDepartmentService)&quot; id=&quot;idBtnDepartmentService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDepartmentService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Department;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; DepartmentService {
	
 Department addDepartment(Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Department editDepartment(Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 Department findDepartment(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteDepartment(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface EmployeePhoneService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/service/EmployeePhoneService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEmployeePhoneService(selectEmployeePhoneService)&quot; id=&quot;idBtnEmployeePhoneService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployeePhoneService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.EmployeePhone;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; EmployeePhoneService {
	
 EmployeePhone addEmployeePhone(EmployeePhone &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 EmployeePhone editEmployeePhone(EmployeePhone &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteEmployeePhone(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;EmployeePhone&gt; findEmployeePhones(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 EmployeePhone findEmployeePhone(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;p&gt;Here, we are creating an interface EmployeeService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/service/EmployeeService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEmployeeService(selectEmployeeService)&quot; id=&quot;idBtnEmployeeService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployeeService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Employee;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; EmployeeService {
	
 Employee addEmployee(Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	 
 Employee editEmployee(Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	 
 Employee findEmployee(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	 
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteEmployee(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	 
 List&amp;lt;Employee&gt; findEmployees();

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;p&gt;Here, we are creating an interface ProjectService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/service/ProjectService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyProjectService(selectProjectService)&quot; id=&quot;idBtnProjectService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProjectService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Project;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ProjectService {
	
 Project addProjectToEmployee(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idEmployee&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idProject&lt;/span&gt;);
 
 Project addProjectToDeprtment(Project &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 
 Project editProject(Project &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 
 Project findProject(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteProejct(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 
 List&amp;lt;Project&gt; findProjectsForEmplopyee(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 List&amp;lt;Project&gt; findProjects();

 void deleteProjectFromEmployee(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idEmployee&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idProject&lt;/span&gt;);
 
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;p&gt;Here, we are creating an interface UserService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/model/UserService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyUserService(selectUserService)&quot; id=&quot;idBtnUserService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUserService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.User;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Service&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; UserService {
	
 User addUser(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;);
  
 List&amp;lt;User&gt; findAllUsers();
  
 User editUser(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
  
 User findUserById(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
  
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteUser(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
  
 User findByUsername(String &lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;);
  
} 

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;The managers classes implementation&lt;/h2&gt;
&lt;p&gt;An impl class is usually a class that implements the behaviour described by one of these interfaces. While the internal implementation class,  With transactions configured, we can now annotation a bean with &lt;b&gt;@Transactional&lt;/b&gt; and &lt;b&gt;@Service&lt;/b&gt; either at the class or method level. Then conversion Entity to DTO. This is stands for Data Transfer Object and is a simple Plain Old Java Object which contains class properties and getters and settings methods for accessing those properties.&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;We will create these class in the impl package &lt;/h2&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CompanyServiceImpl&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; DepartmentServiceImpl&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EmployeeService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EmployeePhoneServiceImpl&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ProjectServiceImpl&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; UserServiceImpl&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating a class CompanyServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/impl/CompanyServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCompanyServiceImpl(selectCompanyServiceImpl)&quot; id=&quot;idBtnCompanyServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCompanyServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.impl;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.CompanyDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.UserDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Company;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.CompanyService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Transactional&lt;/span&gt;
&lt;span style=&quot;color: #8a8787;&quot;&gt;@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CompanyServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; CompanyService{
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CompanyDao &lt;span style=&quot;color: blue;&quot;&gt;companyDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; UserDao &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Company addCompany(Company &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
 &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;.setCreateAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
 &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;.addCompany(&lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;);
 &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;companyDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;);
}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Company editCompany(Company &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
 Company &lt;span style=&quot;color: #82590f;&quot;&gt;existCompany&lt;/span&gt; = companyDao.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
 &lt;span style=&quot;color: #82590f;&quot;&gt;existCompany&lt;/span&gt;.setName(&lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;.getName());
 &lt;span style=&quot;color: #82590f;&quot;&gt;existCompany&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;.getDescription());
 &lt;span style=&quot;color: #82590f;&quot;&gt;existCompany&lt;/span&gt;.setLocation(&lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;.getLocation());
 &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;companyDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existCompany&lt;/span&gt;);
}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Company findCompany(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
 &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;companyDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteCompany(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
 &lt;span style=&quot;color: blue;&quot;&gt;companyDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
}

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Company&gt; findCompanies() {
 &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;companyDao&lt;/span&gt;.findAll();
}

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class DepartmentServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/impl/DepartmentServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyDepartmentServiceImpl(selectDepartmentServiceImpl)&quot; id=&quot;idBtnDepartmentServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDepartmentServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.impl;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.CompanyDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.DepartmentDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Company;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Department;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.DepartmentService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Transactional&lt;/span&gt;
&lt;span style=&quot;color: #8a8787;&quot;&gt;@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; DepartmentServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; DepartmentService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; DepartmentDao &lt;span style=&quot;color: blue;&quot;&gt;departmentDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CompanyDao &lt;span style=&quot;color: blue;&quot;&gt;companyDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Department addDepartment(Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Company &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;companyDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;.setCreateAt(new Date());
   &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;.addDepartment(&lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;departmentDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt;Department editDepartment(Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Department &lt;span style=&quot;color: #82590f;&quot;&gt;existDepartment&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;departmentDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;span style=&quot;color: #82590f;&quot;&gt;existDepartment&lt;/span&gt;.setCode(&lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;.getCode());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existDepartment&lt;/span&gt;.setLocation(&lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;.getLocation());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existDepartment&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;.getDescription());
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;departmentDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existDepartment&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Department findDepartment(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   return &lt;span style=&quot;color: blue;&quot;&gt;departmentDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteDepartment(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;departmentDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class EmployeePhoneServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/impl/EmployeePhoneServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEmployeePhoneServiceImpl(selectEmployeePhoneServiceImpl)&quot; id=&quot;idBtnEmployeePhoneServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployeePhoneServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.impl;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.EmployeeDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.EmployeePhoneDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Employee;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.EmployeePhone;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.EmployeePhoneService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Transactional&lt;/span&gt;
&lt;span style=&quot;color: #8a8787;&quot;&gt;@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; EmployeePhoneServiceImpl implements EmployeePhoneService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; EmployeePhoneDao &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; EmployeeDao &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; EmployeePhone addEmployeePhone(EmployeePhone &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;.addEmployeePhone(&lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; EmployeePhone editEmployeePhone(EmployeePhone &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   EmployeePhone &lt;span style=&quot;color: #82590f;&quot;&gt;exsitEmployeePhone&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;span style=&quot;color: #82590f;&quot;&gt;exsitEmployeePhone&lt;/span&gt;.setPhone(&lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;.getPhone());
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;exsitEmployeePhone&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteEmployeePhone(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;EmployeePhone&gt; findEmployeePhones(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;.getEmployeePhones();
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; EmployeePhone findEmployeePhone(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
 }	

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class EmployeeServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/impl/EmployeeServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEmployeeServiceImpl(selectEmployeeServiceImpl)&quot; id=&quot;idBtnEmployeeServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployeeServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.DepartmentDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.EmployeeDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Department;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Employee;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.EmployeeService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Transactional&lt;/span&gt;
&lt;span style=&quot;color: #8a8787;&quot;&gt;@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; EmployeeServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; EmployeeService{
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; EmployeeDao &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; DepartmentDao &lt;span style=&quot;color: blue;&quot;&gt;departmentDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Employee addEmployee(Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;departmentDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;.addEmployee(&lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Employee editEmployee(Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Employee &lt;span style=&quot;color: #82590f;&quot;&gt;existEmployee&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;span style=&quot;color: #82590f;&quot;&gt;existEmployee&lt;/span&gt;.setName(&lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;.getName());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existEmployee&lt;/span&gt;.setAddress(&lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;.getAddress());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existEmployee&lt;/span&gt;.setSalary(&lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;.getSalary());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existEmployee&lt;/span&gt;.setBirthDate(&lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;.getBirthDate());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existEmployee&lt;/span&gt;.setHiringDate(&lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;.getHiringDate());
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existEmployee&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Employee findEmployee(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteEmployee(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Employee&gt; findEmployees() {
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;.findAll();
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class ProjectServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/impl/ProjectServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyProjectServiceImpl(selectProjectServiceImpl)&quot; id=&quot;idBtnProjectServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProjectServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.DepartmentDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.EmployeeDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.ProjectDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Department;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Employee;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Project;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.ProjectService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Transactional&lt;/span&gt;
&lt;span style=&quot;color: #8a8787;&quot;&gt;@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ProjectServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; ProjectService {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ProjectDao &lt;span style=&quot;color: blue;&quot;&gt;projectDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; DepartmentDao &lt;span style=&quot;color: blue;&quot;&gt;departmentDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; EmployeeDao &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Project addProjectToEmployee(long &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idEmployee&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idProject&lt;/span&gt;) {
   Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idEmployee&lt;/span&gt;).get();
   Project &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;projectDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idProject&lt;/span&gt;).get();
   &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;.addProjectToEmploye(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projectDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Project addProjectToDeprtment(Project &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;departmentDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;.setCreateAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
   &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;.addProjectToDepratment(project);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projectDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Project editProject(Project project, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Project &lt;span style=&quot;color: #82590f;&quot;&gt;existProject&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;projectDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;span style=&quot;color: #82590f;&quot;&gt;existProject&lt;/span&gt;.setName(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;.getName());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existProject&lt;/span&gt;.setDescription(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;.getDescription());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existProject&lt;/span&gt;.setProcess(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;.getProcess());
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projectDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existProject&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Project findProject(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projectDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteProejct(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Project &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;projectDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;span style=&quot;color: blue;&quot;&gt;projectDao&lt;/span&gt;.delete(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Project&gt; findProjectsForEmplopyee(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;.getProjects();
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Project&gt; findProjects() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projectDao&lt;/span&gt;.findAll();
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteProjectFromEmployee(long &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idEmployee&lt;/span&gt;, long &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idProject&lt;/span&gt;) {
   Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;employeeDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idEmployee&lt;/span&gt;).get();
   Project &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;projectDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idProject&lt;/span&gt;).get();
   &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;.getProjects().remove(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;);
		
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class UserServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/impl/UserServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyUserServiceImpl(selectUserServiceImpl)&quot; id=&quot;idBtnUserServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUserServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Optional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.dao.UserDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.UserService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Transactional&lt;/span&gt;
&lt;span style=&quot;color: #8a8787;&quot;&gt;@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; UserServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; UserService {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; UserDao &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; User addUser(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   List&amp;lt;User&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;users&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.findAll();
    &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (users.size() == 0) {
    &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;.setAdmin(&lt;b style=&quot;color: purple;&quot;&gt;true&lt;/b&gt;);
   }
   &lt;b style=&quot;color: purple;&quot;&gt;for&lt;/b&gt; (User &lt;span style=&quot;color: #82590f;&quot;&gt;existUser&lt;/span&gt; : &lt;span style=&quot;color: #82590f;&quot;&gt;users&lt;/span&gt;) {
     &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (user.getUsername().equals(&lt;span style=&quot;color: #82590f;&quot;&gt;existUser&lt;/span&gt;.getUsername())) {
      &lt;span style=&quot;color: #82590f;&quot;&gt;existUser&lt;/span&gt;.setUsername(&lt;span style=&quot;color: #82590f;&quot;&gt;existUser&lt;/span&gt;.getUsername());
      &lt;span style=&quot;color: #82590f;&quot;&gt;existUser&lt;/span&gt;.setPassword(&lt;span style=&quot;color: #82590f;&quot;&gt;existUser&lt;/span&gt;.getPassword());
      &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existUser&lt;/span&gt;);
   }
 }

    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;User&gt; findAllUsers() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.findAll();
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; User editUser(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   User &lt;span style=&quot;color: #82590f;&quot;&gt;existUser&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;span style=&quot;color: #82590f;&quot;&gt;existUser&lt;/span&gt;.setUsername(&lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;.getUsername());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existUser&lt;/span&gt;.setPassword(&lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;.getPassword());
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existUser&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; User findUserById(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; void deleteUser(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; User findByUsername(String &lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;) {
   Optional&amp;lt;User&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;users&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.findByUsername(&lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;);
    &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (&lt;span style=&quot;color: #82590f;&quot;&gt;users&lt;/span&gt;.isPresent()) {
     User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;users&lt;/span&gt;.get();
     &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;;
   }
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;;
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;@RestController API&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;@RestController&lt;/b&gt; is a convenience annotation for creating Restful controllers. It is a specialization of @Component and is autodetected through classpath scanning. It adds the @Controller and @ResponseBody annotations. It converts the response to JSON or XML. It does not work with the view technology, so the methods cannot return ModelAndView. It is typically used in combination with annotated handler methods based on the @RequestMapping annotation.&lt;/p&gt;&lt;br/&gt;

&lt;h2&gt;We will create these class in controller package:&lt;/h2&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CompanyController&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; DepartmentController&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EmployeeController&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EmployeePhoneController&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ProjectController&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; UserController&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating a class CompanyController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/controller/CompanyController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCompanyController(selectCompanyController)&quot; id=&quot;idBtnCompanyController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCompanyController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Company;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.CompanyService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: blue;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CompanyController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CompanyService &lt;span style=&quot;color: blue;&quot;&gt;companyService&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/addCompany/{id}&quot;&lt;/span&gt;)
 Company addCompany( &lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt;Company &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;companyService&lt;/span&gt;.addCompany(&lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/editCompany/{id}&quot;&lt;/span&gt;)
 Company editCompany( &lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Company &lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;companyService&lt;/span&gt;.editCompany(&lt;span style=&quot;color: #82590f;&quot;&gt;company&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findCompany/{id}&quot;&lt;/span&gt;)
 Company findCompany(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;companyService&lt;/span&gt;.findCompany(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/deleteCompany/{id}&quot;&lt;/span&gt;)
 void deleteCompany(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;companyService&lt;/span&gt;.deleteCompany(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findCompanies&quot;&lt;/span&gt;)
 List&amp;lt;Company&gt; findCompaniesForUser() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;companyService&lt;/span&gt;.findCompanies();
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class DepartmentController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/controller/DepartmentController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyDepartmentController(selectDepartmentController)&quot; id=&quot;idBtnDepartmentController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDepartmentController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Department;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.DepartmentService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: blue;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; DepartmentController {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; DepartmentService &lt;span style=&quot;color: blue;&quot;&gt;departmentService&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/addDepartment/{id}&quot;&lt;/span&gt;)
 Department addDepartment(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;departmentService&lt;/span&gt;.addDepartment(&lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/editDepartment/{id}&quot;&lt;/span&gt;)
 Department editDepartment(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Department &lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;departmentService&lt;/span&gt;.editDepartment(&lt;span style=&quot;color: #82590f;&quot;&gt;department&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findDepartment/{id}&quot;&lt;/span&gt;)
 Department findDepartment(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;departmentService&lt;/span&gt;.findDepartment(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/deleteDepartment/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteDepartment(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;departmentService&lt;/span&gt;.deleteDepartment(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class EmployeeController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/controller/EmployeeController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEmployeeController(selectEmployeeController)&quot; id=&quot;idBtnEmployeeController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployeeController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Employee;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.EmployeeService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: blue;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; EmployeeController {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; EmployeeService &lt;span style=&quot;color: blue;&quot;&gt;employeeService&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/addEmployee/{id}&quot;&lt;/span&gt;)
 Employee addEmployee(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeeService&lt;/span&gt;.addEmployee(&lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/editEmployee/{id}&quot;&lt;/span&gt;)
 Employee editEmployee(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Employee &lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeeService&lt;/span&gt;.editEmployee(&lt;span style=&quot;color: #82590f;&quot;&gt;employee&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findEmployee/{id}&quot;&lt;/span&gt;)
 Employee findEmployee(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeeService&lt;/span&gt;.findEmployee(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/deleteEmployee/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteEmployee(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;employeeService&lt;/span&gt;.deleteEmployee(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findEmployees&quot;&lt;/span&gt;)
 List&amp;lt;Employee&gt; findEmployees() {
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeeService&lt;/span&gt;.findEmployees();
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class EmployeePhoneController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/controller/EmployeePhoneController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEmployeePhoneController(selectEmployeePhoneController)&quot; id=&quot;idBtnEmployeePhoneController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployeePhoneController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.EmployeePhone;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.EmployeePhoneService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: blue;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; EmployeePhoneController {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; EmployeePhoneService &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneService&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/addEmployeePhone/{id}&quot;&lt;/span&gt;)
 EmployeePhone addEmployeePhone(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; EmployeePhone &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneService&lt;/span&gt;.addEmployeePhone(&lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/editEmployeePhone/{id}&quot;&lt;/span&gt;)
 EmployeePhone editEmployeePhone(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; EmployeePhone &lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneService&lt;/span&gt;.editEmployeePhone(&lt;span style=&quot;color: #82590f;&quot;&gt;employeePhone&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/deleteEmployeePhone/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteEmployeePhone(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneService&lt;/span&gt;.deleteEmployeePhone(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findEmployeePhones/{id}&quot;&lt;/span&gt;)
 List&amp;lt;EmployeePhone&gt; findEmployeePhones(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneService&lt;/span&gt;.findEmployeePhones(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findEmployeePhone/{id}&quot;&lt;/span&gt;)
 EmployeePhone findEmployeePhone(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;employeePhoneService&lt;/span&gt;.findEmployeePhone(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class ProjectController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/controller/ProjectController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyProjectController(selectProjectController)&quot; id=&quot;idBtnProjectController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProjectController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.Project;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.ProjectService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: blue;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ProjectController {
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ProjectService &lt;span style=&quot;color: blue;&quot;&gt;projectService&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/addProjectToEmployee/{idEmployee}/{idProject}&quot;&lt;/span&gt;)
 Project addProjectToEmploye(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idEmployee&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idProject&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projectService&lt;/span&gt;.addProjectToEmployee(&lt;span style=&quot;color: #82590f;&quot;&gt;idEmployee&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idProject&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/addProjectToDeprtment/{id}&quot;&lt;/span&gt;)
 Project addProjectToDeprtment(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Project &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projectService&lt;/span&gt;.addProjectToDeprtment(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/editProject/{id}&quot;&lt;/span&gt;)
 Project editProject(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Project &lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projectService&lt;/span&gt;.editProject(&lt;span style=&quot;color: #82590f;&quot;&gt;project&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findProject/{id}&quot;&lt;/span&gt;)
 Project findProject(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projectService&lt;/span&gt;.findProject(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/deleteProejct/{id}&quot;&lt;/span&gt;)
 void deleteProejct(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;projectService&lt;/span&gt;.deleteProejct(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findProjectsForEmplopyee/{id}&quot;&lt;/span&gt;)
 List&amp;lt;Project&gt; findProjectsForEmplopyee(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projectService&lt;/span&gt;.findProjectsForEmplopyee(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findProjects&quot;&lt;/span&gt;)
 List&amp;lt;Project&gt; findProjects() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;projectService&lt;/span&gt;.findProjects();
 }
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/deleteProjectFromEmployee/{idEmployee}/{idProject}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteProjectFromEmployee(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idEmployee&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idProject&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;projectService&lt;/span&gt;.deleteProjectFromEmployee(&lt;span style=&quot;color: #82590f;&quot;&gt;idEmployee&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;idProject&lt;/span&gt;);
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class UserController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/controller/UserController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyUserController(selectUserController)&quot; id=&quot;idBtnUserController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUserController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.company.service.UserService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: blue;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; UserController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; UserService &lt;span style=&quot;color: blue;&quot;&gt;userService&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/addUser&quot;&lt;/span&gt;)
 User addUser(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userService&lt;/span&gt;.addUser(&lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findAllUsers&quot;&lt;/span&gt;)
 List&amp;lt;User&gt; findAllUsers() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userService&lt;/span&gt;.findAllUsers();
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/editUser/{id}&quot;&lt;/span&gt;)
 User editUser(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userService&lt;/span&gt;.editUser(&lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findUserById/{id}&quot;&lt;/span&gt;)
 User findUserById(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userService&lt;/span&gt;.findUserById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/deleteUser/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteUser(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;userService&lt;/span&gt;.deleteUser(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #5352ed;&quot;&gt;&quot;/findByUsername/{username}&quot;&lt;/span&gt;)
 User findByUsername(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; String &lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userService&lt;/span&gt;.findByUsername(&lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;);
 }
}


&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;CompanyApplication&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;@BookStoreApplication&lt;/b&gt; and its use in a simple Spring Boot application. We use the @SpringBootApplication annotation in our Application or Main class to enable a host of features, e.g. Java-based Spring configuration, component scanning, and in particular for enabling Spring &lt;/p&gt;&lt;br /&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/company/CompanyApplication.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCompanyApplication(selectCompanyApplication)&quot; id=&quot;idBtnCompanyApplication&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCompanyApplication&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.company;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.boot.autoconfigure.SpringBootApplication;

&lt;span style=&quot;color: #8a8787;&quot;&gt;
@SpringBootApplication&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CompanyApplication {

 &lt;b style=&quot;color: purple;&quot;&gt;public static void&lt;/b&gt; main(String[] &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;) {
   SpringApplication.run(CompanyApplication.&lt;b style=&quot;color: purple;&quot;&gt;class&lt;/b&gt;, &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;);		
   System.&lt;b style=&quot;color: blue;&quot;&gt;out&lt;/b&gt;.println(&lt;span style=&quot;color: blue;&quot;&gt;&quot;App started....&quot;&lt;/span&gt;);
  }
  
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Spring Boot example when building a @RestController API.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp; Spring Data JPA, as well, we are gooing to continue with Angular project structure for building a front-end app to make HTTP requests and consume responses.&lt;/p&gt;&lt;br&gt;&lt;br&gt;


&lt;div style=&quot;background: #fff; border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://www.programmingwithdrama.com/2021/02/building-application-bank-with-spring.html&quot;&gt;Building application Company with Spring boot and Angular Part 2&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: none 0% 0% repeat scroll rgb(0, 137, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/company-spring&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download This Application My Company From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;

&lt;style&gt;
pre:before {
   content: none;
}
pre {
background: #ddd;
line-height: 20px;
position: relative;
overflow: auto;
width: 100%;
border: 1px solid #d0c6c6;
margin-top: 16px;
}
  
code {
 padding: 0px 0px 0 20px;
 display: block; 
 color: #000; 
 font-family: monospace; 
 font-size: 16px;
 margin-top: -30px;
}
  .h2-title {
   background: #b2bec3; 
   border-left: 10px solid #8e44ad; 
   padding: 10px !important;
  } 
    .h3-title {
   background: #8e44ad; 
   padding: 10px !important;
   margin-bottom: -16px !important;
   color: #FFF !important;
  }
 pre div::selection,
 b::selection,
 code::selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
   padding: 0px 16px;
}
pre div::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
  padding: 0px 16px;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
&lt;/style&gt;

&lt;script data-ad-client=&quot;ca-pub-7401879888732563&quot; async src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
 
&lt;script&gt;
  function copyPom(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPom&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyPro(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPro&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCompany(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCompany&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDepartment(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDepartment&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployee(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployee&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployeePhone(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployeePhone&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProject(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProject&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCompany(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCompany&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUser(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUser&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProcess(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProcess&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCompanyDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCompanyDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDepartmentDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDepartmentDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployeeDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployeeDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployeePhoneDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployeePhoneDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProjectDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProjectDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUserDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUserDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCompanyService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCompanyService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDepartmentService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDepartmentService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployeePhoneService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployeePhoneService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployeeService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployeeService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProjectService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProjectService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUserService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUserService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCompanyServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCompanyServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDepartmentServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDepartmentServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployeePhoneServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployeePhoneServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployeeServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployeeServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProjectServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProjectServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUserServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUserServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCompanyController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCompanyController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDepartmentController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDepartmentController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployeeController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployeeController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployeePhoneController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployeePhoneController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProjectController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProjectController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUserController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUserController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCompanyApplication(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCompanyApplication&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/5156380753561829799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-company-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/5156380753561829799'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/5156380753561829799'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-company-with.html' title='Building an application Company with Spring boot and Angular Part 1'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/bE4iUcBWUt8/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-4064866106192014610</id><published>2022-01-18T03:43:00.020-08:00</published><updated>2022-08-26T09:03:04.970-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ionic"/><title type='text'>Building an application enterprise with Spring boot &amp; Ionic Part 2</title><content type='html'>&lt;h1 style=&quot;background: rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Ionic&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/05/nchd.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;452&quot; data-original-width=&quot;800&quot; src=&quot;https://zupimages.net/up/21/05/nchd.png&quot; width=&quot;800&quot; style=&quot;border: 1px solid;&quot;/&gt;&lt;/a&gt;&lt;/div&gt;

&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;wN6u-eM9ULc&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/wN6u-eM9ULc&quot;&gt;&lt;/iframe&gt;

&lt;h3&gt;In this part 2 of enterprise application we will buid an application with Ionic framewotk&lt;/h3&gt;
&lt;p&gt;
The objective of this tutorial is how to know Design Patterns work. In this tutorial we will create an application enterprise to calculate the language and the level for the applications how many language used in the app like Java, Php, Javascript etc... Criticality like Low, Medium and High. 
&lt;/p&gt;&lt;br&gt;

&lt;p&gt;Ionic apps are created and developed primarily through the Ionic command line utility (the “CLI”), and use Cordova to build/deploy as a native app. This means we need to install a few utilities to get developing.&lt;/p&gt;

&lt;h2&gt;Installing Ionic&lt;/h2&gt;
&lt;p&gt;Ionic apps are created and developed primarily through the Ionic command-line utility. The Ionic CLI is the preferred method of installation, as it offers a wide range of dev tools and help options along the way. It is also the main tool through which to run the app and connect it to other services, such as Ionic Appflow.&lt;/p&gt;

&lt;h4 style=&quot;color: #c0392b&quot;&gt;Before proceeding, make sure your computer has Node.js installed. &lt;/h4&gt;
&lt;p&gt;Install the Ionic CLI with npm:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #fff; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span style=&quot;color: #fff; font-weigth: bold;&quot;&gt;npm install -g @ionic/cli&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Starting an App&lt;/h2&gt;
&lt;p&gt;Starting a new Ionic app is incredibly simple. From the command line, run the ionic start command and the CLI will handle the rest.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Here, myApp is the name of the project, blank is the starter template, and the project type is angular.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #fff; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span style=&quot;color: #fff; font-weigth: bold;&quot;&gt;ionic start enterprise tabs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 style=&quot;color: #fb4834;&quot;&gt;Project structure&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/05/xj5r.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;519&quot; src=&quot;https://zupimages.net/up/21/05/xj5r.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;p&gt;Let&#39;s go through the files and folders of the app. &lt;/p&gt;

&lt;h2&gt;/ src &lt;/h2&gt;
&lt;p&gt;Inside of the /src directory we find our raw, uncompiled code. This is where most of the work for your Ionic app will take place.&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;/ app &lt;/h2&gt;
&lt;p&gt;The App folder is the largest folder because it contains all the code of our ionic app. It has all the components, modules, pages, services and styles you will use to build your app.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;This is the core of the project. Let’s have a look at the structure of this folder so you get an idea where to find things and where to add your own modules to adapt this project to your particular needs.&lt;/p&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Modals&lt;/h2&gt;
&lt;p&gt;Create a folder modal in side it add a class &lt;strong&gt;Model.ts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;src/app/modal/Modal.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyModal(selectModal)&quot; id=&quot;idBtnModal&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectModal&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;User&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;string&lt;/span&gt;;
}

&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;Application&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;description&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;string&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;criticality&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Criticality&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;language&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Language&lt;/span&gt;;
}

&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;Enterprise&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;description&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;string&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;applications&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Application&lt;/span&gt;[];
}

&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;enum&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;Criticality&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;LOW&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;MEDIUM&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;HIGH&lt;/span&gt;,
}
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;enum&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;Language&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;JAVA&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;JAVASCRIPT&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;PHP&lt;/span&gt;,
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;title&quot;&gt;Angular Services&lt;/h2&gt;
&lt;p&gt;Angular services are singleton objects that get instantiated only once during the lifetime of an application. They contain methods that maintain data throughout the life of an application, i.e. data does not get refreshed and is available all the time. The main objective of a service is to organize and share business logic, models, or data and functions with different components of an Angular application.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;An example of when to use services would be to transfer data from one controller to another custom service.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;Why Should We Use Services in Angular?
The separation of concerns is the main reason why Angular services came into existence. An Angular service is a stateless object and provides some very useful functions. These functions can be invoked from any component of Angular, like Controllers, Directives, etc. This helps in dividing the web application into small, different logical units which can be reused.&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;Create these service in the service package &lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;-&gt; ApplicationService&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;-&gt; EnterpriseService&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;-&gt; UserService&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/service/application-service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyApplicationService(selectApplicationService)&quot; id=&quot;idBtnApplicationService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectApplicationService&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Injectable&lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Observable&lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Application&lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #16a085;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;root&#39;&lt;/span&gt;,
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;ApplicationService&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;createApplication&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Application&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/createApplication/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt;
    );
  }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;createApplicationForEnterprise&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idApplication&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/createApplicationForEnterprise/&lt;span style=&quot;color: #2980b9&quot;&gt;${idApplication}&lt;/span&gt;/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;null&lt;/span&gt;
    );
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;deleteApplication&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/deleteApplication/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;
    );
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;findApplication&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/findApplication/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;
    );
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;findApplications&lt;/span&gt;(): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any[]&gt;&lt;/span&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;[]&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/findApplications`&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;findApplicationsForEnterprise&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any[]&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/findApplicationsForEnterprise/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/enterprise-service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyEnterpriseService(selectEnterpriseService)&quot; id=&quot;idBtnEnterpriseService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEnterpriseService&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Injectable&lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Observable&lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Enterprise&lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #16a085;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;root&#39;&lt;/span&gt;,
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;EnterpriseService&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;createEnterprise&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;enterprise&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Enterprise&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/createEnterprise`&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;enterprise&lt;/span&gt;
    );
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;deleteEnterprise&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/deleteEnterprise/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;
    );
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;findEnterprise&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/findEnterprise/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;
    );
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;findEnterprises&lt;/span&gt;(): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;[]&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/findEnterprises`&lt;/span&gt;);
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;findApplicationsForEnterprise&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;[]&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/findApplicationsForEnterprise/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  
 &lt;span style=&quot;color: #f39c12;&quot;&gt;calculateJava&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/calculateJava/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;calculateLow&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/calculateLow/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  
 &lt;span style=&quot;color: #f39c12;&quot;&gt;calculateMedium&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/calculateMedium/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;calculatePhp&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/calculatePhp/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;calculateHigh&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/calculateHigh/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;calculateJavascript&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/calculateJavascript/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/user-service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyUserService(selectUserService)&quot; id=&quot;idBtnUserService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUserService&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Injectable&lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Observable&lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;User&lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #16a085;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;root&#39;&lt;/span&gt;,
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;UserService&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;createUser&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;User&lt;/span&gt;): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/createUser`&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;
    );
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;findUsers&lt;/span&gt;(): &lt;span style=&quot;color: #16a085;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #16a085;&quot;&gt;any&lt;/span&gt;[]&gt;(
      &lt;span style=&quot;color: #d35400;&quot;&gt;`http://localhost:8080/api/findUsers`&lt;/span&gt;);
  }
  
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;title&quot;&gt;Create pages&lt;/h2&gt;
&lt;p&gt;Now we&#39;ll continue with the project by adding pages which are the basic buildings of an Ionic app. So let&#39;s get started. You can create pages either manually or generating them using the Ionic CLI v5 which is the recommended method. In this guide we&#39;ll look first at how to create a page generate it with the Ionic CLI, then how to add it to the project. &lt;/p&gt;&lt;br&gt;

&lt;h2&gt;We will use these pages&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- add-user.page.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- add-user.page.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/add-user.page.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddUserPageTs(selectAddUserPageTs)&quot; id=&quot;idBtnAddUserPageTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddUserPageTs&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;User &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;UserService &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../service/user.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #16a085;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;app-add-user&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./add-user.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./add-user.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;AddUserPage&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;users&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;User&lt;/span&gt;[];
  &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;User&lt;/span&gt; = {} &lt;span style=&quot;color: #2c3e50;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;User&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;UserService&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findUsers&lt;/span&gt;().&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;users&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;users&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;users&lt;/span&gt;;
    });
  }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;addUser&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;createUser&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;;
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;reload&lt;/span&gt;();
    })
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-user.page.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddUserPageHtml(selectAddUserPageHtml)&quot; id=&quot;idBtnAddUserPageHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddUserPageHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;translucent&lt;/span&gt;]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;true&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;dark&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Users&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

 &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;fullscreen&lt;/span&gt;]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;true&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;user&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;ngSubmit&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;addUser&lt;/span&gt;()&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;novalidate&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;position&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;floating&quot;&lt;/span&gt;&gt;Name&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;Enter name&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;name&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;user.name&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;#name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; required&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;success&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #d35400&quot;&gt;&quot;block&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;name.invalid&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
  
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;Find all users&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
     
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;let u of users&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;lines&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;full&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          {{u.name}}
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;success&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;end&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;create-outline&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;cursor: pointer;&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;/add-application/&#39;&lt;/span&gt;, u.id]&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
      
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
  
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2&gt;We will use these pages&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- add-application.page.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- add-application.page.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/add-application.page.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddApplicationTs(selectAddApplicationTs)&quot; id=&quot;idBtnAddApplicationTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddApplicationTs&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Router, ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Application&lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ApplicationService&lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../service/application.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #16a085;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;app-add-application&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./add-application.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./add-application.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;AddApplicationPage&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #16a085;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Application&lt;/span&gt; = {} &lt;span style=&quot;color: #2c3e50;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;Application&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;criticality&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;any&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;language&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;any&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;applicationService&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;ApplicationService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Router&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;ActivatedRoute&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;route.snapshot.params.id&lt;/span&gt;;
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;setCriticality&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;e&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;criticality&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;e.target.value&lt;/span&gt;;
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;setLanguage&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;e&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;language&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;e.target.value&lt;/span&gt;;
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;addApplication&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;criticality&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;criticality&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;language&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;language&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;applicationService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;createApplication&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt;;
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;reload&lt;/span&gt;();
    })
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;cancel&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;navigateByUrl&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;/tabs/add-user&quot;&lt;/span&gt;)
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-application.page.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddApplicationHtml(selectAddApplicationHtml)&quot; id=&quot;idBtnAddApplicationHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddApplicationHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;dark&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;cancel&lt;/span&gt;()&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;

    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
    
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;application&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;ngSubmit&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;addApplication&lt;/span&gt;()&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;novalidate&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;position&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;floating&quot;&lt;/span&gt;&gt;Name&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;Enter name&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;name&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;application.name&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;#name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; required&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        
       &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
         &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;position&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;floating&quot;&lt;/span&gt;&gt;Description&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-textarea&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;Enter description&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;description&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;application.description&quot;&lt;/span&gt;
            &lt;span style=&quot;color: #2980b9&quot;&gt;#description&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; required&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-textarea&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
       
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio-group&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #2980b9&quot;&gt;&quot;criticality&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;ionChange&lt;/span&gt;)=&lt;span style=&quot;color: #2980b9&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;setCriticality&lt;/span&gt;($event)&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list-header&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;Criticality&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list-header&lt;/span&gt;&gt;
            
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;LOW&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;start&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;LOW&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt;&gt;
         &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
         
           &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;MEDIUM&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;start&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;MEDIUM&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt;&gt;
         &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
         
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;HIGH&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;start&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;HIGH&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt;&gt;
         &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
            
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio-group&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
       
       &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio-group&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #2980b9&quot;&gt;&quot;language&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;ionChange&lt;/span&gt;)=&lt;span style=&quot;color: #2980b9&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;setLanguage&lt;/span&gt;($event)&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list-header&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;Language&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list-header&lt;/span&gt;&gt;
            
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;JAVA&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;start&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;JAVA&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt;&gt;
         &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
         
           &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;JAVASCRIPT&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;start&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;JAVASCRIPT&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt;&gt;
         &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
         
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;PHP&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;start&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;PHP&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio&lt;/span&gt;&gt;
         &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
            
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-radio-group&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
        
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;success&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #d35400&quot;&gt;&quot;block&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;name.invalid&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2&gt;We will use these pages&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- add-enterprise.page.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- add-enterprise.page.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/add-enterprise.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddEnterpriseTs(selectAddEnterpriseTs)&quot; id=&quot;idBtnAddEnterpriseTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddEnterpriseTs&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Router &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Enterprise &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;EnterpriseService &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../service/enterprise.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #16a085;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;app-add-enterprise&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./add-enterprise.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./add-enterprise.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;AddEnterprisePage&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;enterprise&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Enterprise&lt;/span&gt; = {} &lt;span style=&quot;color: #2c3e50;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;Enterprise&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;Router&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;EnterpriseService&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;addEnterprise&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;createEnterprise&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterprise&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;enterprise&lt;/span&gt; =&gt; {
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;enterprise&lt;/span&gt;;
     &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;reload&lt;/span&gt;();
   })
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;cancel&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;navigateByUrl&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;/tabs/find-enterprises&quot;&lt;/span&gt;);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-enterprise.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddEnterpriseHtml(selectAddEnterpriseHtml)&quot; id=&quot;idBtnAddEnterpriseHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddEnterpriseHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;dark&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;cancel&lt;/span&gt;()&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;

    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
    
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;application&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;ngSubmit&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;addEnterprise&lt;/span&gt;()&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;novalidate&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;position&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;floating&quot;&lt;/span&gt;&gt;Name&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;Enter name&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;name&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;enterprise.name&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;#name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; required&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        
       &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
         &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;position&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;floating&quot;&lt;/span&gt;&gt;Description&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-textarea&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;Enter description&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;description&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;enterprise.description&quot;&lt;/span&gt;
            &lt;span style=&quot;color: #2980b9&quot;&gt;#description&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; required&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-textarea&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; 
        
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;success&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #d35400&quot;&gt;&quot;block&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;name.invalid&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2&gt;We will use these pages&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- find-enterprises.page.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- find-enterprises.page.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/find-enterprises.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindEnterprisesPageTs(selectFindEnterprisesPageTs)&quot; id=&quot;idBtnFindEnterprisesPageTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindEnterprisesPageTs&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Enterprise &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;EnterpriseService &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../service/enterprise.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #16a085;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;app-find-enterprises&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./find-enterprises.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./find-enterprises.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;FindEnterprisesPage&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;enterprises&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Enterprise&lt;/span&gt;[];

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;EnterpriseService&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findEnterprises&lt;/span&gt;().&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;enterprises&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterprises&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;enterprises&lt;/span&gt;;
    })
  }

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/find-enterprises.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindEnterprisesHtml(selectFindEnterprisesHtml)&quot; id=&quot;idBtnFindEnterprisesHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindEnterprisesHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;translucent&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;true&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;dark&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
      Enterprises
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;primary&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;/add-enterprise&#39;&lt;/span&gt;]&quot;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;secondary&quot;&lt;/span&gt;&gt;
        Add enterprise
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;end&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;create-outline&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;fullscreen&lt;/span&gt;]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;true&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;Find all enterprises&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;let e of enterprises&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;button&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;/find-enterprise/&#39;&lt;/span&gt;, e.id]&quot; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;secondary&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          {{e.name}}
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;


&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;h2&gt;We will use these pages&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- find-enterprise.page.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- find-enterprise.page.html&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- find-enterprise.page.scss&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/find-enterprise.page.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindEnterpriseTs(selectFindEnterpriseTs)&quot; id=&quot;idBtnFindEnterpriseTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindEnterpriseTs&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Router, ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Enterprise, Application &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ApplicationService &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../service/application.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;EnterpriseService &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../service/enterprise.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #16a085;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;app-find-enterprise&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./find-enterprise.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./find-enterprise.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;FindEnterprisePage&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;applications&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Application&lt;/span&gt;[];
  &lt;span style=&quot;color: #2980b9&quot;&gt;filterApps&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Application&lt;/span&gt;[];  
  &lt;span style=&quot;color: #2980b9&quot;&gt;enterprise&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Enterprise&lt;/span&gt; = {} &lt;span style=&quot;color: #2c3e50;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;Enterprise&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;calculateJava&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;calculateJavascript&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;calculatePhp&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;calculateLow&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;calculateMedium&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;calculateHigh&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;EnterpriseService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;ActivatedRoute&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;applicationService&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;ApplicationService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Router&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;route.snapshot.params.id&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findEnterprise&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;enterprise&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;enterprise&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;applicationService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findApplications&lt;/span&gt;().&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;applications&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;applications&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;applications&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;applicationService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findApplicationsForEnterprise&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;filterApps&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;filterApps&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;filterApps&lt;/span&gt;;
        &lt;span style=&quot;color: #2980b9&quot;&gt;filterApps&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;forEach&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;app&lt;/span&gt; =&gt; {
         &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;applications&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;applications&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;filter&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;a&lt;/span&gt; =&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;a&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; !== &lt;span style=&quot;color: #2980b9&quot;&gt;app&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;)
        })
      })
    })
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;getCalculate&lt;/span&gt;();
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;setApplication&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;e&lt;/span&gt;) {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;applicationService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;createApplicationForEnterprise&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;e.target.value&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
     &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;reload&lt;/span&gt;();
   })
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;getCalculate&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;calculateJava&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;calculateJava&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;calculateJava&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;calculateJava&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;calculateJavascript&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;calculateJavascript&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;calculateJavascript&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;calculateJavascript&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;calculatePhp&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;calculatePhp&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;calculatePhp&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;calculatePhp&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;calculateLow&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;calculateLow&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;calculateLow&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;calculateLow&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;calculateMedium&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;calculateMedium&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;calculateMedium&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;calculateMedium&lt;/span&gt;;
    })
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;calculateHigh&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;calculateHigh&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;calculateHigh&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;calculateHigh&lt;/span&gt;;
    })
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;navigateByUrl&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;/tabs/find-enterprises&quot;&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;deleteEnterprise&lt;/span&gt;() {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #f39c12;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;))
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;enterpriseService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;deleteEnterprise&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;/tabs/find-enterprises&#39;&lt;/span&gt;)
    })
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/find-enterprise.page.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindEnterpriseHtml(selectFindEnterpriseHtml)&quot; id=&quot;idBtnFindEnterpriseHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindEnterpriseHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;dark&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;cancel&lt;/span&gt;()&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;fullscreen&lt;/span&gt;]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;true&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;stories&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;story&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;img-box&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;content&quot;&lt;/span&gt;&gt;{{calculateJava}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;color: #86888f;&quot;&lt;/span&gt;&gt;JAVA&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;story&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;img-box&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;content&quot;&lt;/span&gt;&gt;{{calculateJavascript}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;color: #86888f;&quot;&lt;/span&gt;&gt;JAVASCRIPT&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;story&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;img-box&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;content&quot;&lt;/span&gt;&gt;{{calculatePhp}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;color: #86888f;&quot;&lt;/span&gt;&gt;PHP&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;story&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;img-box&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;content&quot;&lt;/span&gt;&gt;{{calculateLow}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;color: #86888f;&quot;&lt;/span&gt;&gt;LOW&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;story&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;img-box&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;content&quot;&lt;/span&gt;&gt;{{calculateMedium}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;color: #86888f;&quot;&lt;/span&gt;&gt;MEDIUM&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;story&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;img-box&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;content&quot;&lt;/span&gt;&gt;{{calculateHigh}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;color: #86888f;&quot;&lt;/span&gt;&gt;HIGH&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;
 
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;{{enterprise.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;Enterprise details&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;{{enterprise.description}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;margin-left: 15px;&quot;&lt;/span&gt;&gt;Applications&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;disabled&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;true&quot;&lt;/span&gt;&gt;Add application&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-select&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;ionChange&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;setApplication&lt;/span&gt;($event)&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-select-option&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;let app of applications&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;app.id&quot;&lt;/span&gt;&gt;{{app.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-select-option&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-select&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;let app of filterApps&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;dark&quot;&lt;/span&gt;&gt;{{app.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;app.criticality==[&#39;LOW&#39;]&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;success&quot;&lt;/span&gt;&gt;{{app.criticality}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;app.criticality==[&#39;MEDIUM&#39;]&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;secondary&quot;&lt;/span&gt;&gt;{{app.criticality}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;app.criticality==[&#39;HIGH&#39;]&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;{{app.criticality}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;medium&quot;&lt;/span&gt;&gt;{{app.language}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;full&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;outline&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;danger&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;deleteEnterprise&lt;/span&gt;()&quot;&lt;/span&gt;&gt;Delete this enterprise&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/find-enterprise.page.scss&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindEnterpriseScss(selectFindEnterpriseScss)&quot; id=&quot;idBtnFindEnterpriseScss&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindEnterpriseScss&quot;&gt;

&lt;span style=&quot;color: #f39c12;&quot;&gt;.text-stories&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;flex&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;justify-content&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;space-between&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-size&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;smaller&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-weight&lt;/span&gt;: 700;
  &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;: #171717;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-left&lt;/span&gt;: 7px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-right&lt;/span&gt;: 7px;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;.stories&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;flex&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;overflow&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;scroll&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-left&lt;/span&gt;: 15px;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;.stories .img-box&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-left&lt;/span&gt;: 7px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-right&lt;/span&gt;: 12px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;background-image&lt;/span&gt;: url(&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;https://drissas.com/wp-content/uploads/2019/11/instagram-bg-color.jpg&quot;&lt;/span&gt;);
  &lt;span style=&quot;color: #2980b9&quot;&gt;background-size&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;contain&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;border-radius&lt;/span&gt;: 50%;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;.stories .content&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;width&lt;/span&gt;: 50px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;max-width&lt;/span&gt;: none;
  &lt;span style=&quot;color: #2980b9&quot;&gt;height&lt;/span&gt;: 50px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;max-height&lt;/span&gt;: none;
  &lt;span style=&quot;color: #2980b9&quot;&gt;border-radius&lt;/span&gt;: 50%;
  &lt;span style=&quot;color: #2980b9&quot;&gt;overflow&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;hidden&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;border&lt;/span&gt;: 2px &lt;span style=&quot;color: #d35400;&quot;&gt;solid white&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-bottom&lt;/span&gt;: -3px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;text-align&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;center&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-size&lt;/span&gt;: 22px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;aliceblue&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-weight&lt;/span&gt;: bold;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-top&lt;/span&gt;: 2px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;padding-top&lt;/span&gt;: 8px;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;.stories p&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-size&lt;/span&gt;: 11px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;text-align&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;center&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin&lt;/span&gt;: 4px 0px 0px 0px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-weigh&lt;/span&gt;t: 500;
  &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;#383a3e&lt;/span&gt;;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;.add_story&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;position&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;relative&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-left&lt;/span&gt;: 7px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-right&lt;/span&gt;: 12px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;border-radius&lt;/span&gt;: 50%;
  &lt;span style=&quot;color: #2980b9&quot;&gt;padding&lt;/span&gt;: 2px;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;.add_story ion-icon&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;position&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;absolute&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;bottom&lt;/span&gt;: 1px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;right&lt;/span&gt;: 1px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;border-radius&lt;/span&gt;: 50%;
  &lt;span style=&quot;color: #2980b9&quot;&gt;background-color&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;white&lt;/span&gt;;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;hr&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;height&lt;/span&gt;: 2px &lt;span style=&quot;color: #d35400;&quot;&gt;!important&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;width&lt;/span&gt;: 100% &lt;span style=&quot;color: #d35400;&quot;&gt;!important&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;background&lt;/span&gt;: #d5d5d5 &lt;span style=&quot;color: #d35400;&quot;&gt;!important&lt;/span&gt;;
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2&gt;We will use these pages&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- find-applications.page.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- find-applications.page.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/find-applications.page.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindApplicationsTs(selectFindApplicationsTs)&quot; id=&quot;idBtnFindApplicationsTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindApplicationsTs&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Application &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ApplicationService &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../service/application.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #16a085;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;app-find-applications&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./find-applications.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./find-applications.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;FindApplicationsPage&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;applications&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Application&lt;/span&gt;[];

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;applicationService&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;ApplicationService&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;applicationService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findApplications&lt;/span&gt;().&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;applications&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;applications&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;applications&lt;/span&gt;;
    })
  }

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/find-applications.page.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindApplicationsHtml(selectFindApplicationsHtml)&quot; id=&quot;idBtnFindApplicationsHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindApplicationsHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;translucent&lt;/span&gt;]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;true&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;dark&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Applications&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

 &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;fullscreen&lt;/span&gt;]=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;true&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;Find all application&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;let app of applications&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;button&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;/find-application/&#39;&lt;/span&gt;, app.id]&quot; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;tertiary&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          {{app.name}}
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
   &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;

 &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;h2&gt;We will use these pages&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- find-application.page.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- find-application.page.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/find-application.page.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindApplicationTs(selectFindApplicationTs)&quot; id=&quot;idBtnFindApplicationTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindApplicationTs&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Router, ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Application &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ApplicationService &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../service/application.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #16a085;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;app-find-application&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./find-application.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./find-application.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;FindApplicationPage&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Application&lt;/span&gt; = {} &lt;span style=&quot;color: #2c3e50;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;Application&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Router&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;ActivatedRoute&lt;/span&gt;,
     &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;applicationService&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;ApplicationService&lt;/span&gt;) { }
     
 &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;route.snapshot.params.id&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;applicationService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findApplication&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;application&lt;/span&gt;;
    })
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;navigateByUrl&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;/tabs/find-applications&quot;&lt;/span&gt;)
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;deleteApplication&lt;/span&gt;() {
    &lt;span style=&quot;color: #2c3e50;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #f39c12;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;applicationService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;deleteApplication&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
        &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;/tabs/find-applications&#39;&lt;/span&gt;)
      })
    }
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/find-application.page.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindApplicationHtml(selectFindApplicationHtml)&quot; id=&quot;idBtnFindApplicationHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindApplicationHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;dark&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;cancel&lt;/span&gt;()&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;{{application.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;{{application.description}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;application.criticality==[&#39;LOW&#39;]&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;success&quot;&lt;/span&gt;&gt;{{application.criticality}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;application.criticality==[&#39;MEDIUM&#39;]&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;secondary&quot;&lt;/span&gt;&gt;{{application.criticality}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;application.criticality==[&#39;HIGH&#39;]&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;{{application.criticality}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;medium&quot;&lt;/span&gt;&gt;{{application.language}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
   &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
  
   &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;full&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;outline&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;danger&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;deleteApplication&lt;/span&gt;()&quot;&lt;/span&gt;&gt;Delete this enterprise&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt; 
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;p&gt;src/app/tabs-routing.module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyTabRoutingModule(selectTabRoutingModule)&quot; id=&quot;idBtnTabRoutingModule&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectTabRoutingModule&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;NgModule&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;RouterModule, Routes&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;TabsPage&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./tabs.page&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;routes&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Routes&lt;/span&gt; = [
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;tabs&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;TabsPage&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;children&lt;/span&gt;: [
      {
        &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;add-user&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #f39c12&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../add-user/add-user.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #2c3e50;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #16a085;&quot;&gt;AddUserPageModule&lt;/span&gt;)
      },
      {
        &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;find-enterprises&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #f39c12&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../find-enterprises/find-enterprises.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #2c3e50;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #16a085;&quot;&gt;FindEnterprisesPageModule&lt;/span&gt;)
      },
      {
        &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;find-applications&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #f39c12&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;../find-applications/find-applications.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #2c3e50;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #16a085;&quot;&gt;FindApplicationsPageModule&lt;/span&gt;)
      },
      {
        &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #2980b9&quot;&gt;redirectTo&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;/tabs/add-user&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #2980b9&quot;&gt;pathMatch&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;full&#39;&lt;/span&gt;
      }
    ]
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;redirectTo&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;/tabs/add-user&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;pathMatch&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;full&#39;&lt;/span&gt;
  }
];

@&lt;span style=&quot;color: #16a085;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;imports&lt;/span&gt;: [&lt;span style=&quot;color: #16a085;&quot;&gt;RouterModule&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;forChild&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;routes&lt;/span&gt;)],
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;TabsPageRoutingModule&lt;/span&gt; {}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/tabs-page.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyTabsHtml(selectTabsHtml)&quot; id=&quot;idBtnTabsHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectTabsHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-tabs&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-tab-bar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;bottom&quot;&lt;/span&gt;&gt;
  
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-tab-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;tab&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;add-user&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;people-outline&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;Users&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-tab-button&lt;/span&gt;&gt;
    
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-tab-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;tab&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;find-enterprises&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;ellipse&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;Enterprises&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-tab-button&lt;/span&gt;&gt;

   &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-tab-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;tab&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;find-applications&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #d35400;&quot;&gt;&quot;square&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;Applications&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-tab-button&lt;/span&gt;&gt;
    
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-tab-bar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-tabs&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;title&quot;&gt;Add the AppRoutingModule&lt;/h2&gt;
&lt;p&gt;In Angular, the best practice is to load and configure the router in a separate, top-level module that is dedicated to routing and imported by the root AppModule.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;By convention, the module class name is AppRoutingModule and it belongs in the app-routing.module.ts in the src/app folder.&lt;/p&gt;&lt;br /&gt;

&lt;p&gt;src/app/app-routing.module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppRoutingModule(selectAppRoutingModule)&quot; id=&quot;idBtnAppRoutingModule&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppRoutingModule&quot;&gt;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;NgModule&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;PreloadAllModules, RouterModule, Routes &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #66c4e8&quot;&gt;routes&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;Routes&lt;/span&gt; = [
  {
    &lt;span style=&quot;color: #66c4e8&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #f39c12;&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./tabs/tabs.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #2c3e50;&quot;&gt;then&lt;/span&gt;(m =&gt; m.&lt;span style=&quot;color: #16a085;&quot;&gt;TabsPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #66c4e8&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;add-enterprise&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #f39c12;&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./add-enterprise/add-enterprise.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #2c3e50;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #16a085;&quot;&gt;AddEnterprisePageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #66c4e8&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;add-application/:id&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #f39c12;&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./add-application/add-application.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #2c3e50;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #16a085;&quot;&gt;AddApplicationPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #66c4e8&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;find-enterprise/:id&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #f39c12;&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./find-enterprise/find-enterprise.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #2c3e50;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #16a085;&quot;&gt;FindEnterprisePageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #66c4e8&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;find-application/:id&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #f39c12;&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./find-application/find-application.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #2c3e50;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #16a085;&quot;&gt;FindApplicationPageModule&lt;/span&gt;)
  },
];

@&lt;span style=&quot;color: #16a085;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #66c4e8&quot;&gt;imports&lt;/span&gt;: [
    &lt;span style=&quot;color: #16a085;&quot;&gt;RouterModule&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;forRoot&lt;/span&gt;(&lt;span style=&quot;color: #66c4e8&quot;&gt;routes&lt;/span&gt;, { &lt;span style=&quot;color: #66c4e8&quot;&gt;preloadingStrategy&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;PreloadAllModules&lt;/span&gt; })
  ],
  &lt;span style=&quot;color: #66c4e8&quot;&gt;exports&lt;/span&gt;: [&lt;span style=&quot;color: #16a085;&quot;&gt;RouterModule&lt;/span&gt;]
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;AppRoutingModule&lt;/span&gt; { }
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;title&quot;&gt;NgModules and JavaScript modules&lt;/h2&gt;
&lt;p&gt;The NgModule system is different from and unrelated to the JavaScript (ES2015) module system for managing collections of JavaScript objects. These are complementary module systems that you can use together to write your apps.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;In JavaScript each file is a module and all objects defined in the file belong to that module. The module declares some objects to be public by marking them with the export key word. Other JavaScript modules use import statements to access public objects from other modules.&lt;/p&gt;&lt;br /&gt;

&lt;p&gt;src/app/app-module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppModule(selectAppModule)&quot; id=&quot;idBtnAppModule&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppModule&quot;&gt;

&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;CUSTOM_ELEMENTS_SCHEMA, NgModule, NO_ERRORS_SCHEMA&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;BrowserModule&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/platform-browser&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;RouteReuseStrategy&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;IonicModule, IonicRouteStrategy&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@ionic/angular&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;SplashScreen&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@ionic-native/splash-screen/ngx&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;StatusBar&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@ionic-native/status-bar/ngx&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;HttpClientModule&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;AppComponent&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./app.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;AppRoutingModule&lt;/span&gt; } &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;./app-routing.module&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #2c3e50;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;FormsModule &lt;/span&gt;} &lt;span style=&quot;color: #2c3e50;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;&#39;@angular/forms&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #16a085;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #66c4e8&quot;&gt;declarations&lt;/span&gt;: [&lt;span style=&quot;color: #16a085;&quot;&gt;AppComponent&lt;/span&gt;],
  &lt;span style=&quot;color: #66c4e8&quot;&gt;entryComponents&lt;/span&gt;: [],
  &lt;span style=&quot;color: #66c4e8&quot;&gt;imports&lt;/span&gt;: [
    &lt;span style=&quot;color: #16a085;&quot;&gt;BrowserModule, 
    IonicModule&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;forRoot&lt;/span&gt;(), 
    &lt;span style=&quot;color: #16a085;&quot;&gt;AppRoutingModule,     
    FormsModule,
    HttpClientModule&lt;/span&gt;,
  ],
  &lt;span style=&quot;color: #66c4e8&quot;&gt;providers&lt;/span&gt;: [
    &lt;span style=&quot;color: #16a085;&quot;&gt;StatusBar&lt;/span&gt;,
    &lt;span style=&quot;color: #16a085;&quot;&gt;SplashScreen&lt;/span&gt;,
    { &lt;span style=&quot;color: #16a085;&quot;&gt;provide&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;RouteReuseStrategy&lt;/span&gt;, &lt;span style=&quot;color: #16a085;&quot;&gt;useClass&lt;/span&gt;: &lt;span style=&quot;color: #16a085;&quot;&gt;IonicRouteStrategy &lt;/span&gt;}
  ],
  &lt;span style=&quot;color: #66c4e8&quot;&gt;schemas&lt;/span&gt;: [&lt;span style=&quot;color: #3498db;&quot;&gt;
    CUSTOM_ELEMENTS_SCHEMA,
    NO_ERRORS_SCHEMA&lt;/span&gt;
  ],
  &lt;span style=&quot;color: #66c4e8&quot;&gt;bootstrap&lt;/span&gt;: [&lt;span style=&quot;color: #16a085;&quot;&gt;AppComponent&lt;/span&gt;]
})
&lt;span style=&quot;color: #2c3e50;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #16a085;&quot;&gt;AppModule&lt;/span&gt; { }
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Spring Boot CRUD example when building a CRUD App.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp; Spring Data JPA, as well, we ware creating an Ionic app with Angular 10 project structure for building a front-end app to make HTTP requests and consume responses.&lt;/p&gt;&lt;br&gt;&lt;br&gt;

&lt;div style=&quot;background: none 0% 0% repeat scroll rgb(255, 118, 0); border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/building-application-enterprise-with.html&quot;&gt;Building an application enterprise with Spring boot and Ionic part 1&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: none 0% 0% repeat scroll rgb(0, 137, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/enterprise-ionic&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download My enterprise Application From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;


&lt;br /&gt;
&lt;style&gt; 
 pre:before {
   content: none;
  }
  pre {
   background-color: #1e1e1f;
   border-radius: 7px;
   line-height: 20px; 
   position: relative;
   overflow: auto;
   width: 100%;
  }
  .h2-title {
   background: #6D214F;
   padding: 10px !important;
   border-left: 10px solid #FD7272;
   color: #fff !important;
  }
  .sub-title {
    color: #B33771 !important;
  }
  code {
  color: #000;
  font-size: 13px;
  background-color: #1e1e1f;
  padding: 3px 10px 20px;
  }
 div::-moz-selection,
 b::-moz-selection,
 strong::-moz-selection,
 code::-moz-selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
div::selection,
strong::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
&lt;/style&gt;

&lt;script&gt;
  function copyModal(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnModal&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyApplicationService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnApplicationService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEnterpriseService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEnterpriseService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUserService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUserService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddUserPageTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddUserPageTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddUserPageHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddUserPageHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddApplicationTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddApplicationTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddApplicationHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddApplicationHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddEnterpriseHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddEnterpriseHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddEnterpriseTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddEnterpriseTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindEnterprisesPageTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindEnterprisesPageTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindEnterprisesHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindEnterprisesHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindEnterpriseTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindEnterpriseTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindEnterpriseHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindEnterpriseHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindEnterpriseScss(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindEnterpriseScss&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindApplicationsTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindApplicationsTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindApplicationsHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindApplicationsHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindApplicationTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindApplicationTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindApplicationHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindApplicationHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyTabRoutingModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnTabRoutingModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyTabsHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnTabsHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppRoutingModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppRoutingModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}

&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/4064866106192014610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-enterprise-with_18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/4064866106192014610'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/4064866106192014610'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-enterprise-with_18.html' title='Building an application enterprise with Spring boot &amp; Ionic Part 2'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/wN6u-eM9ULc/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-2906245098141909331</id><published>2022-01-18T03:43:00.012-08:00</published><updated>2022-01-18T07:27:46.164-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><title type='text'>Building an application Company with Spring boot and Angular Part 2</title><content type='html'>&lt;h1 style=&quot;background: rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Angular&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/06/voo8.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;452&quot; data-original-width=&quot;800&quot; src=&quot;https://zupimages.net/up/21/06/voo8.png&quot; style=&quot;border: 1px solid;&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;bE4iUcBWUt8&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/bE4iUcBWUt8&quot;&gt;&lt;/iframe&gt;

&lt;h2&gt;Angular 10 Front-end&lt;/h2&gt;
&lt;p&gt;
In this tutorial We will build an application Company To display departments with code, location and description, employees with name, hiring date, salary etc... and projects with name, description and process. Each employee can have one project or many projects to work on and every user can management the functionality Add, update or delete.
&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt; Technology &lt;/h2&gt;
&lt;div style=&quot;margin-left: 20px;&quot;&gt;
&lt;p&gt;Angular 10&lt;/p&gt;
&lt;p&gt;Angular HTTPClient&lt;/p&gt;
&lt;p&gt;Angular Router&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;

&lt;h2&gt;Angular CLI version (10.1.1)&lt;/h2&gt;
&lt;h2&gt;ng new&lt;/h2&gt;
&lt;p&gt;The Angular CLI makes it easy to create an application that already works, right out of the box. It already follows our best practices!&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;ng generate&lt;/h2&gt;
&lt;p&gt;Generate components, routes, services and pipes with a simple command. The CLI will also create simple test shells for all of these.&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;ng serve&lt;/h2&gt;
&lt;p&gt;Easily test your app locally while developing.&lt;/p&gt;&lt;br /&gt;

&lt;pre style=&quot;color: #ecf0f1; font-weigth: bold; background: #444&quot;&gt;&lt;code style=&quot;color: #ecf0f1; font-weigth: bold; background: #444&quot;&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;npm install -g @angular/cli&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng new company&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;cd company&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng serve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #fb4834;&quot;&gt;Project Structure&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/06/rxfr.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;519&quot; src=&quot;https://zupimages.net/up/21/06/rxfr.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Font Awesome&lt;/h2&gt;
&lt;p&gt;Font Awesome is a font and icon toolkit based on CSS and Less. It was made by Dave Gandy for use with Bootstrap, and later was incorporated into the BootstrapCDN. Font Awesome has a 38% market share among those websites that use third-party font scripts on their platform, ranking it second place after Google Fonts.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Add this link in index.html to use Font Awesome&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAwesome(selectAwesome)&quot; id=&quot;idBtnAwesome&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAwesome&quot;&gt;

&lt;span style=&quot;color: #ecf0f1; font-weigth: bold;&quot;&gt; &amp;lt;&lt;span style=&quot;color: #98e6ff&quot;&gt;link&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;rel&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;https://use.fontawesome.com/releases/v5.2.0/css/all.css&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;integrity&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;crossorigin&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;anonymous&quot;&lt;/span&gt;&gt;
&lt;/span&gt;
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2&gt;Angular Material Tutorial&lt;/h2&gt;
&lt;p&gt;The idea of this is article is to teach you how to use Angular Material through a hands-on exercise. First, you will check the dependencies that you need on your computer to use and develop with Angular Material, then you will learn how to configure and use different components.&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;Install Angular Material&lt;/h2&gt;
&lt;p&gt;&lt;b style=&quot;color: blue;&quot;&gt;Angular Material&lt;/b&gt; In addition to the install schematic, Angular Material comes with &lt;b&gt;several schematics&lt;/b&gt; (like nav, table, address-form, etc.) that can be used to easily generate pre-built components in your application.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng add @angular/material&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;MaterialModule&lt;/h2&gt;
&lt;p&gt;In earlier versions of Angular Material, we could import MaterialModule which imports all components from Angular Material and makes them available in our app. Most of the time we will need to import the most of material.&lt;/p&gt;&lt;br/&gt;

&lt;p&gt;src/app/material-module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyMaterialModule(selectMaterialModule)&quot; style=&quot;float: right; cursor: pointer;&quot; id=&quot;idBtnMaterialModule&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectMaterialModule&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;NgModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatAutocompleteModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/autocomplete&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatBadgeModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/badge&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatBottomSheetModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/bottom-sheet&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatButtonModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/button&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatButtonToggleModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/button-toggle&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatCardModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/card&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatCheckboxModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/checkbox&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatChipsModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/chips&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatStepperModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/stepper&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatDatepickerModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/datepicker&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatDialogModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatDividerModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/divider&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatExpansionModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/expansion&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatGridListModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/grid-list&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatIconModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/icon&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatInputModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/input&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatListModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/list&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatMenuModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/menu&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatNativeDateModule, MatRippleModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatPaginatorModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/paginator&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatProgressBarModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/progress-bar&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatProgressSpinnerModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/progress-spinner&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatRadioModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/radio&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSelectModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/select&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSidenavModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/sidenav&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSliderModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/slider&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSlideToggleModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/slide-toggle&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSnackBarModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/snack-bar&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSortModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/sort&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTableModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/table&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTabsModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/tabs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatToolbarModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/toolbar&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTooltipModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/tooltip&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTreeModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/tree&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #66c4e8&quot;&gt;exports&lt;/span&gt;: [&lt;span style=&quot;color: #48bdad;&quot;&gt;
    MatAutocompleteModule,
    MatBadgeModule,
    MatBottomSheetModule,
    MatButtonModule,
    MatButtonToggleModule,
    MatCardModule,
    MatCheckboxModule,
    MatChipsModule,
    MatStepperModule,
    MatDatepickerModule,
    MatDialogModule,
    MatDividerModule,
    MatExpansionModule,
    MatGridListModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatMenuModule,
    MatNativeDateModule,
    MatPaginatorModule,
    MatProgressBarModule,
    MatProgressSpinnerModule,
    MatRadioModule,
    MatRippleModule,
    MatSelectModule,
    MatSidenavModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatSnackBarModule,
    MatSortModule,
    MatTableModule,
    MatTabsModule,
    MatToolbarModule,
    MatTooltipModule,
    MatTreeModule,&lt;/span&gt;
  ],
  &lt;span style=&quot;color: #66c4e8&quot;&gt;imports&lt;/span&gt;: [&lt;span style=&quot;color: #48bdad;&quot;&gt;
    MatAutocompleteModule,
    MatBadgeModule,
    MatBottomSheetModule,
    MatButtonModule,
    MatButtonToggleModule,
    MatCardModule,
    MatCheckboxModule,
    MatChipsModule,
    MatStepperModule,
    MatDatepickerModule,
    MatDialogModule,
    MatDividerModule,
    MatExpansionModule,
    MatGridListModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatMenuModule,
    MatNativeDateModule,
    MatPaginatorModule,
    MatProgressBarModule,
    MatProgressSpinnerModule,
    MatRadioModule,
    MatRippleModule,
    MatSelectModule,
    MatSidenavModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatSnackBarModule,
    MatSortModule,
    MatTableModule,
    MatTabsModule,
    MatToolbarModule,
    MatTooltipModule,
    MatTreeModule,&lt;/span&gt;
  ]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;MaterialModule&lt;/span&gt; { }
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Modals interfaces&lt;/h2&gt;
&lt;p&gt;The purpose of this class is to map the specified fields with the fields of Spring entity class. &lt;/p&gt;&lt;br/&gt;
&lt;p&gt;Angular NgModules differ from and complement JavaScript (ES2015) modules. An NgModule declares a compilation context for a set of components that is dedicated to an application domain, a workflow, or a closely related set of capabilities. An NgModule can associate its components with related code, such as services, to form functional units.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Every Angular app has a root module, conventionally named AppModule, which provides the bootstrap mechanism that launches the application. An app typically contains many functional modules.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;src/app/modal/Modal.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyModal(selectModal)&quot; id=&quot;idBtnModal&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectModal&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Company&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt; id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; location&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; description&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; createAt&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; departments&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Department&lt;/span&gt;[];
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Department&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt; id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; code&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; location&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; description&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; createAt&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; employees&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Employee&lt;/span&gt;[];
  &lt;span style=&quot;color: #98e6ff&quot;&gt; projects&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Project&lt;/span&gt;[];
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Employee&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt; id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; address&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; salary&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; hiringDate&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; birthDate&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; employeePhones&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;EmployeePhone&lt;/span&gt;[];
  &lt;span style=&quot;color: #98e6ff&quot;&gt; projects&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Projec&lt;/span&gt;t[];
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;EmployeePhone&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt; id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; phone&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Project&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt; id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; description&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; createAt&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; process&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Process&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; workOns&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;WorkOn&lt;/span&gt;[];
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;WorkOn&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt; id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; done&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;boolean&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; createAt&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt; id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; username&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; password&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; admin&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;boolean&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt; companies&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Company&lt;/span&gt;[];
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;enum&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Process&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt; TODO&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt; WORKON&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt; DONE&lt;/span&gt;
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Angular Services&lt;/h2&gt;
&lt;p&gt;Angular services are singleton objects that get instantiated only once during the lifetime of an application. They contain methods that maintain data throughout the life of an application, i.e. data does not get refreshed and is available all the time. The main objective of a service is to organize and share business logic, models, or data and functions with different components of an Angular application.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;An example of when to use services would be to transfer data from one controller to another custom service.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;Why Should We Use Services in Angular?
The separation of concerns is the main reason why Angular services came into existence. An Angular service is a stateless object and provides some very useful functions. These functions can be invoked from any component of Angular, like Controllers, Directives, etc. This helps in dividing the web application into small, different logical units which can be reused.&lt;/p&gt;&lt;br&gt;

&lt;h2 style=&quot;background: aliceblue; border-left: 10px solid; padding: 5px 10px;&quot;&gt;Create Data services&lt;/h2&gt;
&lt;p&gt;This service will use Angular HTTPClient to send HTTP requests.
  You can see that its functions includes CRUD operations and finder method&lt;/p&gt;&lt;br/&gt;
&lt;h2&gt;Create these services in the service package &lt;/h2&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CompanyService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; DepartmentService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EmployeeService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EmployeePhoneService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ProjectService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; UserService&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;src/app/service/company.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyCompanyService(selectCompanyService)&quot; id=&quot;idBtnCompanyService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCompanyService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;CompanyService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;addCompany&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/addCompany/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;editCompany&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;put&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/editCompany/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findCompany&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findCompany/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;deleteCompany&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/deleteCompany/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findCompanies&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findCompanies`&lt;/span&gt;);
  }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/department.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDepartmentService(selectDepartmentService)&quot; id=&quot;idBtnDepartmentService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDepartmentService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;DepartmentService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;addDepartment&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/addDepartment/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;editDepartment&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;put&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/editDepartment/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findDepartment&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findDepartment/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;deleteDepartment&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/deleteDepartment/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/employee-phone.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyEmployeePhoneService(selectEmployeePhoneService)&quot; id=&quot;idBtnEmployeePhoneService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployeePhoneService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;EmployeePhoneService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;addEmployeePhone&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/addEmployeePhone/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;editEmployeePhone&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;put&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/editEmployeePhone/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findEmployeePhone&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findEmployeePhone/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;deleteEmployeePhone&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/deleteEmployeePhone/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findEmployeePhones&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findEmployeePhones/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/employee.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyEmployeeService(selectEmployeeService)&quot; id=&quot;idBtnEmployeeService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEmployeeService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;EmployeeService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;addEmployee&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/addEmployee/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;editEmployee&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;put&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/editEmployee/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findEmployee&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findEmployee/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;deleteEmployee&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/deleteEmployee/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/project.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyProjectService(selectProjectService)&quot; id=&quot;idBtnProjectService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProjectService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;ProjectService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;addProjectToEmployee&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;idEmployee&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;idProject&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/addProjectToEmployee/&lt;span style=&quot;color: #98e6ff&quot;&gt;${idEmployee}&lt;/span&gt;/&lt;span style=&quot;color: #98e6ff&quot;&gt;${idProject}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;null&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;addProjectToDeprtment&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/addProjectToDeprtment/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;editProject&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;put&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/editProject/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findProject&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findProject/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;deleteProejct&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/deleteProejct/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findProjectsForEmplopyee&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findProjectsForEmplopyee/&lt;span style=&quot;color: #98e6ff&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findProjects&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findProjects`&lt;/span&gt;);
  }
 &lt;span style=&quot;color: #F8EFBA;&quot;&gt;deleteProjectFromEmployee&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;idEmployee&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;idProject&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/deleteProjectFromEmployee/&lt;span style=&quot;color: #98e6ff&quot;&gt;${idEmployee}&lt;/span&gt;/&lt;span style=&quot;color: #98e6ff&quot;&gt;${idProject}&lt;/span&gt;`&lt;/span&gt;);
  }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/user.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyUserService(selectUserService)&quot; id=&quot;idBtnUserService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUserService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;User&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;USERNAME_KEY&lt;/span&gt; = &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;USERNAME&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;UserService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;addUser&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #c49079;&quot;&gt;http://localhost:8080/api/addUser&lt;/span&gt;`, &lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt;); 
  }

  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;editUser&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;idUser&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #c49079;&quot;&gt;http://localhost:8080/api/editUser/&lt;/span&gt;${&lt;span style=&quot;color: #98e6ff&quot;&gt;idUser&lt;/span&gt;}`, &lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findUserById&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #c49079;&quot;&gt;http://localhost:8080/api/findUserById/&lt;/span&gt;${&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;deleteUser&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #c49079;&quot;&gt;http://localhost:8080/api/deleteUser/&lt;/span&gt;${&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;}`); 
   }

   &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findAllUsers&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #c49079;&quot;&gt;http://localhost:8080/api/findAllUsers/&lt;/span&gt;`); 
   }
   
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;findByUsername&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #c49079;&quot;&gt;http://localhost:8080/api/findByUsername/&lt;/span&gt;${&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt;}`); 
   }
   
 &lt;span style=&quot;color: #F8EFBA;&quot;&gt;saveUsername&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;username&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;) {
    &lt;span style=&quot;color: #98e6ff&quot;&gt;window.sessionStorage&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;removeItem&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt; USERNAME_KEY&lt;/span&gt;);
    &lt;span style=&quot;color: #98e6ff&quot;&gt;window.sessionStorage&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;setItem&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt; USERNAME_KEY&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;username&lt;/span&gt;);
  }

  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;getUsername&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;sessionStorage&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;getItem&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt; USERNAME_KEY&lt;/span&gt;);
  }

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt; Flat tree&lt;/h2&gt;
&lt;p&gt;The mat-tree provides a Material Design styled tree that can be used to display hierarchy data.&lt;br&gt;

This tree builds on the foundation of the CDK tree and uses a similar interface for its data source input and template, except that its element and attribute selectors will be prefixed with mat- instead of cdk-.&lt;br&gt;

There are two types of trees: Flat tree and nested tree. The DOM structures are different for these two types of trees.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;In a flat tree, the hierarchy is flattened; nodes are not rendered inside of each other, but instead are rendered as siblings in sequence. An instance of TreeFlattener is used to generate the flat list of items from hierarchical data. The &quot;level&quot; of each tree node is read through the getLevel method of the TreeControl; this level can be used to style the node such that it is indented to the appropriate level.&lt;/p&gt;&lt;br&gt;

&lt;h2 style=&quot;background: aliceblue; border-left: 10px solid; padding: 5px 10px;&quot;&gt;TreeCompanyService&lt;/h2&gt;

&lt;p&gt;We are going fill this service with date &lt;/p&gt;&lt;br/&gt;
&lt;p&gt;src/app/service/tree-company-service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyTreeCompanyService(selectTreeCompanyService)&quot; id=&quot;idBtnTreeCompanyService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectTreeCompanyService&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;BehaviorSubject, Observable &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Company&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;CompanyService&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./company.service&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;NodeAction&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;linkActive&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;url&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;title&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;children&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;[] = [];
  &lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;clazz&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;actions&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;NodeAction&lt;/span&gt;[] = [];
  &lt;span style=&quot;color: #98e6ff&quot;&gt;title&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;item&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;clazz&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;level&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;expandable&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;boolean&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;actions&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;NodeAction&lt;/span&gt;[] = [];
  &lt;span style=&quot;color: #98e6ff&quot;&gt;title&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;;
}

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;TreeCompanyService&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;companies&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Company&lt;/span&gt;[];
  &lt;span style=&quot;color: #98e6ff&quot;&gt;applicationData&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;BehaviorSubject&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;[]&gt;([]);
  &lt;span style=&quot;color: #98e6ff&quot;&gt;applicationState&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;BehaviorSubject&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Company&lt;/span&gt;&gt;({} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Company&lt;/span&gt;);

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;companyService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;CompanyService&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;initialize&lt;/span&gt;();
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;initialize&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;applicationState&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;buildFileTree&lt;/span&gt;(0).&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;value&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;applicationData&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;next&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;value&lt;/span&gt;);
      });
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;buildFileTree&lt;/span&gt;(0).&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;value&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;applicationData&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;next&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;value&lt;/span&gt;);
    });
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;[] {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;applicationData.value&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;buildFileTree&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;level&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;[]&gt;  {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;nodes&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;[] = [];

    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;((&lt;span style=&quot;color: #98e6ff&quot;&gt;observer&lt;/span&gt;) =&gt; {
        &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;companyService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;findCompanies&lt;/span&gt;().&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;companies&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;companies&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;companies&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;forEach&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;company&lt;/span&gt; =&gt; {
            &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0bb2e8&quot;&gt;nodeCompany&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;();
            &lt;span style=&quot;color: #0bb2e8&quot;&gt;nodeCompany&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;company&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt;;
            &lt;span style=&quot;color: #0bb2e8&quot;&gt;nodeCompany&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;company&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;;
            &lt;span style=&quot;color: #0bb2e8&quot;&gt;nodeCompany&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;display-company/&#39;&lt;/span&gt; + &lt;span style=&quot;color: #98e6ff&quot;&gt;company&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;;
            &lt;span style=&quot;color: #0bb2e8&quot;&gt;nodeCompany&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;fab fa-accusoft&#39;&lt;/span&gt;;
            &lt;span style=&quot;color: #0bb2e8&quot;&gt;nodeCompany&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Display &#39;&lt;/span&gt; + &lt;span style=&quot;color: #98e6ff&quot;&gt;company&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt;;
            &lt;span style=&quot;color: #98e6ff&quot;&gt;nodes&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;push&lt;/span&gt;(&lt;span style=&quot;color: #0bb2e8&quot;&gt;nodeCompany&lt;/span&gt;);

            &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;company.departments.length&lt;/span&gt; &gt; &lt;span style=&quot;color: #CEFFF5;&quot;&gt;0&lt;/span&gt;) {
              &lt;span style=&quot;color: #98e6ff&quot;&gt;company&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;departments&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;forEach&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;department&lt;/span&gt; =&gt; {
                &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeDepartment&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;();
                &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeDepartment&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;department&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;code&lt;/span&gt;;
                &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeDepartment&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;department&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;;
                &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeDepartment&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;display-department/&#39;&lt;/span&gt; + &lt;span style=&quot;color: #98e6ff&quot;&gt;department&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;;
                &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeDepartment&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;fas fa-building&#39;&lt;/span&gt;;
                &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeDepartment&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Display department &#39;&lt;/span&gt; + &lt;span style=&quot;color: #98e6ff&quot;&gt;department&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;code&lt;/span&gt;;
                &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeCompany&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;children&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;push&lt;/span&gt;(&lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeDepartment&lt;/span&gt;);

                &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;department.employees.length&lt;/span&gt; &gt; &lt;span style=&quot;color: #CEFFF5;&quot;&gt;0&lt;/span&gt;) {
                  &lt;span style=&quot;color: #98e6ff&quot;&gt;department&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;employees&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;forEach&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;employee&lt;/span&gt; =&gt; {
                    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeEmployee&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;();
                    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeEmployee&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;employee&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt;
                    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeEmployee&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;employee&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;;
                    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeEmployee&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;display-employee/&#39;&lt;/span&gt; + &lt;span style=&quot;color: #98e6ff&quot;&gt;employee&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;;
                    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeEmployee&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;fas fa-user-secret&#39;&lt;/span&gt;;
                    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeEmployee&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Display employee &#39;&lt;/span&gt; + &lt;span style=&quot;color: #98e6ff&quot;&gt;employee&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt;;
                    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeDepartment&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;children&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;push&lt;/span&gt;(&lt;span style=&quot;color: #0bb2e8;&quot;&gt;nodeEmployee&lt;/span&gt;);
                  })
                }
              });
            }
          });
          &lt;span style=&quot;color: #98e6ff&quot;&gt;observer&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;next&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;nodes&lt;/span&gt;);
      });
    });
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Components&lt;/h2&gt;
&lt;p&gt;The @Component decorator identifies the class immediately below it as a component class, and specifies its metadata. In the example code below, you can see that Component is just a class, with no special Angular notation or syntax at all. It&#39;s not a component until you mark it as one with the @Component decorator. &lt;/p&gt;&lt;br&gt;
&lt;p&gt;The metadata for a component tells Angular where to get the major building blocks that it needs to create and present the component and its view. In particular, it associates a template with the component, either directly with inline code, or by reference. Together, the component and its template describe a view.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;In addition to containing or pointing to the template, the @Component metadata configures, for example, how the component can be referenced in HTML and what services it requires.&lt;/p&gt;&lt;br&gt;
&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;b&gt;- app.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- app.component.html &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- app.component.scss &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;/div&gt;  
&lt;p&gt;The above files were created by default when we created new project using the angular-cli command.&lt;/p&gt;

&lt;p&gt;src/app/app.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppComponent(selectAppComponent)&quot; id=&quot;idBtnAppComponent&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppComponent&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;User &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;StorageService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/storage.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-root&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./app.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./app.component.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AppComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;UserService&lt;/span&gt;) {}

  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;findByUsername&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;getUsername&lt;/span&gt;()).&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt;;
      })
    }
  }

  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;logout&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;logout&lt;/span&gt;();
   &lt;span style=&quot;color: #98e6ff&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`/dashbaord`&lt;/span&gt;);
  }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/app.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppComponentHtml(selectAppComponentHtml)&quot; id=&quot;idBtnAppComponentHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppComponentHtml&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;nav&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;/dashbaord&#39;&lt;/span&gt;]&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;material-icons&quot;&lt;/span&gt;&gt;dashboard&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;Dashboard&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;/login&#39;&lt;/span&gt;]&quot; &lt;span style=&quot;color: #98e6ff&quot;&gt;class=active *ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;!user&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;material-icons&quot;&lt;/span&gt;&gt;psychology&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;Login&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;/login&#39;&lt;/span&gt;]&quot; &lt;span style=&quot;color: #98e6ff&quot;&gt;class=active *ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;user&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;material-icons&quot;&lt;/span&gt;&gt;person&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;Users&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;/dashbaord&#39;&lt;/span&gt;]&quot; (&lt;span style=&quot;color: #98e6ff&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #F8EFBA;&quot;&gt;logout&lt;/span&gt;()&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;material-icons&quot;&lt;/span&gt;&gt;logout&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;Logout&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;/login&#39;&lt;/span&gt;]&quot;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;material-icons&quot;&lt;/span&gt;&gt;error&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;Something&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
   &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;nav&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;body&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;router-outlet&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;router-outlet&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/app.component.scss&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppComponentScss(selectAppComponentScss)&quot; id=&quot;idBtnAppComponentScss&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppComponentScss&quot;&gt;

&lt;span style=&quot;color: #F8EFBA;&quot;&gt;body&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;font-size&lt;/span&gt;: 16px;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;margin&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;padding&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;flex&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;flex-direction&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;row&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;background&lt;/span&gt;: #f8f8f8;
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;#body&lt;/span&gt; {
    &lt;span style=&quot;color: #98e6ff&quot;&gt;padding-left&lt;/span&gt;: 4.5675em;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;width&lt;/span&gt;: 100%;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;height&lt;/span&gt;: 8em;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;background-color&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;white&lt;/span&gt;;
  }
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;nav&lt;/span&gt; {
&lt;span style=&quot;color: #98e6ff&quot;&gt;z-index&lt;/span&gt;: 999;
&lt;span style=&quot;color: #98e6ff&quot;&gt;background&lt;/span&gt;: #f8f8f8;
&lt;span style=&quot;color: #98e6ff&quot;&gt;border-right&lt;/span&gt;: 1px &lt;span style=&quot;color: #CEFFF5;&quot;&gt;solid&lt;/span&gt; #ccc;
&lt;span style=&quot;color: #98e6ff&quot;&gt;position&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;fixed&lt;/span&gt;;
&lt;span style=&quot;color: #98e6ff&quot;&gt;left&lt;/span&gt;: 0;
&lt;span style=&quot;color: #98e6ff&quot;&gt;top&lt;/span&gt;: 0;
&lt;span style=&quot;color: #98e6ff&quot;&gt;bottom&lt;/span&gt;: 0;
&lt;span style=&quot;color: #98e6ff&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;flex&lt;/span&gt;;
&lt;span style=&quot;color: #98e6ff&quot;&gt;flex-direction&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;column&lt;/span&gt;;
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;a&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;position&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;relative&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;flex&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;flex-direction&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;row&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;text-decoration&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;none&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;black&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;font-size&lt;/span&gt;: 1em;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;align-items&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;center&lt;/span&gt;;
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;&amp;:hover&lt;/span&gt; {
    &lt;span style=&quot;color: #98e6ff&quot;&gt;background&lt;/span&gt;: #ddd;
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;&amp;.active&lt;/span&gt; {
    &lt;span style=&quot;color: #F8EFBA;&quot;&gt;i&lt;/span&gt; {
      &lt;span style=&quot;color: #98e6ff&quot;&gt;padding&lt;/span&gt;: .75em .8125em .75em 1.1875em;
    }
    &lt;span style=&quot;color: #98e6ff&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;white&lt;/span&gt;;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;background&lt;/span&gt;: #3f51b5;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;box-shadow&lt;/span&gt;: 0px 0px 5px 0px rgba(0, 0, 0, 0.5);
    &lt;span style=&quot;color: #F8EFBA;&quot;&gt;&amp;::after&lt;/span&gt; {
      &lt;span style=&quot;color: #98e6ff&quot;&gt;box-shadow&lt;/span&gt;: 0px 0px 5px 0px rgba(0, 0, 0, 0.5);
      &lt;span style=&quot;color: #98e6ff&quot;&gt;clip-path&lt;/span&gt;: inset(-5px -5px -5px 0);
      &lt;span style=&quot;color: #98e6ff&quot;&gt;content&lt;/span&gt;: &quot;&quot;;
      &lt;span style=&quot;color: #98e6ff&quot;&gt;z-index&lt;/span&gt;: 2;
      &lt;span style=&quot;color: #98e6ff&quot;&gt;background&lt;/span&gt;: #3f51b5;
      &lt;span style=&quot;color: #98e6ff&quot;&gt;position&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;absolute&lt;/span&gt;;
      &lt;span style=&quot;color: #98e6ff&quot;&gt;right&lt;/span&gt;: -0.5em;
      &lt;span style=&quot;color: #98e6ff&quot;&gt;width&lt;/span&gt;: 0.5em;
      &lt;span style=&quot;color: #98e6ff&quot;&gt;height&lt;/span&gt;: 100%;
      &lt;span style=&quot;color: #98e6ff&quot;&gt;border-radius&lt;/span&gt;: 0 0.375em 0.375em 0;
    }
  }
  &lt;span style=&quot;color: #98e6ff&quot;&gt;i&lt;/span&gt; {
    &lt;span style=&quot;color: #98e6ff&quot;&gt;padding&lt;/span&gt;: 0.75em 1em;
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;span&lt;/span&gt; {
    &lt;span style=&quot;color: #98e6ff&quot;&gt;transition&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;opacity&lt;/span&gt; 0.5s 1s, &lt;span style=&quot;color: #CEFFF5;&quot;&gt;padding&lt;/span&gt; 0.5s 1.25s, &lt;span style=&quot;color: #CEFFF5;&quot;&gt;font-size&lt;/span&gt; 0.5s 1.25s;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;padding&lt;/span&gt;: 0;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;font-size&lt;/span&gt;: 0;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;opacity&lt;/span&gt;: 0;
  }
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;&amp;:hover a&lt;/span&gt; {
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;&amp;.active span&lt;/span&gt; {
    &lt;span style=&quot;color: #98e6ff&quot;&gt;padding&lt;/span&gt;: .75em .8125em .75em .1875em;
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;span&lt;/span&gt; {
    &lt;span style=&quot;color: #98e6ff&quot;&gt;transition&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;padding&lt;/span&gt; 0.5s 1s, &lt;span style=&quot;color: #CEFFF5;&quot;&gt;font-size&lt;/span&gt; 0.5s 1s, &lt;span style=&quot;color: #CEFFF5;&quot;&gt;opacity&lt;/span&gt; 0.25s 1.5s;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;opacity&lt;/span&gt;: 1;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;font-size&lt;/span&gt;: 1em;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;padding&lt;/span&gt;: 0.75em 1em 0.75em 0;
  }
}
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;#content&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;margin-left&lt;/span&gt;: 100px;
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;b&gt;- dashboard.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- dashboard.component.html &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- dashboard.component.css &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;/div&gt;  

&lt;p&gt;src/app/dashboard.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDashboardTs(selectDashboardTs)&quot; id=&quot;idBtnDashboardTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDashboardTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;FlatTreeControl &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/cdk/tree&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;User, Company &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;MatTreeFlattener, MatTreeFlatDataSource &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/tree&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;ApplicationItemFlatNode, ApplicationItemNode, TreeCompanyService&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/tree-company.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Router,ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;UserService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/user.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-dashboard&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./dashboard.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./dashboard.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;DashboardComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;company&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Company&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Company&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;;
  
  &lt;span style=&quot;color: #98e6ff&quot;&gt;flatNodeMap&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; Map&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;, &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;&gt;();
  &lt;span style=&quot;color: #98e6ff&quot;&gt;nestedNodeMap&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; Map&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;, &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;&gt;();

  &lt;span style=&quot;color: #98e6ff&quot;&gt;treeControl&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;FlatTreeControl&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;treeFlattener&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;MatTreeFlattener&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;, &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;dataSource&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;MatTreeFlatDataSource&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;, &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;expandedNodes&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;[];
  
    &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;UserService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ActivatedRoute&lt;/span&gt;,
              &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;treeCompanyService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;TreeCompanyService&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;treeFlattener&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;MatTreeFlattener&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;transform&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #3498db;&quot;&gt;getLevel&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;isExpandable&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;getChildren&lt;/span&gt;);
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;treeControl&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;FlatTreeControl&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;getLevel&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;isExpandable&lt;/span&gt;);
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;dataSource&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;MatTreeFlatDataSource&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;treeControl&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;treeFlattener&lt;/span&gt;);
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;(
      params =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;saveExpandedNodes&lt;/span&gt;();
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;restoreExpandedNodes&lt;/span&gt;();
        &lt;span style=&quot;color: #98e6ff&quot;&gt;treeCompanyService&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;applicationData&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;company&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;dataSource&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;company&lt;/span&gt;;
        });
        &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;findByUsername&lt;/span&gt;(this.&lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;getUsername&lt;/span&gt;()).&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt; =&gt; {
            &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;user&lt;/span&gt;;
          })
        }
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;treeCompanyService&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;applicationState&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;next&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;company&lt;/span&gt;);
      });
  }
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }
  
  &lt;span style=&quot;color: #98e6ff&quot;&gt;getLevel&lt;/span&gt; = (&lt;span style=&quot;color: #98e6ff&quot;&gt;node&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;) =&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;level&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;isExpandable&lt;/span&gt; = (&lt;span style=&quot;color: #98e6ff&quot;&gt;node&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;) =&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;expandable&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;getChildren&lt;/span&gt; = (&lt;span style=&quot;color: #98e6ff&quot;&gt;node&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt; [] =&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;children&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;hasChild&lt;/span&gt; = (_: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;nodeDate&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;) =&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;nodeDate&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;expandable&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;hasNoContent&lt;/span&gt; = (_: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;nodeData&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;) =&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;nodeData&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;item&lt;/span&gt; === &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;&#39;&lt;/span&gt;;
  
    &lt;span style=&quot;color: #F8EFBA;&quot;&gt;transform&lt;/span&gt; = (&lt;span style=&quot;color: #98e6ff&quot;&gt;node&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemNode&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;level&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;) =&gt; {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;existingNode&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;nestedNodeMap&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;get&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;node&lt;/span&gt;);
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;flatNode&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;existingNode&lt;/span&gt; &amp;&amp; &lt;span style=&quot;color: #0bb2e8;&quot;&gt;existingNode&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt; === &lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt; ? &lt;span style=&quot;color: #98e6ff&quot;&gt;existingNode&lt;/span&gt; : &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;();
    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;flatNode&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt;;
    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;flatNode&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;;
    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;flatNode&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;clazz&lt;/span&gt; = &lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;clazz&lt;/span&gt;;
    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;flatNode&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;level&lt;/span&gt; = &lt;span style=&quot;color: #0bb2e8;&quot;&gt;level&lt;/span&gt;;
    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;flatNode&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;title&lt;/span&gt;;
    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;flatNode&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt; = &lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt;;
    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;flatNode&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;actions&lt;/span&gt; = &lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;actions&lt;/span&gt;;
    &lt;span style=&quot;color: #0bb2e8;&quot;&gt;flatNode&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;expandable&lt;/span&gt; = (&lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;children&lt;/span&gt; &amp;&amp; &lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;children&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;length&lt;/span&gt; &gt; 0);
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;flatNodeMap&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;set&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;flatNode&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;node&lt;/span&gt;);
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;nestedNodeMap&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;set&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;node&lt;/span&gt;, &lt;span style=&quot;color: #98e6ff&quot;&gt;flatNode&lt;/span&gt;);
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;flatNode&lt;/span&gt;;
  }
  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #F8EFBA;&quot;&gt;saveExpandedNodes&lt;/span&gt;() {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;treeControl&lt;/span&gt; &amp;&amp; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0bb2e8;&quot;&gt;treeControl&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;dataNodes&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;expandedNodes&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; Array&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;ApplicationItemFlatNode&lt;/span&gt;&gt;();
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0bb2e8;&quot;&gt;treeControl&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;dataNodes&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;forEach&lt;/span&gt;(node =&gt; {
      &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;expandable&lt;/span&gt; &amp;&amp; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;treeControl&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;isExpanded&lt;/span&gt;(&lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;)) {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;expandedNodes&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;push&lt;/span&gt;(&lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;);
        }
      });
    }
  }

  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #F8EFBA;&quot;&gt;restoreExpandedNodes&lt;/span&gt;() {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;expandedNodes&lt;/span&gt; &amp;&amp; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;expandedNodes&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;length&lt;/span&gt; &gt; 0) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;expandedNodes&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;forEach&lt;/span&gt;(&lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;treeControl&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;expand&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #0bb2e8;&quot;&gt;treeControl&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;dataNodes&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;find&lt;/span&gt;(&lt;span style=&quot;color: #0bb2e8;&quot;&gt;n&lt;/span&gt; =&gt; &lt;span style=&quot;color: #0bb2e8;&quot;&gt;n&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt; === &lt;span style=&quot;color: #0bb2e8;&quot;&gt;node&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;));
      });
    }
  }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/dashboard.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDashboardHtml(selectDashboardHtml)&quot; id=&quot;idBtnDashboardHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDashboardHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 30%; float:left;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;example-card&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;{{user.username}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;Find all companies&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;
 &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-tree&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;dataSource&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;dataSource&quot;&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;treeControl&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;treeControl&quot;&lt;/span&gt;&gt;
 &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-tree-node&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;*matTreeNodeDef&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let node&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;matTreeNodeToggle matTreeNodePadding&lt;/span&gt;&gt;

     &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-basic-chip&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;checklist-leaf-node root&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin-top: 4px;&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;ngClass&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;node.clazz&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin-left: 22px; font-size: 18px; color: #666a6c; margin-right: 4px;&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;{{node.title}}&quot;&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;[&lt;span style=&quot;color: #98e6ff&quot;&gt;node.routerLink&lt;/span&gt;]&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;routerLinkActive&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;linkActive&quot;&lt;/span&gt;&gt; {{node.name }} &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-basic-chip&lt;/span&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-tree-node&lt;/span&gt;

    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-tree-node&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;*matTreeNodeDef&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let node; when: hasChild&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;matTreeNodePadding&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;chevronIcon&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;matTreeNodeToggle&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;attr.aria-label&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&#39;toggle &#39; + node.filename&quot;&lt;/span&gt;
        &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;background: transparent;&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-icon&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;mat-icon-plus&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;mat-icon-rtl-mirror&quot;&lt;/span&gt;&gt;
          {{&lt;span style=&quot;color: #98e6ff&quot;&gt;treeControl&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;isExpanded&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;node&lt;/span&gt;) ? &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;arrow_drop_down&#39;&lt;/span&gt; : &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;arrow_right&#39;&lt;/span&gt;}}
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-basic-chip&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;root&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;{{node.title}}&quot;&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;routerLink&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;[&lt;span style=&quot;color: #98e6ff&quot;&gt;node.routerLink&lt;/span&gt;]&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;routerLinkActive&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;linkActive&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;ngClass&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;node.clazz&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin-right: 5px;  color: #666a6c;&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;
          {{node.name}}
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-basic-chip&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-tree-node&lt;/span&gt;&gt;
    
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-tree&lt;/span&gt;&gt;&amp;lt;br&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 68%; float:right; margin-left: 1%; margin-right: 1%;&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;border-left&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;router-outlet&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;router-outlet&lt;/span&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/dashboard.component.css&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDashboardCss(selectDashboardCss)&quot; id=&quot;idBtnDashboardCss&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDashboardCss&quot;&gt;

&lt;span style=&quot;color: #F8EFBA;&quot;&gt;#applicationName&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;font-size&lt;/span&gt;: 22px;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;font-weight&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;bold&lt;/span&gt;;
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;.root&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;width&lt;/span&gt;: 100%;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;font-size&lt;/span&gt;: 14px;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;margin-bottom&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;margin-top&lt;/span&gt;: 4px;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;block&lt;/span&gt;;
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;a&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;font-family&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;initial&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;color&lt;/span&gt;: #2f3542;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;text-decoration&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;none&lt;/span&gt;;
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;#mat-icon-plus&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;#666a6c&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;font-size&lt;/span&gt;: 24px;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;margin-top&lt;/span&gt;: 4px;
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;.root:hover&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;-webkit-transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #CEFFF5;&quot;&gt;ease-in-out&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;-moz-transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #CEFFF5;&quot;&gt;ease-in-out&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #CEFFF5;&quot;&gt;ease-in-out&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;cursor&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;pointer&lt;/span&gt;;
}

&lt;span style=&quot;color: #F8EFBA;&quot;&gt;#chevronIcon&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;cursor&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;pointer&lt;/span&gt;;
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;.panel-danger&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;border-radius&lt;/span&gt;: 0 &lt;span style=&quot;color: #CEFFF5;&quot;&gt;!important&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;border-bottom&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;none&lt;/span&gt;;
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;.panel-body&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;padding&lt;/span&gt;: 0 10px;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;padding-bottom&lt;/span&gt;: 20px;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;border-bottom&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;none&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;@media&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;screen and&lt;/span&gt; (&lt;span style=&quot;color: #CEFFF5;&quot;&gt;max-width&lt;/span&gt;: 767px) {
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;.panel-body&lt;/span&gt;,
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;.panel-danger&lt;/span&gt;  {
    &lt;span style=&quot;color: #98e6ff&quot;&gt;padding-bottom&lt;/span&gt;: 0 &lt;span style=&quot;color: #CEFFF5;&quot;&gt;!important&lt;/span&gt;;
    &lt;span style=&quot;color: #98e6ff&quot;&gt;margin-bottom&lt;/span&gt;: 0 &lt;span style=&quot;color: #CEFFF5;&quot;&gt;!important&lt;/span&gt;;
  }
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;#btnApplicationInfo&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;float&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;right&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;padding&lt;/span&gt;: 3px 6px 1px;
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;.linkActive&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;background-color&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;#f2dede !important&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;padding&lt;/span&gt;: 2px 10px 0 3px;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;border-top-right-radius&lt;/span&gt;: 5px;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;border-bottom-right-radius&lt;/span&gt;: 5px;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;color&lt;/span&gt;: #a94442 &lt;span style=&quot;color: #CEFFF5;&quot;&gt;!important&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;-webkit-transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #CEFFF5;&quot;&gt;ease-in-out&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;-moz-transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #CEFFF5;&quot;&gt;ease-in-out&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;transition&lt;/span&gt;: all .4s &lt;span style=&quot;color: #CEFFF5;&quot;&gt;ease-in-out&lt;/span&gt;;
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;.mat-tree-node&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;margin-bottom&lt;/span&gt;: -20px;
}
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;.vl&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;border-left&lt;/span&gt;: 1px solid &lt;span style=&quot;color: #CEFFF5;&quot;&gt;#f2dede&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;height&lt;/span&gt;: 589px;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;float&lt;/span&gt;: right;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;margin-top&lt;/span&gt;: -20px;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;@media&lt;/span&gt; screen and (&lt;span style=&quot;color: #CEFFF5;&quot;&gt;max-width&lt;/span&gt;: 767px) {
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;#border-left&lt;/span&gt;  {
    &lt;span style=&quot;color: #98e6ff&quot;&gt;border-left&lt;/span&gt;: 1px solid &lt;span style=&quot;color: #CEFFF5;&quot;&gt;#f2dede&lt;/span&gt;;
  }
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;@media&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;screen&lt;/span&gt; and (&lt;span style=&quot;color: #CEFFF5;&quot;&gt;max-width&lt;/span&gt;: 967px) {
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;#border-left&lt;/span&gt;  {
    &lt;span style=&quot;color: #98e6ff&quot;&gt;border-left&lt;/span&gt;: 1px solid &lt;span style=&quot;color: #CEFFF5;&quot;&gt;#f2dede&lt;/span&gt;;
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;div style=&quot;color: #8e44ad; font-weight: bold;&quot;&gt;
&lt;b&gt;- login.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- login.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;/div&gt; 

&lt;p&gt;src/app/login.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyLoginTs(selectLoginTs)&quot; id=&quot;idBtnLoginTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLoginTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/material/dialog&#39;&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;User &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;UserService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/user.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #98e6ff&quot;&gt;AddCompanyComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-company/add-company.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #98e6ff&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-login&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./login.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./login.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;LoginComponent&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;users&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;[];
  &lt;span style=&quot;color: #98e6ff&quot;&gt;formUser&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;existUser&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #98e6ff&quot;&gt;admin&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;boolean&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;UserService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;MatDialog&lt;/span&gt;) {}
  
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;void&lt;/span&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;existUser&lt;/span&gt;!=&lt;span style=&quot;color: #d577e6;&quot;&gt;null&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;findAllUsers&lt;/span&gt;().&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;users&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;users&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;users&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;findByUsername&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;getUsername&lt;/span&gt;()).&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;existUser&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;existUser&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;existUser&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;admin&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;existUser&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;admin&lt;/span&gt;;
    })
   }
 }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;addUser&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;addUser&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;formUser&lt;/span&gt;).&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #98e6ff&quot;&gt;formUser&lt;/span&gt;) =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;formUser&lt;/span&gt; = &lt;span style=&quot;color: #98e6ff&quot;&gt;formUser&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;saveUsername&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;formUser&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;username&lt;/span&gt;);
      &lt;span style=&quot;color: #98e6ff&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`/dashbaord`&lt;/span&gt;);
    });
  }
  &lt;span style=&quot;color: #F8EFBA;&quot;&gt;deleteUser&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;) {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #F8EFBA;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;deleteUser&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #F8EFBA;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
        &lt;span style=&quot;color: #98e6ff&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`/dashbaord`&lt;/span&gt;);
      })
    }
  }
&lt;span style=&quot;color: #F8EFBA;&quot;&gt;addCompany&lt;/span&gt;(&lt;span style=&quot;color: #98e6ff&quot;&gt;idUser&lt;/span&gt;) {
  &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #98e6ff&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #F8EFBA;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #48bdad;&quot;&gt;AddCompanyComponent&lt;/span&gt;, {
  &lt;span style=&quot;color: #98e6ff&quot;&gt;data&lt;/span&gt;: {&lt;span style=&quot;color: #98e6ff&quot;&gt;idUser&lt;/span&gt;},
  &lt;span style=&quot;color: #98e6ff&quot;&gt;height&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #98e6ff&quot;&gt;width&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;400px&#39;&lt;/span&gt;,
  })
}
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;p&gt;src/app/login.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyLoginHtml(selectLoginHtml)&quot; id=&quot;idBtnLoginHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLoginHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: auto; width: 30%; border: 3px solid #5d89ff; margin-top: 40px;&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;existUser==null&quot;&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;example-card&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-avatar&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;https://zupimages.net/up/20/49/hnp3.png&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 50px;&quot;&lt;/span&gt;&gt; &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Authentification&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
     &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter your username&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Username&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;username&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #98e6ff&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;formUser.username&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;#username&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;required&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 100%;&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Enter your password&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;matInput type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;password&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Password&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;password&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #98e6ff&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;formUser.password&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;#password&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;required&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;mat-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; [&lt;span style=&quot;color: #98e6ff&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;username.invalid || password.invalid&quot;&lt;/span&gt; (&lt;span style=&quot;color: #98e6ff&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #F8EFBA;&quot;&gt;addUser&lt;/span&gt;()&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width : 10em !important&quot;&lt;/span&gt;&gt;Login&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: auto; width: 40%; border: 3px solid #6F1E51; margin-top: 40px;&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;admin==true&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: 10px&quot;&lt;/span&gt;&gt;Welcome {{existUser.username}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;example-card&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Users&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let user of users&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-icon&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-icon&lt;/span&gt;&gt;account_circle&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-icon&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;mat-line&lt;/span&gt;&gt;{{user.username}} &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #98e6ff&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #F8EFBA;&quot;&gt;addCompany&lt;/span&gt;(user.id)&quot;&lt;/span&gt;&gt;Add company&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
         &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;mat-button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #98e6ff&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #F8EFBA;&quot;&gt;deleteUser&lt;/span&gt;(user.id)&quot;&lt;/span&gt;&gt;Delete&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list-item&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-divider&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-divider&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-list&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: auto; width: 40%; border: 3px solid #6F1E51; margin-top: 40px;&quot;&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;admin==false&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt; &lt;span style=&quot;color: #98e6ff&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: 10px&quot;&lt;/span&gt;&gt;Welcome {{existUser.username}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Angular 10 + Spring Boot CRUD example when building a CRUD App.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp;#38; Spring Data JPA, as well as Angular 10 project structure for building a front-end app to make HTTP requests and consume responses. We will continue to complete the project in part 3&lt;/p&gt;&lt;br&gt;&lt;br&gt;

&lt;hr/&gt;
&lt;div style=&quot;background: none 0% 0% repeat scroll rgb(255, 118, 0); border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/building-application-company-with_14.html&quot;&gt;Building an application Company with Spring boot and Angular Part 3&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: none 0% 0% repeat scroll rgb(0, 137, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/company-angular&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download My Company Application From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;

&lt;br /&gt;
&lt;style&gt; 
 pre:before {
   content: none;
  }
  pre {
   background-color: #1e1e1f;
   border-radius: 7px;
   line-height: 20px; 
   position: relative;
   overflow: auto;
   width: 100%;
  }
  .h2-title {   
 background: #ecf0f1;
 color: #2c3e50;
 padding: 10px !important;
 border-left: 15px solid #8e44ad;
  }
  code {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  background-color: #1e1e1f;
  padding: 3px 10px 20px;
  }
 div::-moz-selection,
 b::-moz-selection,
 strong::-moz-selection,
 code::-moz-selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
div::selection,
strong::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
&lt;/style&gt;

&lt;script data-ad-client=&quot;ca-pub-7401879888732563&quot; async src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
  function copyModal(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnModal&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyMaterialModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnMaterialModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCompanyService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCompanyService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUserService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUserService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDepartmentService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDepartmentService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployeePhoneService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployeePhoneService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEmployeeService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEmployeeService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProjectService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProjectService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyTreeCompanyService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnTreeCompanyService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAwesome(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAwesome&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppComponent(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppComponent&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppComponentHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppComponentHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppComponentScss(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppComponentScss&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDashboardTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDashboardTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDashboardHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDashboardHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDashboardCss(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDashboardCss&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLoginTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLoginTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLoginHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLoginHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
&lt;/script&gt;


</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/2906245098141909331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-company-with_18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/2906245098141909331'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/2906245098141909331'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-company-with_18.html' title='Building an application Company with Spring boot and Angular Part 2'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/bE4iUcBWUt8/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-1868971272860021521</id><published>2022-01-18T03:42:00.012-08:00</published><updated>2022-08-26T09:05:14.317-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Spring boot"/><title type='text'>Building a note application with Spring boot and Ionic Part 1</title><content type='html'>&lt;h1 style=&quot;background: none 0% 0% repeat scroll rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Spring Boot&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/05/st84.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;406&quot; data-original-width=&quot;800&quot; src=&quot;https://zupimages.net/up/21/05/st84.png&quot; style=&quot;border: 1px solid;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr /&gt;

&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;B_RCmmDa4L0&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/B_RCmmDa4L0&quot;&gt;&lt;/iframe&gt;

&lt;h1&gt; Build an application note with Spring boot and Angular use Jpa&lt;/h1&gt;

&lt;h2&gt;Objective:&lt;/h2&gt;
&lt;p&gt;
In this tutorial we will create an application note to do or create your idea by category the note conent a title, create at, update at end content a description, We ere going use Spring boot for banckend and Ionic Angular for Frontend.
&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;Used Skills in this project:&lt;/h2&gt;
&lt;p&gt;Java, SpringBoot, MicroServices, REST WebServices, JPA, Hibernate, MySQL Database, Maven, Angular, GitHub, SpringBoot Embedded Tomcat Server, STS-Eclipse IDE&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;Tools to be used&lt;/h2&gt;
&lt;p&gt; ° Use any IDE to develop the Spring and Hibernate project. It may be STS/Eclipse/Netbeans. Here, we are using STS (Spring Tool Suite). &lt;/p&gt;
&lt;p&gt; ° Mysql for the database.&lt;/p&gt;
&lt;p&gt; ° Use any IDE to develop the Angular project. It may be Visual Studio Code/Sublime. Here, we are using Visual Studio Code.&lt;/p&gt;
&lt;p&gt; ° Server: Apache Tomcat/JBoss/Glassfish/Weblogic/Websphere.&lt;/p&gt;


&lt;br /&gt;&lt;h2 class=&quot;h2-title&quot;&gt;Spring MVC&lt;/h2&gt;
&lt;p&gt;Spring MVC is the primary web framework built on the Servlet API. It is build on the popular MVC design pattern. MVC (Model-View-Controller) is a software architecture pattern, which separates application into three areas: model, view, and controller. The model represents a Java object carrying data. The view represents the visualization of the data that the model contains. The controller controls the data flow into model object and updates the view when the data changes. It separates the view and model.&lt;/p&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #fb4834;&quot;&gt;Spring Boot Architecture&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/05/gknx.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;519&quot; src=&quot;https://zupimages.net/up/21/05/gknx.png&quot; style=&quot;border: 1px solid rgb(204, 204, 204);&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Spring Boot is a module of the Spring Framework. It is used to create stand-alone, production-grade Spring Based Applications with minimum efforts. It is developed on top of the core Spring Framework.&lt;/p&gt;&lt;hr /&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Introduction mysql to database &lt;/h2&gt;
&lt;p&gt;&lt;b&gt;MySQL&lt;/b&gt; is a database management system that allows you to manage relational databases. It is open source software backed by Oracle. It means you can use MySQL without paying a dime. Also, if you want, you can change its source code to suit your needs. &lt;b&gt;MySQL&lt;/b&gt; can run on various platforms UNIX, Linux, Windows, etc. You can install it on a server or even in a desktop. Besides, MySQL is reliable, scalable, and fast.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Introduction to the POM&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;POM&lt;/b&gt; A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects. Examples for this is the build directory, which is &lt;b&gt;target&lt;/b&gt;; the source directory, which is &lt;b&gt;src/main/java&lt;/b&gt;; the test source directory, which is &lt;b&gt;src/main/java&lt;/b&gt;; and so on. When executing a task or goal, Maven looks for the POM in the current directory. It reads the POM, gets the needed configuration information, then executes the goal.&lt;/p&gt;

&lt;h3 style=&quot;background: none 0% 0% repeat scroll cornflowerblue; border-left: 10px solid rgb(49, 65, 255); color: white; margin-bottom: -15px; padding: 10px;&quot;&gt;pom.xml&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: darkcyan;&quot;&gt;
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPom&quot; onclick=&quot;copyPom(selectPom)&quot; style=&quot;cursor: pointer; float: right;&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;
  &lt;div id=&quot;selectPom&quot;&gt; 
 &amp;lt;?xml &lt;span style=&quot;color: purple;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;UTF-8&quot;&lt;/span&gt;?&amp;gt;
 &amp;lt;project &lt;span style=&quot;color: purple;&quot;&gt;xmlns&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xmlns:xsi&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xsi:schemaLocation&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&lt;/span&gt;&amp;gt;
  &amp;lt;modelVersion&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;4.0.0&lt;/span&gt;&amp;gt;/modelVersion&amp;gt;
   &amp;lt;parent&amp;gt;
   &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
   &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-parent&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;2.4.1&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;relativePath/&amp;gt; 
  &amp;lt;/parent&amp;gt;
    
    &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.note&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;note&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;0.0.1-SNAPSHOT&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;name&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;note&lt;/span&gt;&amp;lt;/name&amp;gt;
	&amp;lt;description&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;Demo project for Spring Boot&lt;/span&gt;&amp;lt;/description&amp;gt;
    
    &amp;lt;properties&amp;gt;
	 &amp;lt;java.version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;1.8&lt;/span&gt;&amp;lt;/java.version&amp;gt;
    &amp;lt;/properties&amp;gt;
    
    &amp;lt;dependencies&amp;gt;
    
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-data-jpa&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
    
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-web&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;javax.validation&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;validation-api&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	 &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	 &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-devtools&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
     &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;runtime&lt;/span&gt;&amp;lt;/scope&amp;gt;
     &amp;lt;optional&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;true&lt;/span&gt;&amp;lt;/optional&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-test&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;test&lt;/span&gt;&amp;lt;/scope&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql&lt;/span&gt;&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql-connector-java&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;runtime&lt;/span&gt;&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
    
  &amp;lt;/dependencies&amp;gt;
  
  &amp;lt;build&amp;gt;
    &amp;lt;plugins&amp;gt;
	 &amp;lt;plugin&amp;gt;
		&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
		&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-maven-plugin&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	 &amp;lt;/plugin&amp;gt;
	&amp;lt;/plugins&amp;gt;
 &amp;lt;/build&amp;gt;
 
 &amp;lt;/project&amp;gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #c0392b;&quot;&gt;Properties File&lt;/h2&gt;
&lt;p&gt;Properties files are used to keep ‘N’ number of properties in a single file to run the application in a different environment. In Spring Boot, properties are kept in the application.properties file under the classpath.&lt;/p&gt;
&lt;p&gt;The application.properties file is located in the src/main/resources directory. The code for sample application.properties&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;span style=&quot;color: black;&quot;&gt; We need to create database name it bank &lt;/span&gt;&lt;/p&gt;
&lt;h3 style=&quot;background: none 0% 0% repeat scroll cornflowerblue; border-left: 10px solid rgb(49, 65, 255); color: white; margin-bottom: -15px; padding: 10px;&quot;&gt;src/main/resources/application.properties&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: black;&quot;&gt;
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPro&quot; onclick=&quot;copyPro(selectPro)&quot; style=&quot;cursor: pointer; float: right;&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectPro&quot;&gt; 
&lt;span&gt;spring.datasource.url=&lt;span style=&quot;color: darkcyan;&quot;&gt;jdbc:mysql://localhost:3306/&lt;span style=&quot;background: none 0% 0% repeat scroll orange; color: white;&quot;&gt;note&lt;/span&gt;?useUnicode=true&amp;amp;useJDBCCompliantTimezoneShift=true&amp;amp;useLegacyDatetimeCode=false&amp;amp;serverTimezone=UTC&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.datasource.username=&lt;span style=&quot;color: darkcyan;&quot;&gt;root&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.activemq.password=&lt;/span&gt;
&lt;span&gt;spring.datasource.driver-class-name=&lt;span style=&quot;color: darkcyan;&quot;&gt;com.mysql.jdbc.Driver&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.properties.hibernate.dialect=&lt;span style=&quot;color: darkcyan;&quot;&gt;org.hibernate.dialect.MySQL8Dialect&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.hibernate.ddl-auto=&lt;span style=&quot;color: darkcyan;&quot;&gt;update&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;server.port=&lt;span style=&quot;color: darkcyan;&quot;&gt;8080&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.database=&lt;span style=&quot;color: darkcyan;&quot;&gt;MYSQL&lt;/span&gt;&lt;/span&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2&gt;Class Diagram &lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://nsa40.casimages.com/img/2021/02/03/210203070246321088.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;157&quot; data-original-width=&quot;521&quot; src=&quot;https://nsa40.casimages.com/img/2021/02/03/210203070246321088.png&quot; style=&quot;border: 1px solid rgb(204, 204, 204);&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2&gt;
&lt;/h2&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Modals / Entities&lt;/h2&gt;
&lt;p&gt;An &lt;b&gt;entity&lt;/b&gt; is a lightweight persistence domain object. Typically, an &lt;b&gt;entity&lt;/b&gt; represents a table in a relational database, and each &lt;b&gt;entity&lt;/b&gt; instance corresponds to a row in that table. The primary programming artifact of an &lt;b&gt;entity&lt;/b&gt; is the &lt;b&gt;entity&lt;/b&gt; class, although &lt;b&gt;entities&lt;/b&gt; can use helper classes.&lt;/p&gt;&lt;br&gt;
&lt;h2&gt;We need to create these entities &lt;/h2&gt;
&lt;div style=&quot;color: #2980b9; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Category&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Note&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are Category an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Category.java &lt;/b&gt; This object content id, name, createAt, updateAt and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Note&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/note/model/Category.java):&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCategory(selectCategory)&quot; id=&quot;idBtnCategory&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCategory&quot;&gt;
 
&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.note.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.validation.constraints.NotBlank;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;category&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Category {
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private Long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@NotBlank&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Temporal&lt;/span&gt;(TemporalType.&lt;b style=&quot;color: blue;&quot;&gt;TIMESTAMP&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Date &lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Temporal&lt;/span&gt;(TemporalType.&lt;b style=&quot;color: blue;&quot;&gt;TIMESTAMP&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Date &lt;span style=&quot;color: blue;&quot;&gt;updateAt&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(mappedBy = &lt;span style=&quot;color: blue;&quot;&gt;&quot;category&quot;&lt;/span&gt;, cascade = CascadeType.&lt;b style=&quot;color: blue;&quot;&gt;ALL&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Note&gt; &lt;span style=&quot;color: blue;&quot;&gt;notes&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Category() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Category(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;, Date &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;, Date &lt;span style=&quot;color: #82590f;&quot;&gt;updateAt&lt;/span&gt;, List&amp;lt;Note&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;notes&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;updateAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;updateAt&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;notes&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;notes&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setName(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Date getCreateAt() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCreateAt(Date &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Date getUpdateAt() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;updateAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setUpdateAt(Date &lt;span style=&quot;color: #82590f;&quot;&gt;updateAt&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;updateAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;updateAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Note&gt; getNotes() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;notes&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setNotes(List&amp;lt;Note&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;notes&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;notes&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;notes&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addNote(Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getNotes() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #82590f;&quot;&gt;notes&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&gt;();
  }
   getNotes().add(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;.setCategory(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note.java &lt;/b&gt; This object content id, titel, createAt, updateAt and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Category&lt;/p&gt;
&lt;h3  class=&quot;h3-title&quot;&gt;src/main/java/com/note/model/Note.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyNote(selectNote)&quot; id=&quot;idBtnNote&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNote&quot;&gt;
  
&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.note.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.validation.constraints.NotBlank;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;note&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Note {
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private Long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@NotBlank&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;title&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@NotBlank&lt;/span&gt;
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(columnDefinition = &lt;span style=&quot;color: blue;&quot;&gt;&quot;TEXT&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;content&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Temporal&lt;/span&gt;(TemporalType.&lt;b style=&quot;color: blue;&quot;&gt;TIMESTAMP&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Date &lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Temporal&lt;/span&gt;(TemporalType.&lt;b style=&quot;color: blue;&quot;&gt;TIMESTAMP&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Date &lt;span style=&quot;color: blue;&quot;&gt;updateAt&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne
 @JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;category&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Category &lt;span style=&quot;color: blue;&quot;&gt;category&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Note() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Note(String &lt;span style=&quot;color: #82590f;&quot;&gt;title&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;content&lt;/span&gt;, Date &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;, Date &lt;span style=&quot;color: #82590f;&quot;&gt;updateAt&lt;/span&gt;, Category &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;title&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;content&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;content&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;updateAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;updateAt&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;category&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;;
 }
    
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getTitle() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;title&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setTitle(String &lt;span style=&quot;color: #82590f;&quot;&gt;title&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;title&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;title&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getContent() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;content&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setContent(String &lt;span style=&quot;color: #82590f;&quot;&gt;content&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;content&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;content&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Date getCreateAt() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCreateAt(Date &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Date getUpdateAt() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;updateAt&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setUpdateAt(Date &lt;span style=&quot;color: #82590f;&quot;&gt;updateAt&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;updateAt&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;updateAt&lt;/span&gt;;
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Category getCategory() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;category&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCategory(Category &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;category&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;;
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Spring Data JPA Projections&lt;/h2&gt;

&lt;p&gt;When using &lt;b style=&quot;color: purple;&quot;&gt;Spring Data JPA&lt;/b&gt; to implement the persistence layer, the repository typically returns one or more instances of the root class. However, more often than not, we don&#39;t need all the properties of the returned objects.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;In such cases, it may be desirable to retrieve data as objects of customized types. &lt;b&gt;These types reflect partial views of the root class, containing only properties we care about&lt;/b&gt;. This is where projections come in handy.&lt;/p&gt;
&lt;h2&gt;We need to create these interface dao &lt;/h2&gt;
&lt;div style=&quot;color: #2980b9; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CategoryDao&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; NoteDao&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an interface &lt;/p&gt;
&lt;h3  class=&quot;h3-title&quot;&gt;src/main/java/com/note/dao/CategoryDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCategoryDao(selectCategoryDao)&quot; id=&quot;idBtnCategoryDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCategoryDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.note.dao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.modal.Category;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; CategoryDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Category, Long&gt; {

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface &lt;/p&gt;
&lt;h3  class=&quot;h3-title&quot;&gt;src/main/java/com/note/dao/NoteDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyNoteDao(selectNoteDao)&quot; id=&quot;idBtnNoteDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNoteDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.note.dao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.modal.Note;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; NoteDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Note, Long&gt; {

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;The services&lt;/h2&gt;
&lt;p&gt;Service Components are the class file which contains @Service annotation. These class files are used to write business logic in a different layer, separated from @RestController class file. The logic for creating a service component class file is shown here &lt;/p&gt;&lt;br /&gt;
  &lt;h2&gt;We will create one interface in service package:&lt;/h2&gt;

&lt;div style=&quot;color: #2980b9; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CategoryService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; NoteService&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an interface&lt;/p&gt;
&lt;h3  class=&quot;h3-title&quot;&gt;src/main/java/com/note/service/CategoryService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCategoryService(selectCategoryService)&quot; id=&quot;idBtnCategoryService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCategoryService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.note.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.modal.Category;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; CategoryService {

 Category addCategory(Category &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;);

 Category editCategory(Category &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteCategory(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 Category findCategory(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 List&amp;lt;Category&gt; findCategories();

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface&lt;/p&gt;
&lt;h3  class=&quot;h3-title&quot;&gt;src/main/java/com/note/service/NoteService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyNoteService(selectNoteService)&quot; id=&quot;idBtnNoteService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNoteService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.note.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.modal.Note;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; NoteService {

 Note addNote(Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 Note editNote(Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteNote(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 Note findNote(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;The managers classes implementation&lt;/h2&gt;
&lt;p&gt;An impl class is usually a class that implements the behaviour described by one of these interfaces. While the internal implementation class,  With transactions configured, we can now annotation a bean with &lt;b&gt;@Transactional&lt;/b&gt; and &lt;b&gt;@Service&lt;/b&gt; either at the class or method level. Then conversion Entity to DTO. This is stands for Data Transfer Object and is a simple Plain Old Java Object which contains class properties and getters and settings methods for accessing those properties.&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;We will create ont class in the impl package &lt;/h2&gt;
&lt;div style=&quot;color: #2980b9; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CategoryServiceImpl&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; NoteServiceImpl&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating a class impl&lt;/p&gt;
&lt;h3  class=&quot;h3-title&quot;&gt;src/main/java/com/note/impl/CategoryServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCategoryServiceImpl(selectCategoryServiceImpl)&quot; id=&quot;idBtnCategoryServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCategoryServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.note.impl;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Comparator;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.stream.Collectors;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.dao.CategoryDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.modal.Category;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.service.CategoryService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Transactional
@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CategoryServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; CategoryService {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CategoryDao &lt;span style=&quot;color: blue;&quot;&gt;categoryDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Category addCategory(Category &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;) {
   &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;.setCreateAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;categoryDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Category editCategory(Category &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Category existsCategory = &lt;span style=&quot;color: blue;&quot;&gt;categoryDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;existsCategory&lt;/span&gt;.setUpdateAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existsCategory&lt;/span&gt;.setName(&lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;.getName());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existsCategory&lt;/span&gt;.setCreateAt(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;categoryDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existsCategory&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteCategory(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;categoryDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Category findCategory(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;categoryDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Category&gt; findCategories() {
   List&amp;lt;Category&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;categories&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;categoryDao&lt;/span&gt;.findAll();
   &lt;span style=&quot;color: #82590f;&quot;&gt;categories&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;categories&lt;/span&gt;.stream().sorted(Comparator.comparing(Category::getName).reversed())
		.collect(Collectors.toList());
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;categories&lt;/span&gt;;
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a class&lt;/p&gt;
&lt;h3  class=&quot;h3-title&quot;&gt;src/main/java/com/note/impl/NoteServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyNoteServiceImpl(selectNoteServiceImpl)&quot; id=&quot;idBtnNoteServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNoteServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.note.impl;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.dao.CategoryDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.dao.NoteDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.modal.Category;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.modal.Note;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.service.NoteService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Transactional
@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; NoteServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; NoteService {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; NoteDao &lt;span style=&quot;color: blue;&quot;&gt;noteDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CategoryDao &lt;span style=&quot;color: blue;&quot;&gt;categoryDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Note addNote(Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Category &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;categoryDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;.setCreateAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
   &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;.addNote(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;noteDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Note editNote(Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Note &lt;span style=&quot;color: #82590f;&quot;&gt;existsNote&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;noteDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;existsNote&lt;/span&gt;.setUpdateAt(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existsNote&lt;/span&gt;.setTitle(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;.getTitle());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existsNote&lt;/span&gt;.setContent(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;.getContent());
   &lt;span style=&quot;color: #82590f;&quot;&gt;existsNote&lt;/span&gt;.setCreateAt(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;noteDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;existsNote&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteNote(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;noteDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Note findNote(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;noteDao&lt;/span&gt;.findById(id).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;@RestController API&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;@RestController&lt;/b&gt; is a convenience annotation for creating Restful controllers. It is a specialization of @Component and is autodetected through classpath scanning. It adds the @Controller and @ResponseBody annotations. It converts the response to JSON or XML. It does not work with the view technology, so the methods cannot return ModelAndView. It is typically used in combination with annotated handler methods based on the @RequestMapping annotation.&lt;/p&gt;&lt;br/&gt;

&lt;h2&gt;We will create one class in controller package:&lt;/h2&gt;
&lt;div style=&quot;color: #2980b9; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CategoryController&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; NoteController&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating a class&lt;/p&gt;
&lt;h3  class=&quot;h3-title&quot;&gt;src/main/java/com/note/controller/CategoryController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCategoryController(selectCategoryController)&quot; id=&quot;idBtnCategoryController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCategoryController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.note.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.modal.Category;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.service.CategoryService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;, maxAge = 3600)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(&quot;/api&quot;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CategoryController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; CategoryService &lt;span style=&quot;color: blue;&quot;&gt;categoryService&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addCategory&quot;&lt;/span&gt;)
 Category addCategory(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Category &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;categoryService&lt;/span&gt;.addCategory(&lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editCategory/{id}&quot;&lt;/span&gt;)
 Category editCategory(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Category &lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;categoryService&lt;/span&gt;.editCategory(&lt;span style=&quot;color: #82590f;&quot;&gt;category&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteCategory/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteCategory(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;categoryService&lt;/span&gt;.deleteCategory(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findCategory/{id}&quot;&lt;/span&gt;)
 Category findCategory(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;categoryService&lt;/span&gt;.findCategory(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findCategories&quot;&lt;/span&gt;)
 List&amp;lt;Category&gt; findCategories() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;categoryService&lt;/span&gt;.findCategories();
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;p&gt;Here, we are creating a class&lt;/p&gt;
&lt;h3  class=&quot;h3-title&quot;&gt;src/main/java/com/note/controller/NoteService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyNoteService(selectNoteService)&quot; id=&quot;idBtnNoteService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNoteService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.note.controller;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.modal.Note;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.note.service.NoteService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #49498c;&quot;&gt;&quot;*&quot;&lt;/span&gt;, maxAge = 3600)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(&quot;/api&quot;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; NoteController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; NoteService &lt;span style=&quot;color: blue;&quot;&gt;noteService&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addNote/{id}&quot;&lt;/span&gt;)
 Note addNote(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;noteService&lt;/span&gt;.addNote(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editNote/{id}&quot;&lt;/span&gt;)
   Note editNote(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Note &lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;noteService&lt;/span&gt;.editNote(&lt;span style=&quot;color: #82590f;&quot;&gt;note&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/deleteNote/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteNote(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;noteService&lt;/span&gt;.deleteNote(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findNote/{id}&quot;&lt;/span&gt;)
 Note findNote(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;noteService&lt;/span&gt;.findNote(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;NoteApplication&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;@BookStoreApplication&lt;/b&gt; and its use in a simple Spring Boot application. We use the @SpringBootApplication annotation in our Application or Main class to enable a host of features, e.g. Java-based Spring configuration, component scanning, and in particular for enabling Spring &lt;/p&gt;&lt;br /&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/note/NoteApplication.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyNoteApplication(selectNoteApplication)&quot; id=&quot;idBtnNoteApplication&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectNoteApplication&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.note;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.boot.autoconfigure.SpringBootApplication;

&lt;span style=&quot;color: #8a8787;&quot;&gt;
@SpringBootApplication&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; NoteApplication {

 &lt;b style=&quot;color: purple;&quot;&gt;public static void&lt;/b&gt; main(String[] &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;) {
   SpringApplication.run(NoteApplication.&lt;b style=&quot;color: purple;&quot;&gt;class&lt;/b&gt;, &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;);		
   System.&lt;b style=&quot;color: blue;&quot;&gt;out&lt;/b&gt;.println(&lt;span style=&quot;color: blue;&quot;&gt;&quot;App started....&quot;&lt;/span&gt;);
  }
  
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Spring Boot example when building a @RestController API.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp; Spring Data JPA, as well, we are gooing to continue with Ionic project structure for building a front-end app to make HTTP requests and consume responses.&lt;/p&gt;&lt;br&gt;&lt;br&gt;


&lt;div style=&quot;background: #fff; border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring.html&quot;&gt;Building an application note with Spring boot and Ionic part 2&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: none 0% 0% repeat scroll rgb(0, 137, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/note-spring&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download This Application My note From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;


&lt;style&gt;
pre:before {
   content: none;
}
pre {
background: #ddd;
line-height: 20px;
position: relative;
overflow: auto;
width: 100%;
border: 1px solid #d0c6c6;
}
  
code {
 padding: 0px 0px 0 20px;
 display: block; 
 color: #000; 
 font-family: monospace; 
 font-size: 16px;
 margin-top: -30px;
}
  .h2-title {
   background: #73f377; 
   border-left: 10px solid; 
   padding: 10px !important;
  }
  .h3-title {
   background: #c5efc7; 
   padding: 10px !important;
   margin-bottom: -16px !important;
  }
 pre div::selection,
 b::selection,
 code::selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
   padding: 0px 16px;
}
pre div::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
  padding: 0px 16px;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
&lt;/style&gt;

&lt;script data-ad-client=&quot;ca-pub-7401879888732563&quot; async src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
 
&lt;script&gt;
  function copyPom(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPom&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyPro(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPro&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCategory(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCategory&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyNote(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNote&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyNoteDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNoteDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCategoryDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCategoryDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCategoryService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCategoryService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyNoteService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNoteService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
} 
  function copyCategoryServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCategoryServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyNoteServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNoteServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCategoryController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCategoryController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyNoteService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNoteService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyNoteApplication(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnNoteApplication&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/1868971272860021521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-note-application-with-spring.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/1868971272860021521'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/1868971272860021521'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-note-application-with-spring.html' title='Building a note application with Spring boot and Ionic Part 1'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/B_RCmmDa4L0/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-5065422396706963124</id><published>2022-01-18T03:42:00.011-08:00</published><updated>2022-08-26T09:04:24.580-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Spring boot"/><title type='text'>Building an application enterprise with Spring boot &amp; Ionic Part 1</title><content type='html'>&lt;h1 style=&quot;background: none 0% 0% repeat scroll rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Spring Boot&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/05/nchd.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;406&quot; data-original-width=&quot;800&quot; src=&quot;https://zupimages.net/up/21/05/nchd.png&quot; style=&quot;border: 1px solid;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr /&gt;

&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;wN6u-eM9ULc&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/wN6u-eM9ULc&quot;&gt;&lt;/iframe&gt;

&lt;h1&gt; Build an application enterprise with Spring boot and Angular use Jpa&lt;/h1&gt;

&lt;h2&gt;Objective:&lt;/h2&gt;
&lt;p&gt;
The objective of this tutorial is how to know Design Patterns work. In this tutorial we will create an application enterprise to calculate the language and the level for the applications how many language used in the app like Java, Php, Javascript etc... Criticality like Low, Medium and High.
&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;Java Design Patterns&lt;/h2&gt;
 &lt;p&gt;&lt;strong style=&quot;color: #009432&quot;&gt;1.&lt;/strong&gt; Design Patterns are already defined and provides industry standard approach to solve a recurring problem, so it saves time if we sensibly use the design pattern. There are many java design patterns that we can use in our java based projects.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;&lt;strong style=&quot;color: #009432&quot;&gt;2.&lt;/strong&gt;  Using design patterns promotes reusability that leads to more robust and highly maintainable code. It helps in reducing total cost of ownership (TCO) of the software product.&lt;/p&gt;&lt;br&gt;
 &lt;p&gt;&lt;strong style=&quot;color: #009432&quot;&gt;3.&lt;/strong&gt; Since design patterns are already defined, it makes our code easy to understand and debug. It leads to faster development and new members of team understand it easily.&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;Used Skills in this project:&lt;/h2&gt;
&lt;p&gt;Java, SpringBoot, MicroServices, REST WebServices, JPA, Hibernate, MySQL Database, Maven, Angular, GitHub, SpringBoot Embedded Tomcat Server, STS-Eclipse IDE&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;Tools to be used&lt;/h2&gt;
&lt;p&gt; ° Use any IDE to develop the Spring and Hibernate project. It may be STS/Eclipse/Netbeans. Here, we are using STS (Spring Tool Suite). &lt;/p&gt;
&lt;p&gt; ° Mysql for the database.&lt;/p&gt;
&lt;p&gt; ° Use any IDE to develop the Angular project. It may be Visual Studio Code/Sublime. Here, we are using Visual Studio Code.&lt;/p&gt;
&lt;p&gt; ° Server: Apache Tomcat/JBoss/Glassfish/Weblogic/Websphere.&lt;/p&gt;


&lt;br /&gt;&lt;h2 class=&quot;h2-title&quot;&gt;Spring MVC&lt;/h2&gt;
&lt;p&gt;Spring MVC is the primary web framework built on the Servlet API. It is build on the popular MVC design pattern. MVC (Model-View-Controller) is a software architecture pattern, which separates application into three areas: model, view, and controller. The model represents a Java object carrying data. The view represents the visualization of the data that the model contains. The controller controls the data flow into model object and updates the view when the data changes. It separates the view and model.&lt;/p&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #fb4834;&quot;&gt;Spring Boot Architecture&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/05/bwyr.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;519&quot; src=&quot;https://zupimages.net/up/21/05/bwyr.png&quot; style=&quot;border: 1px solid rgb(204, 204, 204);&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Spring Boot is a module of the Spring Framework. It is used to create stand-alone, production-grade Spring Based Applications with minimum efforts. It is developed on top of the core Spring Framework.&lt;/p&gt;&lt;hr /&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Introduction mysql to database &lt;/h2&gt;
&lt;p&gt;&lt;b&gt;MySQL&lt;/b&gt; is a database management system that allows you to manage relational databases. It is open source software backed by Oracle. It means you can use MySQL without paying a dime. Also, if you want, you can change its source code to suit your needs. &lt;b&gt;MySQL&lt;/b&gt; can run on various platforms UNIX, Linux, Windows, etc. You can install it on a server or even in a desktop. Besides, MySQL is reliable, scalable, and fast.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Introduction to the POM&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;POM&lt;/b&gt; A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects. Examples for this is the build directory, which is &lt;b&gt;target&lt;/b&gt;; the source directory, which is &lt;b&gt;src/main/java&lt;/b&gt;; the test source directory, which is &lt;b&gt;src/main/java&lt;/b&gt;; and so on. When executing a task or goal, Maven looks for the POM in the current directory. It reads the POM, gets the needed configuration information, then executes the goal.&lt;/p&gt;

&lt;h3 class=&quot;h3-title&quot;&gt;pom.xml&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: darkcyan;&quot;&gt;
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPom&quot; onclick=&quot;copyPom(selectPom)&quot; style=&quot;cursor: pointer; float: right;&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;
  &lt;div id=&quot;selectPom&quot;&gt; 
 &amp;lt;?xml &lt;span style=&quot;color: purple;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;UTF-8&quot;&lt;/span&gt;?&amp;gt;
 &amp;lt;project &lt;span style=&quot;color: purple;&quot;&gt;xmlns&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xmlns:xsi&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xsi:schemaLocation&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&lt;/span&gt;&amp;gt;
  &amp;lt;modelVersion&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;4.0.0&lt;/span&gt;&amp;gt;/modelVersion&amp;gt;
   &amp;lt;parent&amp;gt;
   &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
   &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-parent&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;2.4.1&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;relativePath/&amp;gt; 
  &amp;lt;/parent&amp;gt;
    
    &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.enterprise&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;enterprise&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;0.0.1-SNAPSHOT&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;name&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;enterprise&lt;/span&gt;&amp;lt;/name&amp;gt;
	&amp;lt;description&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;Demo project for Spring Boot&lt;/span&gt;&amp;lt;/description&amp;gt;
    
    &amp;lt;properties&amp;gt;
	 &amp;lt;java.version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;1.8&lt;/span&gt;&amp;lt;/java.version&amp;gt;
    &amp;lt;/properties&amp;gt;
    
    &amp;lt;dependencies&amp;gt;
    
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-data-jpa&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
    
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-web&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;javax.validation&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;validation-api&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	 &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	 &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-devtools&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
     &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;runtime&lt;/span&gt;&amp;lt;/scope&amp;gt;
     &amp;lt;optional&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;true&lt;/span&gt;&amp;lt;/optional&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-test&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;test&lt;/span&gt;&amp;lt;/scope&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql&lt;/span&gt;&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql-connector-java&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;runtime&lt;/span&gt;&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
    
  &amp;lt;/dependencies&amp;gt;
  
  &amp;lt;build&amp;gt;
    &amp;lt;plugins&amp;gt;
	 &amp;lt;plugin&amp;gt;
		&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
		&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-maven-plugin&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	 &amp;lt;/plugin&amp;gt;
	&amp;lt;/plugins&amp;gt;
 &amp;lt;/build&amp;gt;
 
 &amp;lt;/project&amp;gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #c0392b;&quot;&gt;Properties File&lt;/h2&gt;
&lt;p&gt;Properties files are used to keep ‘N’ number of properties in a single file to run the application in a different environment. In Spring Boot, properties are kept in the application.properties file under the classpath.&lt;/p&gt;
&lt;p&gt;The application.properties file is located in the src/main/resources directory. The code for sample application.properties&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;span style=&quot;color: black;&quot;&gt; We need to create database name it bank &lt;/span&gt;&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/resources/application.properties&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: black;&quot;&gt;
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPro&quot; onclick=&quot;copyPro(selectPro)&quot; style=&quot;cursor: pointer; float: right;&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectPro&quot;&gt; 
&lt;span&gt;spring.datasource.url=&lt;span style=&quot;color: darkcyan;&quot;&gt;jdbc:mysql://localhost:3306/&lt;span style=&quot;background: none 0% 0% repeat scroll orange; color: white;&quot;&gt;enterprise&lt;/span&gt;?useUnicode=true&amp;amp;useJDBCCompliantTimezoneShift=true&amp;amp;useLegacyDatetimeCode=false&amp;amp;serverTimezone=UTC&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.datasource.username=&lt;span style=&quot;color: darkcyan;&quot;&gt;root&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.activemq.password=&lt;/span&gt;
&lt;span&gt;spring.datasource.driver-class-name=&lt;span style=&quot;color: darkcyan;&quot;&gt;com.mysql.jdbc.Driver&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.properties.hibernate.dialect=&lt;span style=&quot;color: darkcyan;&quot;&gt;org.hibernate.dialect.MySQL5Dialect&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.hibernate.ddl-auto=&lt;span style=&quot;color: darkcyan;&quot;&gt;update&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;server.port=&lt;span style=&quot;color: darkcyan;&quot;&gt;8080&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.database=&lt;span style=&quot;color: darkcyan;&quot;&gt;MYSQL&lt;/span&gt;&lt;/span&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2&gt;Class Diagram &lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://nsa40.casimages.com/img/2021/02/05/210205120158726754.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;157&quot; data-original-width=&quot;521&quot; src=&quot;https://nsa40.casimages.com/img/2021/02/05/210205120158726754.png&quot; style=&quot;border: 1px solid rgb(204, 204, 204);&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2&gt;
&lt;/h2&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Modals / Entities&lt;/h2&gt;
&lt;p&gt;An &lt;b&gt;entity&lt;/b&gt; is a lightweight persistence domain object. Typically, an &lt;b&gt;entity&lt;/b&gt; represents a table in a relational database, and each &lt;b&gt;entity&lt;/b&gt; instance corresponds to a row in that table. The primary programming artifact of an &lt;b&gt;entity&lt;/b&gt; is the &lt;b&gt;entity&lt;/b&gt; class, although &lt;b&gt;entities&lt;/b&gt; can use helper classes.&lt;/p&gt;&lt;br&gt;
&lt;h2&gt;We need to create these entities &lt;/h2&gt;
&lt;div style=&quot;color: #009432; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Application&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Enterprise&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; User&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Criticality&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Language&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Application.java &lt;/b&gt; This object content id, name, description and two Enums &lt;b&gt;Criticality&lt;/b&gt; and &lt;b&gt;Language&lt;/b&gt; and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Enterprise and &lt;b&gt;@OneToOne&lt;/b&gt; with User, we need also implements &lt;b&gt;Visitable&lt;/b&gt; this interface we will create in the backage visitor&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/model/Application.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyApplication(selectApplication)&quot; id=&quot;idBtnApplication&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectApplication&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.visitor.Visitable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.visitor.Visitor;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #808e9b;&quot;&gt;@Entity&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Application &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Visitable {
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private Long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Column&lt;/span&gt;(columnDefinition=&lt;span style=&quot;color: blue;&quot;&gt;&quot;VARCHAR(40)&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Column&lt;/span&gt;(columnDefinition = &lt;span style=&quot;color: blue;&quot;&gt;&quot;TEXT&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt;;
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Enumerated&lt;/span&gt;(EnumType.&lt;b style=&quot;color: blue;&quot;&gt;STRING&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Language &lt;span style=&quot;color: blue;&quot;&gt;language&lt;/span&gt;;
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Enumerated&lt;/span&gt;(EnumType.&lt;b style=&quot;color: blue;&quot;&gt;STRING&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Criticality &lt;span style=&quot;color: blue;&quot;&gt;criticality&lt;/span&gt;;
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;user&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@OneToOne&lt;/span&gt;(cascade = CascadeType.&lt;b style=&quot;color: blue;&quot;&gt;ALL&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; User &lt;span style=&quot;color: blue;&quot;&gt;user&lt;/span&gt;;
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;enterprise&quot;&lt;/span&gt;)
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@ManyToOne&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Enterprise &lt;span style=&quot;color: blue;&quot;&gt;enterprise&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Application() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 
&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Application(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;, Language &lt;span style=&quot;color: #82590f;&quot;&gt;language&lt;/span&gt;, Criticality &lt;span style=&quot;color: #82590f;&quot;&gt;criticality&lt;/span&gt;, User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;,
			Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;language&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;language&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;criticality&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;criticality&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public Long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setName(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getDescription() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDescription(String &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Language getLanguage() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;language&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setLanguage(Language &lt;span style=&quot;color: #82590f;&quot;&gt;language&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;language&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;language&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Criticality getCriticality() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;criticality&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCriticality(Criticality &lt;span style=&quot;color: #82590f;&quot;&gt;criticality&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;criticality&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;criticality&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; User getUser() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;user&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setUser(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Enterprise getEnterprise() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterprise&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setEnterprise(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;;
 }
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; accept(Visitor &lt;span style=&quot;color: #82590f;&quot;&gt;visitor&lt;/span&gt;) {
   &lt;span style=&quot;color: #82590f;&quot;&gt;visitor&lt;/span&gt;.visit(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);	
 }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Enterprise.java &lt;/b&gt; This object content id, name&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/model/Enterprise.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEnterprise(selectEnterprise)&quot; id=&quot;idBtnEnterprise&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEnterprise&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.visitor.Visitable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.visitor.Visitor;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #808e9b;&quot;&gt;@Entity&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Enterprise &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Visitable {
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private Long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Column&lt;/span&gt;(columnDefinition=&lt;span style=&quot;color: blue;&quot;&gt;&quot;VARCHAR(40)&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Column&lt;/span&gt;(columnDefinition = &lt;span style=&quot;color: blue;&quot;&gt;&quot;TEXT&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt;;
 
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@OneToMany&lt;/span&gt;(mappedBy=&lt;span style=&quot;color: blue;&quot;&gt;&quot;enterprise&quot;&lt;/span&gt;, cascade = CascadeType.&lt;b style=&quot;color: blue;&quot;&gt;ALL&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Application&gt; &lt;span style=&quot;color: blue;&quot;&gt;applications&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Enterprise() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 
&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Enterprise(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;, List&amp;lt;Application&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;applications&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;applications&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;applications&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public Long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setName(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getDescription() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setDescription(String &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;description&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;description&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Application&gt; getApplications() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;applications&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setApplications(List&amp;lt;Application&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;applications&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;applications&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;applications&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addApplication(Application &lt;span style=&quot;color: #82590f;&quot;&gt;app&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getApplications() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
	&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: #82590f;&quot;&gt;applications&lt;/span&gt; = new ArrayList&amp;lt;Application&gt;();
   }
	getApplications().add(&lt;span style=&quot;color: #82590f;&quot;&gt;app&lt;/span&gt;);
	&lt;span style=&quot;color: #82590f;&quot;&gt;app&lt;/span&gt;.setEnterprise(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);	
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; accept(Visitor &lt;span style=&quot;color: #82590f;&quot;&gt;visitor&lt;/span&gt;) {
  visitor.visit(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
  &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getApplications() != &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
	getApplications().forEach(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt; -&gt; {
	 &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;.accept(&lt;span style=&quot;color: #82590f;&quot;&gt;visitor&lt;/span&gt;);
    });
   }
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;User.java &lt;/b&gt; This object content id, name, and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Sport and Gym&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/model/User.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyUser(selectUser)&quot; id=&quot;idBtnUser&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUser&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;

&lt;span style=&quot;color: #808e9b;&quot;&gt;@Entity&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; User {
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private Long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Column&lt;/span&gt;(columnDefinition=&lt;span style=&quot;color: blue;&quot;&gt;&quot;VARCHAR(40)&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; User() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 
&lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; User(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public Long&lt;/b&gt; getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setName(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Enum&lt;/h2&gt;

&lt;p&gt;Here, we are creating an enum Criticality&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/model/Criticality.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCriticality(selectCriticality)&quot; id=&quot;idBtnCriticality&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCriticality&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal;

&lt;b style=&quot;color: purple;&quot;&gt;public enum&lt;/b&gt; Criticality {
 &lt;b style=&quot;color: blue;&quot;&gt;LOW&lt;/b&gt;, &lt;b style=&quot;color: blue;&quot;&gt;MEDIUM&lt;/b&gt;, &lt;b style=&quot;color: blue;&quot;&gt;HIGH&lt;/b&gt;
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an enum Language&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/model/Language.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyLanguage(selectLanguage)&quot; id=&quot;idBtnLanguage&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLanguage&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.modal;

&lt;b style=&quot;color: purple;&quot;&gt;public enum&lt;/b&gt; Language {
 &lt;b style=&quot;color: blue;&quot;&gt;JAVA&lt;/b&gt;, &lt;b style=&quot;color: blue;&quot;&gt;JAVASCRIPT&lt;/b&gt;, &lt;b style=&quot;color: blue;&quot;&gt;PHP&lt;/b&gt;
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;h2 class=&quot;h2-title&quot;&gt;Visitor Design Pattern&lt;/h2&gt;
&lt;p&gt;The purpose of a Visitor pattern is to define a new operation without introducing the modifications to an existing object structure.
Imagine that we have a &lt;b style=&quot;color: #009432; font-weight: bold;&quot;&gt;composite&lt;/b&gt; object which consists of components. The object&#39;s structure is fixed – we either can&#39;t change it, or we don&#39;t plan to add new types of elements to the structure. Now, how could we add new functionality to our code without modification of existing classes?
The Visitor design pattern might be an answer. Simply put&lt;/p&gt;

&lt;h2&gt;We&#39;ll have to do is to add a function which accepts the visitor class to each element of the structure.&lt;/h2&gt;
&lt;p&gt;That way our components will allow the visitor implementation to “visit” them and perform any required action on that element. In other words, we&#39;ll extract the algorithm which will be applied to the object structure from the classes. Consequently, &lt;/p&gt;

&lt;h2&gt;We&#39;ll make good use of the Open/Closed principle&lt;/h2&gt;
&lt;p&gt;As we won&#39;t modify the code, but we&#39;ll still be able to extend the functionality by providing a new Visitor implementation.&lt;/p&gt;

&lt;h2&gt;We need to create these interfaces &lt;/h2&gt;
&lt;div style=&quot;color: #009432; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Visitable&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Visitor&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an interface Visitable&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/visitor/Visitable.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyVisitable(selectVisitable)&quot; id=&quot;idBtnVisitable&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectVisitable&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.visitor;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; Visitable {
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; accept(Visitor &lt;span style=&quot;color: #82590f;&quot;&gt;visitor&lt;/span&gt;);
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/model/Visitor.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyVisitor(selectVisitor)&quot; id=&quot;idBtnVisitor&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectVisitor&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.visitor;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Application;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; Visitor {
 &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; visit(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
 &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; visit(Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;);
 &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; visit(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;);
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Calculate&lt;/h2&gt;
&lt;p&gt;We will calculate the criticalities and the languages in these entities.&lt;/p&gt;

&lt;h2&gt;We need to create these interfaces &lt;/h2&gt;
&lt;div style=&quot;color: #009432; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CalculateHigh&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CalculateJava&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CalculateJavascript&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CalculateLow&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CalculateMedium&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; CalculatePhp&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an entity CalculateHigh&lt;/p&gt;
&lt;p&gt;&lt;b&gt;CalculateHigh.java &lt;/b&gt; We are going &lt;b&gt;implements&lt;/b&gt; Visitor to &lt;b&gt;@Override&lt;/b&gt; the visit method&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/calculator/CalculateHigh.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCalculateHigh(selectCalculateHigh)&quot; id=&quot;idBtnCalculateHigh&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCalculateHigh&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.calculator;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Application;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Language;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.visitor.Visitor;

&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CalculateHigh &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Visitor {

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt; = 0;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt;(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;.getCriticality() == Criticality.&lt;b style=&quot;color: blue;&quot;&gt;HIGH&lt;/b&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;++;
   }
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; getValue() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an entity CalculateJava&lt;/p&gt;
&lt;p&gt;&lt;b&gt;CalculateJava.java &lt;/b&gt; We are going &lt;b&gt;implements&lt;/b&gt; Visitor to &lt;b&gt;@Override&lt;/b&gt; the visit method&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/calculator/CalculateJava.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCalculateJava(selectCalculateJava)&quot; id=&quot;idBtnCalculateJava&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCalculateJava&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.calculator;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Application;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Language;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.visitor.Visitor;

&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CalculateJava &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Visitor {

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt; = 0;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt;(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;.getLanguage() == Language.&lt;b style=&quot;color: blue;&quot;&gt;JAVA&lt;/b&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;++;
   }
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; getValue() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an entity CalculateJavascript&lt;/p&gt;
&lt;p&gt;&lt;b&gt;CalculateJavascript.java &lt;/b&gt; We are going &lt;b&gt;implements&lt;/b&gt; Visitor to &lt;b&gt;@Override&lt;/b&gt; the visit method&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/calculator/CalculateJavascript.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCalculateJavascript(selectCalculateJavascript)&quot; id=&quot;idBtnCalculateJavascript&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCalculateJavascript&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.calculator;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Application;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Language;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.visitor.Visitor;

&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CalculateJavascript &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Visitor {

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt; = 0;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt;(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;.getLanguage() == Language.&lt;b style=&quot;color: blue;&quot;&gt;JAVASCRIPT&lt;/b&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;++;
   }
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; getValue() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an entity CalculateLow&lt;/p&gt;
&lt;p&gt;&lt;b&gt;CalculateLow.java &lt;/b&gt; We are going &lt;b&gt;implements&lt;/b&gt; Visitor to &lt;b&gt;@Override&lt;/b&gt; the visit method&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/calculator/CalculateLow.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCalculateLow(selectCalculateLow)&quot; id=&quot;idBtnCalculateLow&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCalculateLow&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.calculator;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Application;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Language;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.visitor.Visitor;

&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CalculateLow &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Visitor {

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt; = 0;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt;(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;.getCriticality() == Criticality.&lt;b style=&quot;color: blue;&quot;&gt;LOW&lt;/b&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;++;
   }
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; getValue() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an entity CalculateMedium&lt;/p&gt;
&lt;p&gt;&lt;b&gt;CalculateMedium.java &lt;/b&gt; We are going &lt;b&gt;implements&lt;/b&gt; Visitor to &lt;b&gt;@Override&lt;/b&gt; the visit method&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/calculator/CalculateMedium.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCalculateMedium(selectCalculateMedium)&quot; id=&quot;idBtnCalculateMedium&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCalculateMedium&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.calculator;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Application;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Language;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.visitor.Visitor;

&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CalculateMedium &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Visitor {

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt; = 0;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt;(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;.getCriticality() == Criticality.&lt;b style=&quot;color: blue;&quot;&gt;MEDIUM&lt;/b&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;++;
   }
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; getValue() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an entity CalculatePhp&lt;/p&gt;
&lt;p&gt;&lt;b&gt;CalculatePhp.java &lt;/b&gt; We are going &lt;b&gt;implements&lt;/b&gt; Visitor to &lt;b&gt;@Override&lt;/b&gt; the visit method&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/calculator/CalculatePhp.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCalculatePhp(selectCalculatePhp)&quot; id=&quot;idBtnCalculatePhp&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCalculatePhp&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.calculator;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Application;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Language;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.visitor.Visitor;

&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; CalculatePhp &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Visitor {

 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt; = 0;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt;(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;.getLanguage() == Language.&lt;b style=&quot;color: blue;&quot;&gt;PHP&lt;/b&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;++;
   }
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; visit(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; 0;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; getValue() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;value&lt;/span&gt;;
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Spring Data JPA Projections&lt;/h2&gt;

&lt;p&gt;When using &lt;b style=&quot;color: purple;&quot;&gt;Spring Data JPA&lt;/b&gt; to implement the persistence layer, the repository typically returns one or more instances of the root class. However, more often than not, we don&#39;t need all the properties of the returned objects.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;In such cases, it may be desirable to retrieve data as objects of customized types. &lt;b&gt;These types reflect partial views of the root class, containing only properties we care about&lt;/b&gt;. This is where projections come in handy.&lt;/p&gt;
&lt;h2&gt;We need to create these interface dao &lt;/h2&gt;
&lt;div style=&quot;color: #009432; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ApplicationDao&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EnterpriseDao&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; UserDao&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an interface ApplicationDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/dao/ApplicationDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyApplicationDao(selectApplicationDao)&quot; id=&quot;idBtnApplicationDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectApplicationDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.dao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Application;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ApplicationDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Application, Long&gt; {

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface EnterpriseDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/dao/EnterpriseDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEnterpriseDao(selectEnterpriseDao)&quot; id=&quot;idBtnEnterpriseDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEnterpriseDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.dao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; EnterpriseDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Enterprise, Long&gt; {

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface UserDao&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/dao/UserDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyUserDao(selectUserDao)&quot; id=&quot;idBtnUserDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUserDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.dao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; UserDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;User, Long&gt; {

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;The services&lt;/h2&gt;
&lt;p&gt;Service Components are the class file which contains @Service annotation. These class files are used to write business logic in a different layer, separated from @RestController class file. The logic for creating a service component class file is shown here &lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;We will create one interface in service package:&lt;/h2&gt;
&lt;div style=&quot;color: #009432; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ApplicationService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EnterpriseService&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; UserService&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an interface ApplicationService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/service/ApplicationService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyApplicationService(selectApplicationService)&quot; id=&quot;idBtnApplicationService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectApplicationService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Application;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ApplicationService {
   Application createApplicationForUser(Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
   
   Application createApplicationForEnterprise(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idApplication&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
   
   List&amp;lt;Application&gt; findApplications();
   
   List&amp;lt;Application&gt; findApplicationsForEnterprise(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
   
   Application findApplication(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
   
   &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteApplication(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface EnterpriseService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/service/EnterpriseService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEnterpriseService(selectEnterpriseService)&quot; id=&quot;idBtnEnterpriseService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEnterpriseService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; EnterpriseService {
	 
  Enterprise createEnterprise(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
	 
  List&amp;lt;Enterprise&gt; findEnterprises();
	 
  Enterprise findEnterprise(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	 
  &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteEnterprise(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	  
  &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculateJava(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
	 
  &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculateLow(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
	 
  &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculateMedium(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
	 
  &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculatePhp(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
	 
  &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculateHigh(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
	 
  &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculateJavascript(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface UserService&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/service/UserService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyUserService(selectUserService)&quot; id=&quot;idBtnUserService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUserService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.service;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; UserService {
   User createUser(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;);
   
   List&amp;lt;User&gt; findUsers(); 
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;The managers classes implementation&lt;/h2&gt;
&lt;p&gt;An impl class is usually a class that implements the behaviour described by one of these interfaces. While the internal implementation class,  With transactions configured, we can now annotation a bean with &lt;b&gt;@Transactional&lt;/b&gt; and &lt;b&gt;@Service&lt;/b&gt; either at the class or method level. Then conversion Entity to DTO. This is stands for Data Transfer Object and is a simple Plain Old Java Object which contains class properties and getters and settings methods for accessing those properties.&lt;/p&gt;&lt;br&gt;
&lt;h2&gt;We will create one interface in impl package:&lt;/h2&gt;
&lt;div style=&quot;color: #009432; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ApplicationServiceImpl&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EnterpriseServiceImpl&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; UserServiceImpl&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an class ApplicationServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/impl/ApplicationServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyApplicationServiceImpl(selectApplicationServiceImpl)&quot; id=&quot;idBtnApplicationServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectApplicationServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.impl;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.dao.ApplicationDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.dao.EnterpriseDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.dao.UserDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Application;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.service.ApplicationService;

&lt;span style=&quot;color: #808e9b;&quot;&gt;@Transactional
@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ApplicationServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; ApplicationService{
 
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ApplicationDao &lt;span style=&quot;color: blue;&quot;&gt;applicationDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; UserDao &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;;
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; EnterpriseDao &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Application createApplicationForUser(Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;.setUser(&lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;applicationDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Application&gt; findApplications() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;applicationDao&lt;/span&gt;.findAll();
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Application findApplication(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;applicationDao&lt;/span&gt;.findById(id).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteApplication(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;applicationDao&lt;/span&gt;.findById(id).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;.setUser(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;span style=&quot;color: blue;&quot;&gt;applicationDao&lt;/span&gt;.delete(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;);		
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Application createApplicationForEnterprise(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idApplication&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;applicationDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;idApplication&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;.addApplication(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;applicationDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Application&gt; findApplicationsForEnterprise(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;.getApplications();
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an interface EnterpriseServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/impl/EnterpriseServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEnterpriseServiceImpl(selectEnterpriseServiceImpl)&quot; id=&quot;idBtnEnterpriseServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEnterpriseServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.impl;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.calculator.CalculateHigh;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.calculator.CalculateMedium;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.calculator.CalculateJava;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.calculator.CalculateJavascript;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.calculator.CalculateLow;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.calculator.CalculatePhp;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.dao.EnterpriseDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.service.EnterpriseService;

&lt;span style=&quot;color: #808e9b;&quot;&gt;@Transactional
@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; EnterpriseServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; EnterpriseService {

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; EnterpriseDao &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Enterprise createEnterprise(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Enterprise&gt; findEnterprises() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.findAll();
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Enterprise findEnterprise(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; deleteEnterprise(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.deleteById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);	
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; calculateJava(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   CalculateJava &lt;span style=&quot;color: #82590f;&quot;&gt;calculateJava&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; CalculateJava();
   &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;.accept(&lt;span style=&quot;color: #82590f;&quot;&gt;calculateJava&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;calculateJava&lt;/span&gt;.getValue();
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; calculateLow(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   CalculateLow &lt;span style=&quot;color: #82590f;&quot;&gt;calculateLow&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; CalculateLow();
   &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;.accept(&lt;span style=&quot;color: #82590f;&quot;&gt;calculateLow&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;calculateLow&lt;/span&gt;.getValue();
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; calculateMedium(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   CalculateMedium &lt;span style=&quot;color: #82590f;&quot;&gt;calculateMedium&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; CalculateMedium();
   &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;.accept(&lt;span style=&quot;color: #82590f;&quot;&gt;calculateMedium&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;calculateMedium&lt;/span&gt;.getValue();
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; calculatePhp(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   CalculatePhp &lt;span style=&quot;color: #82590f;&quot;&gt;calculatePhpApps&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; CalculatePhp();
   &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;.accept(&lt;span style=&quot;color: #82590f;&quot;&gt;calculatePhpApps&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;calculatePhpApps&lt;/span&gt;.getValue();
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; calculateJavascript(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   CalculateJavascript &lt;span style=&quot;color: #82590f;&quot;&gt;calculateJavascript&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; CalculateJavascript();
   &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;.accept(&lt;span style=&quot;color: #82590f;&quot;&gt;calculateJavascript&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;calculateJavascript&lt;/span&gt;.getValue();
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public int&lt;/b&gt; calculateHigh(Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   CalculateHigh &lt;span style=&quot;color: #82590f;&quot;&gt;calculateHigh&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; CalculateHigh();
   &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;.accept(&lt;span style=&quot;color: #82590f;&quot;&gt;calculateHigh&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;calculateHigh&lt;/span&gt;.getValue();
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity UserServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/impl/UserServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyUserServiceImpl(selectUserServiceImpl)&quot; id=&quot;idBtnUserServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUserServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.impl;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.transaction.annotation.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.dao.UserDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.service.UserService;

&lt;span style=&quot;color: #808e9b;&quot;&gt;@Transactional
@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; UserServiceImpl &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; UserService{
 
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; UserDao &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; User createUser(User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;User&gt; findUsers() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userDao&lt;/span&gt;.findAll();
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;@RestController API&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;@RestController&lt;/b&gt; is a convenience annotation for creating Restful controllers. It is a specialization of @Component and is autodetected through classpath scanning. It adds the @Controller and @ResponseBody annotations. It converts the response to JSON or XML. It does not work with the view technology, so the methods cannot return ModelAndView. It is typically used in combination with annotated handler methods based on the @RequestMapping annotation.&lt;/p&gt;&lt;br/&gt;
&lt;h2&gt;We will create one interface in controller package:&lt;/h2&gt;
&lt;div style=&quot;color: #009432; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ApplicationController&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; EnterpriseController&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; UserController&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an Entity ApplicationController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/controller/ApplicationController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyApplicationController(selectApplicationController)&quot; id=&quot;idBtnApplicationController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectApplicationController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.controller;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Application;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.service.ApplicationService;

&lt;span style=&quot;color: #808e9b;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;*&quot;&lt;/span&gt;, maxAge = 3600)
&lt;span style=&quot;color: #808e9b;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; ApplicationController {

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ApplicationService &lt;span style=&quot;color: blue;&quot;&gt;applicationService&lt;/span&gt;;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/createApplication/{id}&quot;&lt;/span&gt;)
 Application createApplication(&lt;span style=&quot;color: #808e9b;&quot;&gt;@RequestBody&lt;/span&gt; Application &lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;, &lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;applicationService&lt;/span&gt;.createApplicationForUser(&lt;span style=&quot;color: #82590f;&quot;&gt;application&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/createApplicationForEnterprise/{idApplication}/{id}&quot;&lt;/span&gt;)
 Application createApplicationForEnterprise(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;idApplication&lt;/span&gt;, &lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;applicationService&lt;/span&gt;.createApplicationForEnterprise(&lt;span style=&quot;color: #82590f;&quot;&gt;idApplication&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	   
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/findApplications&quot;&lt;/span&gt;)
   List&amp;lt;Application&gt; findApplications() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;applicationService&lt;/span&gt;.findApplications();
 }
	
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/findApplicationsForEnterprise/{id}&quot;&lt;/span&gt;)
 List&amp;lt;Application&gt; findApplicationsForEnterprise(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;applicationService&lt;/span&gt;.findApplicationsForEnterprise(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/findApplication/{id}&quot;&lt;/span&gt;)
 Application findApplication(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;applicationService&lt;/span&gt;.findApplication(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/deleteApplication/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteApplication(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;applicationService&lt;/span&gt;.deleteApplication(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity EnterpriseController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/conntroller/EnterpriseController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEnterpriseController(selectEnterpriseController)&quot; id=&quot;idBtnEnterpriseController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEnterpriseController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.DeleteMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.dao.EnterpriseDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.Enterprise;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.service.EnterpriseService;

&lt;span style=&quot;color: #808e9b;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;*&quot;&lt;/span&gt;, maxAge = 3600)
&lt;span style=&quot;color: #808e9b;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; EnterpriseController {

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; EnterpriseService &lt;span style=&quot;color: blue;&quot;&gt;enterpriseService&lt;/span&gt;;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; EnterpriseDao &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/createEnterprise&quot;&lt;/span&gt;)
 Enterprise createEnterprise(&lt;span style=&quot;color: #808e9b;&quot;&gt;@RequestBody&lt;/span&gt; Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseService&lt;/span&gt;.createEnterprise(&lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/findEnterprises&quot;&lt;/span&gt;)
 List&amp;lt;Enterprise&gt; findEnterprises() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseService&lt;/span&gt;.findEnterprises();
 }
   
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/findEnterprise/{id}&quot;&lt;/span&gt;)
 Enterprise findEnterprise(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseService&lt;/span&gt;.findEnterprise(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
    
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@DeleteMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/deleteEnterprise/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; deleteEnterprise(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;enterpriseService&lt;/span&gt;.deleteEnterprise(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/calculateJava/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculateJavaApps(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseService&lt;/span&gt;.calculateJava(&lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/calculateLow/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculateLowApps(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseService&lt;/span&gt;.calculateLow(&lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/calculateMedium/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculateLowAndJava(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseService&lt;/span&gt;.calculateMedium(&lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
 }
    
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/calculatePhp/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculatePhpApps(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseService&lt;/span&gt;.calculatePhp(&lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/calculateHigh/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculateHighApps(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseService&lt;/span&gt;.calculateHigh(&lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
 }
    
 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/calculateJavascript/{id}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; calculateHigtAndPhp(&lt;span style=&quot;color: #808e9b;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Enterprise &lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;enterpriseDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).get();
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;enterpriseService&lt;/span&gt;.calculateJavascript(&lt;span style=&quot;color: #82590f;&quot;&gt;enterprise&lt;/span&gt;);
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity UserController&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/enterprise/controller/UserController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyUserController(selectUserController)&quot; id=&quot;idBtnUserController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUserController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise.controller;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.modal.User;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.enterprise.service.UserService;

&lt;span style=&quot;color: #808e9b;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;*&quot;&lt;/span&gt;, maxAge = 3600)
&lt;span style=&quot;color: #808e9b;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; UserController {

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; UserService &lt;span style=&quot;color: blue;&quot;&gt;userService&lt;/span&gt;;

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/createUser&quot;&lt;/span&gt;)
 User createUser(@RequestBody User &lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userService&lt;/span&gt;.createUser(&lt;span style=&quot;color: #82590f;&quot;&gt;user&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #808e9b;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #3c40c6;&quot;&gt;&quot;/findUsers&quot;&lt;/span&gt;)
 List&amp;lt;User&gt; findUsers() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;userService&lt;/span&gt;.findUsers();
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;EnterpriseApplication&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;@BookStoreApplication&lt;/b&gt; and its use in a simple Spring Boot application. We use the @SpringBootApplication annotation in our Application or Main class to enable a host of features, e.g. Java-based Spring configuration, component scanning, and in particular for enabling Spring &lt;/p&gt;&lt;br /&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/note/EnterpriseApplication.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyEnterpriseApplication(selectEnterpriseApplication)&quot; id=&quot;idBtnEnterpriseApplication&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEnterpriseApplication&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.enterprise;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.boot.autoconfigure.SpringBootApplication;

&lt;span style=&quot;color: #8a8787;&quot;&gt;
@SpringBootApplication&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; EnterpriseApplication {

 &lt;b style=&quot;color: purple;&quot;&gt;public static void&lt;/b&gt; main(String[] &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;) {
   SpringApplication.run(EnterpriseApplication.&lt;b style=&quot;color: purple;&quot;&gt;class&lt;/b&gt;, &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;);		
   System.&lt;b style=&quot;color: blue;&quot;&gt;out&lt;/b&gt;.println(&lt;span style=&quot;color: blue;&quot;&gt;&quot;App started....&quot;&lt;/span&gt;);
  }
  
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Spring Boot example when building a @RestController API.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp; Spring Data JPA, and The Visitor pattern is great to separate the algorithm from the classes on which it operates. Besides that, it makes adding new operation more easily, just by providing a new implementation of the Visitor. as well, we are gooing to continue with Ionic project structure for building a front-end app to make HTTP requests and consume responses.&lt;/p&gt;&lt;br&gt;&lt;br&gt;


&lt;div style=&quot;background: #fff; border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring.html&quot;&gt;Building an application note with Spring boot and Ionic part 2&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: none 0% 0% repeat scroll rgb(0, 137, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/enterprise-spring&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download This Application My ennterprise From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;


&lt;style&gt;
pre:before {
   content: none;
}
pre {
background: #ddd;
line-height: 20px;
position: relative;
overflow: auto;
width: 100%;
border: 1px solid #d0c6c6;
}
  
code {
 padding: 0px 0px 0 20px;
 display: block; 
 color: #000; 
 font-family: monospace; 
 font-size: 16px;
 margin-top: -30px;
}
.h2-title {
background: #006266;
border-left: 10px solid #009432;
padding: 10px !important;
color: #fff !important;
  } 
    .h3-title {
   background: #c5efc7; 
   padding: 10px !important;
   margin-bottom: -16px !important;
  }
 pre div::selection,
 b::selection,
 code::selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
   padding: 0px 16px;
}
pre div::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
  padding: 0px 16px;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
&lt;/style&gt;

&lt;script data-ad-client=&quot;ca-pub-7401879888732563&quot; async src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
 
&lt;script&gt;
  function copyPom(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPom&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyPro(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPro&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyApplication(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnApplication&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEnterprise(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEnterprise&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUser(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUser&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCriticality(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCriticality&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLanguage(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLanguage&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyVisitable(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnVisitable&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyVisitor(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnVisitor&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCalculateHigh(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCalculateHigh&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCalculateJava(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCalculateJava&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCalculateJavascript(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCalculateJavascript&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCalculateLow(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCalculateLow&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCalculateMedium(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCalculateMedium&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCalculatePhp(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCalculatePhp&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyApplicationDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnApplicationDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEnterpriseDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEnterpriseDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUserDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUserDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyApplicationService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnApplicationService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEnterpriseService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEnterpriseService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUserService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUserService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyApplicationServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnApplicationServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEnterpriseServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEnterpriseServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUserServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUserServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyApplicationController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnApplicationController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEnterpriseController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEnterpriseController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUserController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUserController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEnterpriseApplication(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEnterpriseApplication&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/5065422396706963124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-enterprise-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/5065422396706963124'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/5065422396706963124'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-enterprise-with.html' title='Building an application enterprise with Spring boot &amp; Ionic Part 1'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/wN6u-eM9ULc/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-7190510714232911742</id><published>2022-01-18T03:41:00.009-08:00</published><updated>2022-08-26T09:21:09.994-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ionic"/><title type='text'>Building an application bank with Spring boot and Ionic part 2</title><content type='html'>&lt;h1 style=&quot;background: rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Ionic&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/05/7a63.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;452&quot; data-original-width=&quot;800&quot; src=&quot;https://zupimages.net/up/21/05/7a63.png&quot; width=&quot;800&quot; style=&quot;border: 1px solid;&quot;/&gt;&lt;/a&gt;&lt;/div&gt;

&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;B_RCmmDa4L0&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/B_RCmmDa4L0&quot;&gt;&lt;/iframe&gt;

&lt;h3&gt;In this part 2 of bank application we will buid an application with Ionic framewotk&lt;/h3&gt;
&lt;p&gt;In this tutorials we will build an application bank to create Standing Account and Savings Account the user can do operations deposit, debit or transfer from account to another the admin can add the accounts with balance, tax or loan for any account.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;Ionic apps are created and developed primarily through the Ionic command line utility (the “CLI”), and use Cordova to build/deploy as a native app. This means we need to install a few utilities to get developing.&lt;/p&gt;

&lt;h2&gt;Installing Ionic&lt;/h2&gt;
&lt;p&gt;Ionic apps are created and developed primarily through the Ionic command-line utility. The Ionic CLI is the preferred method of installation, as it offers a wide range of dev tools and help options along the way. It is also the main tool through which to run the app and connect it to other services, such as Ionic Appflow.&lt;/p&gt;

&lt;h4 style=&quot;color: #c0392b&quot;&gt;Before proceeding, make sure your computer has Node.js installed. &lt;/h4&gt;
&lt;p&gt;Install the Ionic CLI with npm:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;npm install -g @ionic/cli&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Starting an App&lt;/h2&gt;
&lt;p&gt;Starting a new Ionic app is incredibly simple. From the command line, run the ionic start command and the CLI will handle the rest.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Here, myApp is the name of the project, blank is the starter template, and the project type is angular.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ionic start bank blank&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 style=&quot;color: #fb4834;&quot;&gt;Project structure&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://i.ibb.co/vhM632w/Screenshot-2021-02-01-at-10-19-37.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;519&quot; src=&quot;https://i.ibb.co/vhM632w/Screenshot-2021-02-01-at-10-19-37.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;p&gt;Let&#39;s go through the files and folders of the app. &lt;/p&gt;

&lt;h2&gt;/ src &lt;/h2&gt;
&lt;p&gt;Inside of the /src directory we find our raw, uncompiled code. This is where most of the work for your Ionic app will take place.&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;/ app &lt;/h2&gt;
&lt;p&gt;The App folder is the largest folder because it contains all the code of our ionic app. It has all the components, modules, pages, services and styles you will use to build your app.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;This is the core of the project. Let’s have a look at the structure of this folder so you get an idea where to find things and where to add your own modules to adapt this project to your particular needs.&lt;/p&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Modals&lt;/h2&gt;
&lt;p&gt;Create a folder modal in side it add a class &lt;strong&gt;Model.ts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;src/app/modal/Modal.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyModals(selectModals)&quot; id=&quot;idBtnModals&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectModals&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Account&lt;/span&gt; {
   &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;string&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;createDate&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;balance&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;;
}

&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Client&lt;/span&gt; {
   &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;username&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;string&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;password&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;string&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;string&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;email&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;string&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;admin&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;boolean&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;accounts&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Account&lt;/span&gt;[];
}

&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Credit&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt; {}

&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt; {
   &lt;span style=&quot;color: #2980b9&quot;&gt;numberOperation&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;operationDate&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;amount&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;;
   &lt;span style=&quot;color: #2980b9&quot;&gt;typeOperation&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;string&lt;/span&gt;;
}

&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;SavingsAccount&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Account&lt;/span&gt; {
   &lt;span style=&quot;color: #2980b9&quot;&gt;tax&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;;
}

&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;StandingAccount&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Account&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;loan&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;;
}

&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Withdraw&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;extends&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt; {}

&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;AmmountResponse&lt;/span&gt; {
   &lt;span style=&quot;color: #2980b9&quot;&gt;amount&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;;
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;title&quot;&gt;Angular Services&lt;/h2&gt;
&lt;p&gt;Angular services are singleton objects that get instantiated only once during the lifetime of an application. They contain methods that maintain data throughout the life of an application, i.e. data does not get refreshed and is available all the time. The main objective of a service is to organize and share business logic, models, or data and functions with different components of an Angular application.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;An example of when to use services would be to transfer data from one controller to another custom service.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;Why Should We Use Services in Angular?
The separation of concerns is the main reason why Angular services came into existence. An Angular service is a stateless object and provides some very useful functions. These functions can be invoked from any component of Angular, like Controllers, Directives, etc. This helps in dividing the web application into small, different logical units which can be reused.&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;Create BankService in the service package &lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;-&gt; BankService&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/service/bank-service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyBookService(selectBookService)&quot; id=&quot;idBtnBookService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectBookService&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Injectable &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Observable &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;AmmountResponse, Client, Operation, SavingsAccount, StandingAccount &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt;;


@&lt;span style=&quot;color: #c0392b;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;BankService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #d35400;&quot;&gt;checkingAccount&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/checkingAccount/&lt;span style=&quot;color: #2980b9&quot;&gt;${code}&lt;/span&gt;`&lt;/span&gt;);
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;depositOperation&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/depositOperation/&lt;span style=&quot;color: #2980b9&quot;&gt;${code}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;);
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;saveClient&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Client&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/saveClient`&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;);
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;addStandingAccount&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;standingAcount&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;StandingAccount&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/addStandingAccount/&lt;span style=&quot;color: #2980b9&quot;&gt;${code}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;standingAcount&lt;/span&gt;);
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;addSavingsAccount&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;SavingsAccount&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/addSavingsAccount/&lt;span style=&quot;color: #2980b9&quot;&gt;${code}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;);
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;debitOperation&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;ammountResponse&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;AmmountResponse&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/debitOperation/&lt;span style=&quot;color: #2980b9&quot;&gt;${code}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;ammountResponse&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;findWithdraws&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findWithdraws/&lt;span style=&quot;color: #2980b9&quot;&gt;${code}&lt;/span&gt;`&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;findCredits&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findCredits/&lt;span style=&quot;color: #2980b9&quot;&gt;${code}&lt;/span&gt;`&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;transfer&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;code1&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;code2&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/transfer/&lt;span style=&quot;color: #2980b9&quot;&gt;${code1}/${code2}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;findClients&lt;/span&gt;(): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findClients`&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;findClient&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findClient/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;updateClient&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Client&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;put&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/updateClient/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;);
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;findStandingAccountAccounts&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findStandingAccountAccounts/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;findSavingsAccountAccounts&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findSavingsAccountAccounts/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;findAccountById&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findAccountById/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;findAccountsForClient&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/findAccountsForClient/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;editStandingAccount&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;StandingAccount&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/editStandingAccount/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;editSavingsAccount&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;SavingsAccount&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;): Observable&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;`http://localhost:8080/api/editSavingsAccount/&lt;span style=&quot;color: #2980b9&quot;&gt;${id}&lt;/span&gt;`&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;); 
  }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;title&quot;&gt;Create pages&lt;/h2&gt;
&lt;p&gt;Now we&#39;ll continue with the project by adding pages which are the basic buildings of an Ionic app. So let&#39;s get started. You can create pages either manually or generating them using the Ionic CLI v5 which is the recommended method. In this guide we&#39;ll look first at how to create a page generate it with the Ionic CLI, then how to add it to the project. &lt;/p&gt;
&lt;b class=&quot;sub-title&quot;&gt;-&gt; login&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page login&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- login.page.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- login.page.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/login.page.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyLoginTs(selectLoginTs)&quot; id=&quot;idBtnLoginTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLoginTs&quot;&gt;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;Router&lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;Client &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2c3e50&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-login&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2c3e50&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./login.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2c3e50&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./login.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; LoginPage &lt;span style=&quot;color: #c0392b;&quot;&gt;implements&lt;/span&gt; OnInit {
  &lt;span style=&quot;color: #2c3e50&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;Client&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;Client&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;bankService&lt;/span&gt;: BankService, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;router&lt;/span&gt;: Router) { }

  &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() { }

   &lt;span style=&quot;color: #d35400;&quot;&gt;addClient&lt;/span&gt;() {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;saveClient&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt;) =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt; = &lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2c3e50&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;navigate&lt;/span&gt;([&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;/find-clients/&quot;&lt;/span&gt;, &lt;span style=&quot;color: #2c3e50&quot;&gt;client.id&lt;/span&gt;]);
    });
  }
  
}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/login.page.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyLoginHtml(selectLoginHtml)&quot; id=&quot;idBtnLoginHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLoginHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;tertiary&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;person-circle-outline&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Login to your bank&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: 40px auto;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-avatar&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;https://www.kindpng.com/picc/m/78-785975_icon-profile-bio-avatar-person-symbol-chat-icon.png&quot;&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-avatar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;progressBar&lt;/span&gt;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;Please login to access your account&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;client&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;ngSubmit&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;addClient&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;novalidate&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;username&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter username&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;username&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;client.username&lt;/span&gt;&quot;
            &lt;span style=&quot;color: #2c3e50&quot;&gt;#username&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;password&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;password&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter password&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;password&quot;&lt;/span&gt;
            [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;client.password&lt;/span&gt;&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#password&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;block&quot;&lt;/span&gt;
          [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;username.invalid&lt;/span&gt; || &lt;span style=&quot;color: #2c3e50&quot;&gt;password.invalid&lt;/span&gt;&quot;&gt;Login&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;

   &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page update-client&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- update-client.page.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- update-client.page.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/update-client.page.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyUpdateClientTs(selectUpdateClientTs)&quot; id=&quot;idBtnUpdateClientTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUpdateClientTs&quot;&gt;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;Client &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../modal/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2c3e50&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-update-client&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2c3e50&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./login.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2c3e50&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./update-client.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; LoginPage &lt;span style=&quot;color: #c0392b;&quot;&gt;implements&lt;/span&gt; OnInit {
  &lt;span style=&quot;color: #2c3e50&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;Client&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;Client&lt;/span&gt;;
  &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;bankService&lt;/span&gt;: BankService) { }

  &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() { 
       &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2c3e50&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findClient&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.id).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt; =&gt; {
       &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt; = &lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt;;
    });
  }

   &lt;span style=&quot;color: #d35400;&quot;&gt;updateClient&lt;/span&gt;() {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;updateClient&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt;) =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt; = &lt;span style=&quot;color: #2c3e50&quot;&gt;client&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;();
    });
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reload&lt;/span&gt;();
  }
  
}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/update-client.page.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyUpdateClientHtml(selectUpdateClientHtml)&quot; id=&quot;idBtnUpdateClientHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUpdateClientHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;tertiary&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;person-circle-outline&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Update your account&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: 40px auto;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-avatar&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;https://www.kindpng.com/picc/m/78-785975_icon-profile-bio-avatar-person-symbol-chat-icon.png&quot;&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-avatar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;progressBar&lt;/span&gt;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;

    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;client&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;ngSubmit&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;updateClient&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;novalidate&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;username&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter username&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;username&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;client.username&lt;/span&gt;&quot;
            &lt;span style=&quot;color: #2c3e50&quot;&gt;#username&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;password&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;password&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter password&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;password&quot;&lt;/span&gt;
            [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;client.password&lt;/span&gt;&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#password&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;name&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter name&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;name&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;client.name&lt;/span&gt;&quot;
            &lt;span style=&quot;color: #2c3e50&quot;&gt;#name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;email&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter email&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;email&quot;&lt;/span&gt;
            [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;client.email&lt;/span&gt;&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#email&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;block&quot;&lt;/span&gt;
          [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;username.invalid&lt;/span&gt; || &lt;span style=&quot;color: #2c3e50&quot;&gt;password.invalid&lt;/span&gt; || &lt;span style=&quot;color: #2c3e50&quot;&gt;name.invalid&lt;/span&gt; || &lt;span style=&quot;color: #2c3e50&quot;&gt;email.invalid&lt;/span&gt;&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;

   &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page find-clients&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- app-find-clients.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- app-find-clients.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/app-find-clients.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindClientsTs(selectFindClientsTs)&quot; id=&quot;idBtnFindClientsTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindClientsTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ActivatedRoute, Router &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Client &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ModalController &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@ionic/angular&#39;&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;AddSavingsAccountPage &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-savings-account/add-savings-account.page&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;AddStandingAccountPage &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../add-standing-account/add-standing-account.page&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;UpdateClientPage &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../update-client/update-client.page&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-find-clients&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./app-find-clients.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./app-find-clients.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;FindClientsPage&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;clients&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Client&lt;/span&gt;[];
  &lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Client&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Client&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;accountsAdded&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;0&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;any&lt;/span&gt;;

  &lt;span style=&quot;color: #2980b9&quot;&gt;techs&lt;/span&gt; = [
    {
      &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;title&#39;&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Contacts&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;icon&#39;&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;call-outline&#39;&lt;/span&gt;
    },
    {
      &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;title&#39;&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Products&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;icon&#39;&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;card-outline&#39;&lt;/span&gt;
    },
    {
      &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;title&#39;&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Warning&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;icon&#39;&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;warning&#39;&lt;/span&gt;
    },
    {
      &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;title&#39;&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;Help&#39;&lt;/span&gt;,
      &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;icon&#39;&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;help-circle&#39;&lt;/span&gt;
    }
  ];

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;route&lt;/span&gt;: ActivatedRoute, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;: BankService,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;: ModalController, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;: Router) { }

  &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;route.snapshot.params.id&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findClient&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt; =&gt; {
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;;
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;accountsAdded&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;client.accounts.length&lt;/span&gt;;
   });
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findClients&lt;/span&gt;().&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;clients&lt;/span&gt; =&gt; {
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;clients&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;clients&lt;/span&gt;;
   });
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;logout&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;navigateByUrl&lt;/span&gt;(&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;/login&quot;&lt;/span&gt;)
  }
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;updateClient&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;create&lt;/span&gt;({
      &lt;span style=&quot;color: #2980b9&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;UpdateClientPage&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;swipeToClose&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;componentProps&lt;/span&gt;: {&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}
    });
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;present&lt;/span&gt;();
  }
  
    &lt;span style=&quot;color: #3498db;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;addStandingAccount&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;create&lt;/span&gt;({
      &lt;span style=&quot;color: #2980b9&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;AddStandingAccountPage&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;swipeToClose&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;componentProps&lt;/span&gt;: {&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}
    });
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;present&lt;/span&gt;();
  }
  
    &lt;span style=&quot;color: #3498db;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;addSavingsAccount&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;create&lt;/span&gt;({
      &lt;span style=&quot;color: #2980b9&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #d35400;&quot;&gt;AddSavingsAccountPage&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;swipeToClose&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;componentProps&lt;/span&gt;: {&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}
    });
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;present&lt;/span&gt;();
  }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/app-find-clients.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindClientsHtml(selectFindClientsHtml)&quot; id=&quot;idBtnFindClientsHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindClientsHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;updateClient&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;client.id&lt;/span&gt;)&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;client.name==null || client.email==null&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;person-add-outline&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Welcome {{client.username}} &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;logout&lt;/span&gt;()&quot;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;outline&quot;&lt;/span&gt;&gt;
        Logout
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;end&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;add-outline&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;accountsAdded==0&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;alert-outline&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;You have to create your account &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;tertiary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;accountsAdded &gt;= 1&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;cursor: pointer&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;checkingAccount&lt;/span&gt;(client.id)&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;cash-outline&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Checking your account&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;fullscreen&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let tech of techs&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;light&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;{{tech.icon}}&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h3&lt;/span&gt;&gt;{{tech.title}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h3&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&gt;&amp;lt;br&lt;/span&gt;/&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;client.admin&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;Clents&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;Add account to a client&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;

    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let client of clients&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h3&lt;/span&gt;&gt;{{client.name}} - {{client.username}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h3&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;end&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;create-outline&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;cursor: pointer&quot;&lt;/span&gt;
            [&lt;span style=&quot;color: #2980b9&quot;&gt;routerLink&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;[&#39;/find-account/&#39;, client.id]&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;small&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;addStandingAccount&lt;/span&gt;(client.id)&quot;&gt;Add standing account
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;small&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;addSavingsAccount&lt;/span&gt;(client.id)&quot;&lt;/span&gt;&gt;Add savings account
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page add-savings-account&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- add-savings-account.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- add-savings-account.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/add-savings-account.ts&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyaddSavingsAccountTs(selectaddSavingsAccountTs)&quot; id=&quot;idBtnaddSavingsAccountTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectaddSavingsAccountTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Router &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Client, SavingsAccount &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-savings-account&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-savings-account.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-savings-account.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;AddSavingsAccountPage&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #c0392b;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccountExist&lt;/span&gt; = &lt;span style=&quot;color: #c0392b;&quot;&gt;0&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;SavingsAccount&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;SavingsAccount&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Client&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Client&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;: BankService) { }
  
   &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findClient&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findSavingsAccountAccounts&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccountExist&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;.length;
      })
    });
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;addStandingAccount&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;addSavingsAccount&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.id).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;();
    })
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reload&lt;/span&gt;();
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-savings-account.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddSavingsAccountHtml(selectAddSavingsAccountHtml)&quot; id=&quot;idBtnAddSavingsAccountHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddSavingsAccountHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;()&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;progressBar&lt;/span&gt;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;Please a savings account for {{client.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;client&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;ngSubmit&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;addStandingAccount&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;novalidate&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;balance&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter balance&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;balance&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;savingsAccount.balance&lt;/span&gt;&quot;
            &lt;span style=&quot;color: #2c3e50&quot;&gt;#balance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;tax&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter tax&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;tax&quot;&lt;/span&gt;
            [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;savingsAccount.tax&lt;/span&gt;&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#tax&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;block&quot;&lt;/span&gt;
          [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;balance.invalid&lt;/span&gt; || &lt;span style=&quot;color: #2c3e50&quot;&gt;tax.invalid&lt;/span&gt;&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;

   &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page add-standing-account&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- add-standing-account.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- add-standing-account.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/add-standing-account.ts&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddStandigAccountTs(selectAddStandigAccountTs)&quot; id=&quot;idBtnAddStandigAccountTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddStandigAccountTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Router &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Client, StandingAccount &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-add-standing-account&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-standing-account.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./add-standing-account.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;AddStandingAccountPage&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #c0392b;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccountExist&lt;/span&gt; = &lt;span style=&quot;color: #c0392b;&quot;&gt;0&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;StandingAccount&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;StandingAccount&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Client&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Client&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;: BankService) { }
  
   &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findClient&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findStandingAccountAccounts&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;client&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccountExist&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;.length;
      })
    });
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt; addStandingAccount&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;addStandingAccount&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.id).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;();
    })
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reload&lt;/span&gt;();
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-savings-account.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddStandigAccountHtml(selectAddStandigAccountHtml)&quot; id=&quot;idBtnAddStandigAccountHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddStandigAccountHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;()&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;progressBar&lt;/span&gt;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;Please a astandig account for {{client.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;client&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;ngSubmit&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt; addStandingAccount&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;novalidate&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;balance&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter balance&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;balance&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;standingAccount.balance&lt;/span&gt;&quot;
            &lt;span style=&quot;color: #2c3e50&quot;&gt;#balance&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;loan&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter loan&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;loan&quot;&lt;/span&gt;
            [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;standingAccount.loan&lt;/span&gt;&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#loan&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;block&quot;&lt;/span&gt;
          [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;balance.invalid&lt;/span&gt; || &lt;span style=&quot;color: #2c3e50&quot;&gt;loan.invalid&lt;/span&gt;&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;

   &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page checking-account&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- checking-account.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- checking-account.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/checking-account.ts&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyCheckingAccountTs(selectCheckingAccountTs)&quot; id=&quot;idBtnCheckingAccountTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCheckingAccountTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Router, ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Account, SavingsAccount, StandingAccount&lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ModalController &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@ionic/angular&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;DebitPage &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../debit/debit.page&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;DepositPage &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../deposit/deposit.page&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;OperationPage &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../operation/operation.page&quot;&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;TransferPage &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../transfer/transfer.page&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-checking-account&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./checking-account.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./checking-account.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;AddStandingAccountPage&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccounts&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;SavingsAccount&lt;/span&gt;[];
  &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccounts&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;StandingAccount&lt;/span&gt;[];
  &lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;account&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Account&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Account&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;SavingsAccount&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;SavingsAccount&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
   
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;: BankService, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;route&lt;/span&gt;: ActivatedRoute, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;: Router, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;: ModalController) { }
  
   &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;route.snapshot.params.id&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findStandingAccountAccounts&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccounts&lt;/span&gt;) =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccounts&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccounts&lt;/span&gt;;
      });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findSavingsAccountAccounts&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccounts&lt;/span&gt;) =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccounts&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccounts&lt;/span&gt;;
      });
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;navigate&lt;/span&gt;([&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;/find-clients/&quot;&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;]);
  }
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;doOperation&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;create&lt;/span&gt;({
      &lt;span style=&quot;color: #2980b9&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;OperationPage&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;swipeToClose&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;componentProps&lt;/span&gt;: { &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; },
    });
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;present&lt;/span&gt;();
  }
  &lt;span style=&quot;color: #3498db;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;depositOperation&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;create&lt;/span&gt;({
      &lt;span style=&quot;color: #2980b9&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;DepositPage&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;swipeToClose&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;componentProps&lt;/span&gt;: { &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; },
    });
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;present&lt;/span&gt;();
  }
  &lt;span style=&quot;color: #3498db;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;debitOperation&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;create&lt;/span&gt;({
      &lt;span style=&quot;color: #2980b9&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;DebitPage&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;swipeToClose&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;componentProps&lt;/span&gt;: { &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; },
    });
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;present&lt;/span&gt;();
  }
    &lt;span style=&quot;color: #3498db;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;transferCode1&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;code1&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;create&lt;/span&gt;({
      &lt;span style=&quot;color: #2980b9&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;TransferPage&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;swipeToClose&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;componentProps&lt;/span&gt;: {&lt;span style=&quot;color: #2980b9&quot;&gt;code1&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; },
    });
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;present&lt;/span&gt;();
  }
    &lt;span style=&quot;color: #3498db;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;transferCode2&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;code2&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;create&lt;/span&gt;({
      &lt;span style=&quot;color: #2980b9&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;TransferPage,&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;swipeToClose&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;componentProps&lt;/span&gt;: {&lt;span style=&quot;color: #2980b9&quot;&gt;code2&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; },
    });
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;present&lt;/span&gt;();
  }
 &lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;navigate&lt;/span&gt;([&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;/login/&quot;&lt;/span&gt;]);
  }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/add-savings-account.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyCheckingAccountHtml(selectCheckingAccountHtml)&quot; id=&quot;idBtnCheckingAccountHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCheckingAccountHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;()&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;logout&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;light&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;outline&quot;&lt;/span&gt;&gt;
      Logout
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;end&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;add-outline&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;stadingAccounts!=null&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;light&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;Stading Account&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
    
     &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let stading of stadingAccounts&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: auto 100px; text-align: center; margin-bottom: 20px;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 230px; background-color: #9b59b6; border-radius: 5%; color: #ecf0f1;&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;font-size: 50px; margin-top: 20px;&quot;&lt;/span&gt;&gt;
              {{stading.balance}},00
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt; /&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;dark&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text-transform: uppercase;&quot;&lt;/span&gt;&gt;No: {{stading.code}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;{{stading.createDate | date}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;small&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;outline&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;doOperation&lt;/span&gt;(stading.id)&quot;&lt;/span&gt;&gt;Operations
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-row&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;full&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;success&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;depositOperation&lt;/span&gt;(stading.id)&quot;&lt;/span&gt;&gt;Deposit&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;full&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&quot;&lt;span style=&quot;color: #c49079;&quot;&gt;danger&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;stading.balance==0&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;debitOperation&lt;/span&gt;(stading.id)&quot;&lt;/span&gt;&gt;Debit&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;full&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;stading.balance==0&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;transferCode1&lt;/span&gt;(stading.id, id)&quot;&lt;/span&gt;&gt;Transfer&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-row&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;savingsAccounts!=null&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;light&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;Savings Account&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
    
     &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let stading of stadingAccounts&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin: auto 100px; text-align: center; margin-bottom: 20px;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;width: 230px; background-color: #9b59b6; border-radius: 5%; color: #ecf0f1;&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;font-size: 50px; margin-top: 20px;&quot;&lt;/span&gt;&gt;
              {{savingsAccount.balance}},00
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt; /&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;dark&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text-transform: uppercase;&quot;&lt;/span&gt;&gt;No: {{savingsAccount.code}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;{{savingsAccount.createDate | date}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;small&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;outline&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;doOperation&lt;/span&gt;(savingsAccount.id)&quot;&lt;/span&gt;&gt;Operations
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-row&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;full&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;success&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;depositOperation&lt;/span&gt;(savingsAccount.id)&quot;&lt;/span&gt;&gt;Deposit&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;full&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&quot;&lt;span style=&quot;color: #c49079;&quot;&gt;danger&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;savingsAccount.balance==0&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;debitOperation&lt;/span&gt;(savingsAccount.id)&quot;&lt;/span&gt;&gt;Debit&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;full&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;savingsAccount.balance==0&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;transferCode2&lt;/span&gt;(savingsAccount.id, id)&quot;&lt;/span&gt;&gt;Transfer&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-col&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-row&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
  
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page debit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- debit.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- debit.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/debit.ts&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDebitTs(selectDebitTs)&quot; id=&quot;idBtnDebitTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDebitTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ModalController  &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@ionic/angular&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt; Operation, Account &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-debit&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./debit.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./debit.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;AddStandingAccountPage&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #c0392b;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;account&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Account&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Account&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;: BankService, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;: ModalController) { }
  
   &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findAccountById&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;account&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;account&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;account&lt;/span&gt;;
    });
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;debitOperation&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;debitOperation&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.id).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;;
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reload&lt;/span&gt;();
    })
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;dismiss&lt;/span&gt;();
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/debit.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDebitHtml(selectDebitHtml)&quot; id=&quot;idBtnDebitHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDebitHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;()&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;progressBar&lt;/span&gt;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;Add debit for &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text-transform: uppercase; color:#c0392b&quot;&lt;/span&gt;&gt;{{account.code}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;client&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;ngSubmit&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt; debitOperation&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;novalidate&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;amount&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter amount&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;amount&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;operation.amount&lt;/span&gt;&quot;
            &lt;span style=&quot;color: #2c3e50&quot;&gt;#amount&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;block&quot;&lt;/span&gt;
          [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;amount.invalid&lt;/span&gt;&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;

   &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page deposit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- deposit.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- deposit.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/deposit.ts&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDepositTs(selectDepositTs)&quot; id=&quot;idBtnDepositTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDepositTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ModalController  &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@ionic/angular&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt; Operation, Account &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-deposit&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./deposit.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./deposit.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;AddStandingAccountPage&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #c0392b;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;account&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Account&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Account&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;: BankService, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;: ModalController) { }
  
   &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findAccountById&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;account&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;account&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;account&lt;/span&gt;;
    });
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;depositOperation&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;depositOperation&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.id).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;;
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reload&lt;/span&gt;();
    })
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;dismiss&lt;/span&gt;();
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/deposit.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDepositHtml(selectDepositHtml)&quot; id=&quot;idBtnDepositHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDepositHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;()&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;progressBar&lt;/span&gt;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;Add deposit for &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text-transform: uppercase; color:#c0392b&quot;&lt;/span&gt;&gt;{{account.code}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-subtitle&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;client&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;ngSubmit&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;depositOperation&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;novalidate&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;amount&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter amount&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;amount&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;operation.amount&lt;/span&gt;&quot;
            &lt;span style=&quot;color: #2c3e50&quot;&gt;#amount&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;block&quot;&lt;/span&gt;
          [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;amount.invalid&lt;/span&gt;&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;

   &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page transfer&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- transfer.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- transfer.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/transfer.ts&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyTransferTs(selectTransferTs)&quot; id=&quot;idBtnTransferTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectTransferTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ModalController  &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@ionic/angular&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt; Operation, Account &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-transfer&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./transfer.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./transfer.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;AddStandingAccountPage&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccountCode&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt; = {};
  &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccountCode&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt; = {};  
  &lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;accounts&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Account&lt;/span&gt;[];  
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;titleFrom&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;titleTo&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;code1&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;code2&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;showTransferCode1&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;showTransferCode2&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;showMessageError&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;: BankService, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;: ModalController) { }
  
   &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code1&lt;/span&gt;==&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findAccountsForClient&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;accounts&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;accounts&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;accounts&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccountCode&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;accounts&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;find&lt;/span&gt;(x =&gt; x.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; != &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code2&lt;/span&gt;);
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code1&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccountCode&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;titleTo&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccountCode&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findAccountById&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code2&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccountCode&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccountCode&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccountCode&lt;/span&gt;;
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;titleFrom&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccountCode&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;;
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showTransferCode2&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
        })
      });
    }
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code2&lt;/span&gt;==&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findAccountsForClient&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;accounts&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;accounts&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;accounts&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccountCode&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;accounts&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;find&lt;/span&gt;(x =&gt; x.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; != &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code1&lt;/span&gt;);
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code2&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccountCode&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;titleTo&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccountCode&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findAccountById&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code1&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccountCode&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccountCode&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccountCode&lt;/span&gt;;
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;titleFrom&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccountCode&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code&lt;/span&gt;;
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showTransferCode1&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
        } )
      });
    }
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;dismiss&lt;/span&gt;();
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;transferCode1&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;transfer&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code2&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code1&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showMessageError&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reload&lt;/span&gt;();
    }), 
    console.&lt;span style=&quot;color: #d35400;&quot;&gt;error&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showMessageError&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;);    
   }
   
  &lt;span style=&quot;color: #d35400;&quot;&gt;transferCode2&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;transfer&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code1&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;code2&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;operation&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showMessageError&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reload&lt;/span&gt;();
    }), 
    console.&lt;span style=&quot;color: #d35400;&quot;&gt;error&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showMessageError&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;);    
   }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/transfer.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyTransferHtml(selectTransferHtml)&quot; id=&quot;idBtnTransferHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectTransferHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;()&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;Transfer&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;From &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text-transform: uppercase; color:#c0392b&quot;&lt;/span&gt;&gt;{{titleFrom}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt; Account To  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;text-transform: uppercase; color:#16a085&quot;&lt;/span&gt;&gt;{{titleTo}} &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;Account &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
  
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;progressBar&lt;/span&gt;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;
    
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;showMessageError&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;margin-left: 20px;&quot;&lt;/span&gt;&gt;Insufficient balance&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h1&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-text&lt;/span&gt;&gt;
    
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;client&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;ngSubmit&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;depositOperation&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;novalidate&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;amount&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter amount&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;amount&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2c3e50&quot;&gt;ngModel&lt;/span&gt;)]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;operation.amount&lt;/span&gt;&quot;
            &lt;span style=&quot;color: #2c3e50&quot;&gt;#amount&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;required&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;block&quot;&lt;/span&gt;
          [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;amount.invalid&lt;/span&gt;&quot; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;transferCode1&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;showTransferCode1&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
          
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;block&quot;&lt;/span&gt;
          [&lt;span style=&quot;color: #2c3e50&quot;&gt;disabled&lt;/span&gt;]=&quot;&lt;span style=&quot;color: #2c3e50&quot;&gt;amount.invalid&lt;/span&gt;&quot; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;transferCode2&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;showTransferCode2&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
          
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;

   &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
  
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          {{standingAccountCode.code}} - &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;{{standingAccountCode.balance}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
     &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          {{savingsAccountCode.code}} - &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;{{savingsAccountCode.balance}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
     &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
  
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page operation&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- operation.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- operation.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/operation.ts&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyOperationTs(selectOperationTs)&quot; id=&quot;idBtnOperationTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectOperationTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ModalController  &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@ionic/angular&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt; Operation &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-operation&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./operation.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./operation.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OperationPage&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;operations&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Operation&lt;/span&gt;[];  
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;: BankService, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;: ModalController) { }
  
   &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;checkingAccount&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;operations&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;operations&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;operations&lt;/span&gt;;
    })
    }

  &lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;dismiss&lt;/span&gt;();
  }
  
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/operation.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyOperationHtml(selectOperationHtml)&quot; id=&quot;idBtnOperationHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectOperationHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;()&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;Operations&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;

    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let o of operations&quot;&lt;/span&gt;&gt;
         &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          {{o.amount}}$ - {{o.typeOperation}} - {{o.operationDate|date}}
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
     &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;

  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
 &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page find-account&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- find-account.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- find-account.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/find-account.ts&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindAccountTs(selectFindAccountTs)&quot; id=&quot;idBtnFindAccountTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindAccountTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ModalController  &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@ionic/angular&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt; SavingsAccount, StandingAccount  &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ActivatedRoute, Router  &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;EditAccountPage &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../edit-account/edit-account.page&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-find-account&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-account.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./find-account.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OperationPage&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccounts&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;SavingsAccount&lt;/span&gt;[];  
  &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccounts&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;StandingAccount&lt;/span&gt;[];   
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;: BankService, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;: ModalController, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt;  &lt;span style=&quot;color: #2980b9&quot;&gt;route&lt;/span&gt;: ActivatedRoute, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt;  &lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;: Router) { }
  
   &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() {
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;route.snapshot.params.id&lt;/span&gt;;
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.bankService.&lt;span style=&quot;color: #d35400;&quot;&gt;findSavingsAccountAccounts&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccounts&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccounts&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccounts&lt;/span&gt;;
    })
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.bankService.&lt;span style=&quot;color: #d35400;&quot;&gt;findStandingAccountAccounts&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccounts&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccounts&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccounts&lt;/span&gt;;
    })
    }

  &lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;navigate&lt;/span&gt;([&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;/find-clients/&quot;&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;]);
  }
 &lt;span style=&quot;color: #3498db;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;editTax&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idTax&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;create&lt;/span&gt;({
      &lt;span style=&quot;color: #2980b9&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;EditAccountPage&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;swipeToClose&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;componentProps&lt;/span&gt;: {&lt;span style=&quot;color: #2980b9&quot;&gt;idTax&lt;/span&gt;},
    });
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;present&lt;/span&gt;();
  }
 &lt;span style=&quot;color: #3498db;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;editLoan&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idLoan&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;create&lt;/span&gt;({
      &lt;span style=&quot;color: #2980b9&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;EditAccountPage&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;swipeToClose&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;,
      &lt;span style=&quot;color: #2980b9&quot;&gt;componentProps&lt;/span&gt;: {&lt;span style=&quot;color: #2980b9&quot;&gt;idLoan&lt;/span&gt;},
    });
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modal&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;present&lt;/span&gt;();
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/find-account.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyFindAccountHtml(selectFindAccountHtml)&quot; id=&quot;idBtnFindAccountHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectFindAccountHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;()&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let savings of savingsAccount&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt;&gt;
         &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          {{savings.code}} - &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;{{savings.balance}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
     &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;light&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;editTax&lt;/span&gt;(&lt;span style=&quot;color: #2c3e50&quot;&gt;savings.id&lt;/span&gt;)&quot;&gt;
          Update tax ({{savings.tax}})
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
     &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
 &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
 
   &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;let standig of standingAccount&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt;&gt;
         &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
          {{standig.code}} - &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;{{standig.balance}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-label&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
     &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;button color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;light&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2c3e50&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;editLoan&lt;/span&gt;(&lt;span style=&quot;color: #2c3e50&quot;&gt;standig.id&lt;/span&gt;)&quot;&gt;
          Update loan ({{standig.loan}})
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
     &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-list&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
 &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
 
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;p&gt;Go ahead and open your terminal or command prompt and follow the instructions: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate page edit-account&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;We will use these components&lt;/h2&gt;
&lt;b class=&quot;sub-title&quot;&gt;- edit-account.ts&lt;/b&gt;&lt;br&gt;
&lt;b class=&quot;sub-title&quot;&gt;- edit-account.html&lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/edit-account.ts&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyEditAccountTs(selectEditAccountTs)&quot; id=&quot;idBtnEditAccountTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEditAccountTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ModalController  &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;@ionic/angular&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt; SavingsAccount, StandingAccount  &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;BankService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;../service/bank.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;app-edit-account&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./edit-account.page.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #c49079;&quot;&gt;&#39;./edit-account.page.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OperationPage&lt;/span&gt; &lt;span style=&quot;color: #c49079;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;SavingsAccount&lt;/span&gt; = {} as &lt;span style=&quot;color: #c0392b;&quot;&gt;SavingsAccount&lt;/span&gt; ;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;StandingAccount&lt;/span&gt; = {} as &lt;span style=&quot;color: #c0392b;&quot;&gt;StandingAccount&lt;/span&gt;;   
  &lt;span style=&quot;color: #2980b9&quot;&gt;idTax&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;idLoan&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;  
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;showEditTax&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;showEditLoan&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;    

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;: BankService, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;: ModalController) { }
  
   &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() {
    if(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;idTax&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findAccountById&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;idTax&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showEditTax&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    })
    }
    if(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;idLoan&lt;/span&gt;!=&lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findAccountById&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;idLoan&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showEditLoan&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
      });
    }
    }

  &lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;() {
   &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;modalController&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;dismiss&lt;/span&gt;();
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;addStandingAccountTax&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;editSavingsAccount&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;idTax&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;savingsAccount&lt;/span&gt;;
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reload&lt;/span&gt;();
    })
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;addStandingAccountLoan&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;bankService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;editStandingAccount&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;idLoan&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;standingAccount&lt;/span&gt;;
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reload&lt;/span&gt;();
    })
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/edit-account.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyEditAccountHtml(selectEditAccountHtml)&quot; id=&quot;idBtnEditAccountHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEditAccountHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;danger&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;start&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;cancel&lt;/span&gt;()&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;slot&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;icon-only&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;close-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-icon&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-buttons&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;Back&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-title&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-toolbar&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-header&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;showEditTax&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;Update tax &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;savingsAccount&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;ngSubmit&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;addStandingAccountTax&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2980b9&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; novalidate&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter tax&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;tax&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;savingsAccount.tax&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;#tax&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt;
            required&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;block&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;tax.invalid&quot;&lt;/span&gt;&gt;
          Add&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;     
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
 &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
 
   &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;showEditLoan&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;Update loan&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-title&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-header&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;bubbles&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;primary&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-spinner&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;savingsAccount&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;ngSubmit&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;addStandingAccountLoan&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2980b9&quot;&gt;#formRegister&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngForm&quot;&lt;/span&gt; novalidate&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;Enter loan&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;loan&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;standingAccount.loan&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;#loan&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;ngModel&quot;&lt;/span&gt;
            required&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-input&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-item&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;fill&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;solid&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;size&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;expand&lt;/span&gt;=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;block&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #c49079;&quot;&gt;&quot;loan.invalid&quot;&lt;/span&gt;&gt;
          Add&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;     
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card-content&lt;/span&gt;&gt;
 &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-card&lt;/span&gt;&gt;
 
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ion-content&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;title&quot;&gt;Add the AppRoutingModule&lt;/h2&gt;
&lt;p&gt;In Angular, the best practice is to load and configure the router in a separate, top-level module that is dedicated to routing and imported by the root AppModule.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;By convention, the module class name is AppRoutingModule and it belongs in the app-routing.module.ts in the src/app folder.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;app-routing-module.ts&lt;/p&gt;

&lt;p&gt;src/app/app-routing.module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppRoutingModule(selectAppRoutingModule)&quot; id=&quot;idBtnAppRoutingModule&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppRoutingModule&quot;&gt;
&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;NgModule&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;PreloadAllModules, RouterModule, Routes &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2c3e50&quot;&gt;routes&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Routes&lt;/span&gt; = [
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;redirectTo&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;/login&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;pathMatch&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;full&#39;&lt;/span&gt;
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;login&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./login/login.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;LoginPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;find-clients/:id&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./find-clients/find-clients.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;FindClientsPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;update-client&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./update-client/update-client.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;UpdateClientPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;add-standing-account&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./add-standing-account/add-standing-account.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;AddStandingAccountPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;add-savings-account&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./add-savings-account/add-savings-account.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;AddSavingsAccountPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;checking-account/:id&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./checking-account/checking-account.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;CheckingAccountPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;operation&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./operation/operation.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;OperationPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;deposit&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./deposit/deposit.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;DepositPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;debit&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./debit/debit.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;DebitPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;transfer&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./transfer/transfer.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;TransferPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;find-account/:id&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./find-account/find-account.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;FindAccountPageModule&lt;/span&gt;)
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;edit-account&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;loadChildren&lt;/span&gt;: () =&gt; &lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./edit-account/edit-account.module&#39;&lt;/span&gt;).&lt;span style=&quot;color: #8e44ad;&quot;&gt;then&lt;/span&gt;( m =&gt; m.&lt;span style=&quot;color: #c0392b;&quot;&gt;EditAccountPageModule&lt;/span&gt;)
  },    
];

@&lt;span style=&quot;color: #c0392b;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #2c3e50&quot;&gt;imports&lt;/span&gt;: [
    &lt;span style=&quot;color: #c0392b;&quot;&gt;RouterModule&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;forRoot&lt;/span&gt;(&lt;span style=&quot;color: #2c3e50&quot;&gt;routes&lt;/span&gt;, { &lt;span style=&quot;color: #2c3e50&quot;&gt;preloadingStrategy&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;PreloadAllModules&lt;/span&gt; })
  ],
  &lt;span style=&quot;color: #2c3e50&quot;&gt;exports&lt;/span&gt;: [&lt;span style=&quot;color: #c0392b;&quot;&gt;RouterModule&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;AppRoutingModule&lt;/span&gt; { }
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;title&quot;&gt;NgModules and JavaScript modules&lt;/h2&gt;
&lt;p&gt;The NgModule system is different from and unrelated to the JavaScript (ES2015) module system for managing collections of JavaScript objects. These are complementary module systems that you can use together to write your apps.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;In JavaScript each file is a module and all objects defined in the file belong to that module. The module declares some objects to be public by marking them with the export key word. Other JavaScript modules use import statements to access public objects from other modules.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;app-module.ts&lt;/p&gt;&lt;br&gt;

&lt;p&gt;src/app/app-module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppModule(selectAppModule)&quot; id=&quot;idBtnAppModule&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppModule&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;CUSTOM_ELEMENTS_SCHEMA, NgModule, NO_ERRORS_SCHEMA&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;BrowserModule&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/platform-browser&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;RouteReuseStrategy&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;IonicModule, IonicRouteStrategy&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@ionic/angular&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;SplashScreen&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@ionic-native/splash-screen/ngx&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;StatusBar&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@ionic-native/status-bar/ngx&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;HttpClientModule&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;AppComponent&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./app.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;AppRoutingModule&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./app-routing.module&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2c3e50&quot;&gt;FormsModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/forms&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #2c3e50&quot;&gt;declarations&lt;/span&gt;: [&lt;span style=&quot;color: #c0392b;&quot;&gt;AppComponent&lt;/span&gt;],
  &lt;span style=&quot;color: #2c3e50&quot;&gt;entryComponents&lt;/span&gt;: [],
  &lt;span style=&quot;color: #2c3e50&quot;&gt;imports&lt;/span&gt;: [
    &lt;span style=&quot;color: #c0392b;&quot;&gt;BrowserModule, 
    IonicModule&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;forRoot&lt;/span&gt;(), 
    &lt;span style=&quot;color: #c0392b;&quot;&gt;AppRoutingModule,     
    FormsModule,
    HttpClientModule&lt;/span&gt;,
  ],
  &lt;span style=&quot;color: #2c3e50&quot;&gt;providers&lt;/span&gt;: [
    &lt;span style=&quot;color: #c0392b;&quot;&gt;StatusBar&lt;/span&gt;,
    &lt;span style=&quot;color: #c0392b;&quot;&gt;SplashScreen&lt;/span&gt;,
    { &lt;span style=&quot;color: #c0392b;&quot;&gt;provide&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;RouteReuseStrategy&lt;/span&gt;, &lt;span style=&quot;color: #c0392b;&quot;&gt;useClass&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;IonicRouteStrategy &lt;/span&gt;}
  ],
  &lt;span style=&quot;color: #2c3e50&quot;&gt;schemas&lt;/span&gt;: [&lt;span style=&quot;color: #3498db;&quot;&gt;
    CUSTOM_ELEMENTS_SCHEMA,
    NO_ERRORS_SCHEMA&lt;/span&gt;
  ],
  &lt;span style=&quot;color: #2c3e50&quot;&gt;bootstrap&lt;/span&gt;: [&lt;span style=&quot;color: #c0392b;&quot;&gt;AppComponent&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;AppModule&lt;/span&gt; { }
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Spring Boot CRUD example when building a CRUD App.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp; Spring Data JPA, as well, we ware creating an Ionic app with Angular 10 project structure for building a front-end app to make HTTP requests and consume responses.&lt;/p&gt;&lt;br&gt;&lt;br&gt;

&lt;div style=&quot;background: #fff; border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring.html&quot;&gt;Building an application bank with Spring boot and Ionic part 1&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: none 0% 0% repeat scroll rgb(0, 137, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/bank-ionic&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download My bank Application From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;


&lt;br /&gt;
&lt;style&gt; 
 pre:before {
   content: none;
  }
  pre {
   background-color: #fff;
   border-radius: 7px;
   line-height: 20px; 
   position: relative;
   overflow: auto;
   width: 100%;
  }
  
  code {
  color: #000;
  font-size: 13px;
  background-color: #fff;
  padding: 3px 10px 20px;
  }
 div::-moz-selection,
 b::-moz-selection,
 strong::-moz-selection,
 code::-moz-selection,
 span::-moz-selection {
  color: #000;
  background-color: #fff;
}
div::selection,
strong::selection,
b::selection,
code::selection,
span::selection {
  color: #000;
  background-color: #fff;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
  .h2-title {
    background: #fbc531;
    padding: 10px !important;
   border-left: 10px solid;
  }
  .sub-title {
   font-size: 22px;
   color: #0097e6;
  }
&lt;/style&gt;
&lt;script data-ad-client=&quot;ca-pub-7401879888732563&quot; async src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;

&lt;script&gt;
  function copyModals(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnModals&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyBookService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnBookService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLoginTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLoginTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLoginHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLoginHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindClientsTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindClientsTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindClients(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindClients&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindClientsHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindClientsHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyaddSavingsAccountTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnaddSavingsAccountTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddSavingsAccountHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddSavingsAccountHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUpdateClientTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUpdateClientTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUpdateClientHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUpdateClientHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddStandigAccountTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddStandigAccountTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddStandigAccountHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddStandigAccountHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDebitTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDebitTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDebitHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDebitHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDepositTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDepositTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDepositHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDepositHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyTransferTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnTransferTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyTransferHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnTransferHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCheckingAccountTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCheckingAccountTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCheckingAccountHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCheckingAccountHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyOperationTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnOperationTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyOperationHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnOperationHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindAccountTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindAccountTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyFindAccountHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnFindAccountHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEditAccountTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEditAccountTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEditAccountHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEditAccountHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppRoutingModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppRoutingModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/7190510714232911742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring_18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/7190510714232911742'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/7190510714232911742'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring_18.html' title='Building an application bank with Spring boot and Ionic part 2'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/B_RCmmDa4L0/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-545076606659575267</id><published>2022-01-18T03:35:00.005-08:00</published><updated>2022-08-26T09:18:38.271-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Spring boot"/><title type='text'>Building an application bank with Spring boot and Ionic part 1</title><content type='html'>&lt;h1 style=&quot;background: none 0% 0% repeat scroll rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Spring Boot&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://zupimages.net/up/21/05/7a63.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;406&quot; data-original-width=&quot;800&quot; src=&quot;https://zupimages.net/up/21/05/7a63.png&quot; style=&quot;border: 1px solid;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr /&gt;

&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;mYCJesq2-vc&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/mYCJesq2-vc&quot;&gt;&lt;/iframe&gt;

&lt;h1&gt; Build an application bank with Spring boot and Angular use Jpa&lt;/h1&gt;

&lt;h2&gt;Objective:&lt;/h2&gt;
&lt;p&gt;In this tutorials we will build an application bank to create Standing Account  and Savings Account the user can do operations deposit, debit or transfer from account to another the admin can add the accounts with balance, tax or loan for any account.&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;Used Skills in this project:&lt;/h2&gt;
&lt;p&gt;Java, SpringBoot, MicroServices, REST WebServices, JPA, Hibernate, MySQL Database, Maven, Angular, GitHub, SpringBoot Embedded Tomcat Server, STS-Eclipse IDE&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;Tools to be used&lt;/h2&gt;
&lt;p&gt; ° Use any IDE to develop the Spring and Hibernate project. It may be STS/Eclipse/Netbeans. Here, we are using STS (Spring Tool Suite). &lt;/p&gt;
&lt;p&gt; ° Mysql for the database.&lt;/p&gt;
&lt;p&gt; ° Use any IDE to develop the Angular project. It may be Visual Studio Code/Sublime. Here, we are using Visual Studio Code.&lt;/p&gt;
&lt;p&gt; ° Server: Apache Tomcat/JBoss/Glassfish/Weblogic/Websphere.&lt;/p&gt;


&lt;br /&gt;&lt;h2 class=&quot;h2-title&quot;&gt;Spring MVC&lt;/h2&gt;
&lt;p&gt;Spring MVC is the primary web framework built on the Servlet API. It is build on the popular MVC design pattern. MVC (Model-View-Controller) is a software architecture pattern, which separates application into three areas: model, view, and controller. The model represents a Java object carrying data. The view represents the visualization of the data that the model contains. The controller controls the data flow into model object and updates the view when the data changes. It separates the view and model.&lt;/p&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #fb4834;&quot;&gt;Spring Boot Architecture&lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://i.ibb.co/v1gcv49/Screenshot-2021-01-31-at-16-01-34.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;519&quot; src=&quot;https://i.ibb.co/v1gcv49/Screenshot-2021-01-31-at-16-01-34.png&quot; style=&quot;border: 1px solid rgb(204, 204, 204);&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Spring Boot is a module of the Spring Framework. It is used to create stand-alone, production-grade Spring Based Applications with minimum efforts. It is developed on top of the core Spring Framework.&lt;/p&gt;&lt;hr /&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Introduction mysql to database &lt;/h2&gt;
&lt;p&gt;&lt;b&gt;MySQL&lt;/b&gt; is a database management system that allows you to manage relational databases. It is open source software backed by Oracle. It means you can use MySQL without paying a dime. Also, if you want, you can change its source code to suit your needs. &lt;b&gt;MySQL&lt;/b&gt; can run on various platforms UNIX, Linux, Windows, etc. You can install it on a server or even in a desktop. Besides, MySQL is reliable, scalable, and fast.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Introduction to the POM&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;POM&lt;/b&gt; A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects. Examples for this is the build directory, which is &lt;b&gt;target&lt;/b&gt;; the source directory, which is &lt;b&gt;src/main/java&lt;/b&gt;; the test source directory, which is &lt;b&gt;src/main/java&lt;/b&gt;; and so on. When executing a task or goal, Maven looks for the POM in the current directory. It reads the POM, gets the needed configuration information, then executes the goal.&lt;/p&gt;

&lt;h3 style=&quot;background: none 0% 0% repeat scroll cornflowerblue; border-left: 10px solid rgb(49, 65, 255); color: white; margin-bottom: -15px; padding: 10px;&quot;&gt;pom.xml&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: darkcyan;&quot;&gt;
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPom&quot; onclick=&quot;copyPom(selectPom)&quot; style=&quot;cursor: pointer; float: right;&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;
  &lt;div id=&quot;selectPom&quot;&gt; 
 &amp;lt;?xml &lt;span style=&quot;color: purple;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: mediumblue;&quot;&gt;=&quot;UTF-8&quot;&lt;/span&gt;?&amp;gt;
 &amp;lt;project &lt;span style=&quot;color: purple;&quot;&gt;xmlns&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xmlns:xsi&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;
 &lt;span style=&quot;color: purple;&quot;&gt;xsi:schemaLocation&lt;/span&gt;=&lt;span style=&quot;color: mediumblue;&quot;&gt;&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&lt;/span&gt;&amp;gt;
  &amp;lt;modelVersion&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;4.0.0&lt;/span&gt;&amp;gt;/modelVersion&amp;gt;
   &amp;lt;parent&amp;gt;
   &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
   &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-parent&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;2.4.1&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;relativePath/&amp;gt; 
  &amp;lt;/parent&amp;gt;
    
    &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.bank&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;bank&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	&amp;lt;version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;0.0.1-SNAPSHOT&lt;/span&gt;&amp;lt;/version&amp;gt;
	&amp;lt;name&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;bank&lt;/span&gt;&amp;lt;/name&amp;gt;
	&amp;lt;description&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;Demo project for Spring Boot&lt;/span&gt;&amp;lt;/description&amp;gt;
    
    &amp;lt;properties&amp;gt;
	 &amp;lt;java.version&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;1.8&lt;/span&gt;&amp;lt;/java.version&amp;gt;
    &amp;lt;/properties&amp;gt;
    
    &amp;lt;dependencies&amp;gt;
    
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-data-jpa&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
    
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-web&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	 &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	 &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-devtools&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
     &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;runtime&lt;/span&gt;&amp;lt;/scope&amp;gt;
     &amp;lt;optional&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;true&lt;/span&gt;&amp;lt;/optional&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
	&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
	&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-starter-test&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;test&lt;/span&gt;&amp;lt;/scope&amp;gt;
   &amp;lt;/dependency&amp;gt;
   
   &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql&lt;/span&gt;&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;mysql-connector-java&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
        &amp;lt;scope&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;runtime&lt;/span&gt;&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
    
  &amp;lt;/dependencies&amp;gt;
  
  &amp;lt;build&amp;gt;
    &amp;lt;plugins&amp;gt;
	 &amp;lt;plugin&amp;gt;
		&amp;lt;groupId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;org.springframework.boot&lt;/span&gt;&amp;lt;/groupId&amp;gt;
		&amp;lt;artifactId&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;spring-boot-maven-plugin&lt;/span&gt;&amp;lt;/artifactId&amp;gt;
	 &amp;lt;/plugin&amp;gt;
	&amp;lt;/plugins&amp;gt;
 &amp;lt;/build&amp;gt;
 
 &amp;lt;/project&amp;gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #c0392b;&quot;&gt;Properties File&lt;/h2&gt;
&lt;p&gt;Properties files are used to keep ‘N’ number of properties in a single file to run the application in a different environment. In Spring Boot, properties are kept in the application.properties file under the classpath.&lt;/p&gt;
&lt;p&gt;The application.properties file is located in the src/main/resources directory. The code for sample application.properties&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;span style=&quot;color: black;&quot;&gt; We need to create database name it bank &lt;/span&gt;&lt;/p&gt;
&lt;h3 style=&quot;background: none 0% 0% repeat scroll cornflowerblue; border-left: 10px solid rgb(49, 65, 255); color: white; margin-bottom: -15px; padding: 10px;&quot;&gt;src/main/resources/application.properties&lt;/h3&gt;
  &lt;pre&gt;    &lt;code style=&quot;color: black;&quot;&gt;
  &lt;button class=&quot;btnCopy&quot; id=&quot;idBtnPro&quot; onclick=&quot;copyPro(selectPro)&quot; style=&quot;cursor: pointer; float: right;&quot; type=&quot;button&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectPro&quot;&gt; 
&lt;span&gt;spring.datasource.url=&lt;span style=&quot;color: darkcyan;&quot;&gt;jdbc:mysql://localhost:3306/&lt;span style=&quot;background: none 0% 0% repeat scroll orange; color: white;&quot;&gt;bank&lt;/span&gt;?useUnicode=true&amp;amp;useJDBCCompliantTimezoneShift=true&amp;amp;useLegacyDatetimeCode=false&amp;amp;serverTimezone=UTC&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.datasource.username=&lt;span style=&quot;color: darkcyan;&quot;&gt;root&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.activemq.password=&lt;/span&gt;
&lt;span&gt;spring.datasource.driver-class-name=&lt;span style=&quot;color: darkcyan;&quot;&gt;com.mysql.jdbc.Driver&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.properties.hibernate.dialect=&lt;span style=&quot;color: darkcyan;&quot;&gt;org.hibernate.dialect.MySQL8Dialect&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.hibernate.ddl-auto=&lt;span style=&quot;color: darkcyan;&quot;&gt;update&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;server.port=&lt;span style=&quot;color: darkcyan;&quot;&gt;8080&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;spring.jpa.database=&lt;span style=&quot;color: darkcyan;&quot;&gt;MYSQL&lt;/span&gt;&lt;/span&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2&gt;Class Diagram &lt;/h2&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://nsa40.casimages.com/img/2021/02/01/210201043324985044.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;157&quot; data-original-width=&quot;521&quot; src=&quot;https://nsa40.casimages.com/img/2021/02/01/210201043324985044.png&quot; style=&quot;border: 1px solid rgb(204, 204, 204);&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2&gt;
&lt;/h2&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Modals / Entities&lt;/h2&gt;
&lt;p&gt;An &lt;b&gt;entity&lt;/b&gt; is a lightweight persistence domain object. Typically, an &lt;b&gt;entity&lt;/b&gt; represents a table in a relational database, and each &lt;b&gt;entity&lt;/b&gt; instance corresponds to a row in that table. The primary programming artifact of an &lt;b&gt;entity&lt;/b&gt; is the &lt;b&gt;entity&lt;/b&gt; class, although &lt;b&gt;entities&lt;/b&gt; can use helper classes.&lt;/p&gt;&lt;br&gt;
&lt;h2&gt;We need to create these entities &lt;/h2&gt;
&lt;div style=&quot;color: #2980b9; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Account&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Client&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Credit&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Operation&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; SavingsAccount&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; StandingAccount&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; OrderProductPk&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; Withdraw&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Account.java &lt;/b&gt; This object content id, code, createDate, balance and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Client and &lt;b&gt;@OneToMany&lt;/b&gt; with Operation&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/model/Account.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyAccount(selectAccount)&quot; id=&quot;idBtnAccount&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAccount&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.io.Serializable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;accounts&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@Inheritance&lt;/span&gt;(strategy = InheritanceType.&lt;b style=&quot;color: blue;&quot;&gt;SINGLE_TABLE&lt;/b&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Account &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Serializable {

 &lt;span style=&quot;color: blue;&quot;&gt;/**
 * 
 */&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: blue;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Integer &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;code&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Date &lt;span style=&quot;color: blue;&quot;&gt;createDate&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; double &lt;span style=&quot;color: blue;&quot;&gt;balance&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne
 @JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;client&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Client client;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(mappedBy = &lt;span style=&quot;color: blue;&quot;&gt;&quot;account&quot;&lt;/span&gt;, cascade = CascadeType.&lt;b style=&quot;color: blue;&quot;&gt;ALL&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Operation&gt; &lt;span style=&quot;color: blue;&quot;&gt;operations&lt;/span&gt;;
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Account() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Account(String &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, Date &lt;span style=&quot;color: #82590f;&quot;&gt;createDate&lt;/span&gt;, double &lt;span style=&quot;color: #82590f;&quot;&gt;balance&lt;/span&gt;, Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;, List&amp;lt;Operation&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;operations&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;code&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createDate&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;balance&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;balance&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;client&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;operations&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;operations&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Integer getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(Integer &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getCode() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;code&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCode(String &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;code&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Date getCreateDate() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;createDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setCreateDate(Date &lt;span style=&quot;color: #82590f;&quot;&gt;createDate&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;createDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;createDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public double&lt;/b&gt; getBalance() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;balance&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setBalance(&lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;balance&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;balance&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;balance&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Client getClient() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;client&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setClient(Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;client&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Operation&gt; getOperations() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;operations&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setOperations(List&amp;lt;Operation&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;operations&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;operations&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;operations&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; doOperation(Operation &lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getOperations() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.operations = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&gt;();
   }
    getOperations().add(&lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;);
    &lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;.setAccount(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Client.java &lt;/b&gt; This object content id, name, username, password, email, admin and relational &lt;b&gt;@OneToMany&lt;/b&gt; with Account&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/model/Client.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyClient(selectClient)&quot; id=&quot;idBtnClient&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectClient&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.modal;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.io.Serializable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.ArrayList;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;clients&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Client &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Serializable {
 &lt;span style=&quot;color: blue;&quot;&gt;/**
 * 
 */&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: blue;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;_username&quot;&lt;/span&gt;, unique = &lt;b style=&quot;color: blue;&quot;&gt;true&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;username&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;_password&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;password&lt;/span&gt;;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;_name&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Column&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;_email&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;email&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;private boolean&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;admin&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@OneToMany&lt;/span&gt;(mappedBy = &lt;span style=&quot;color: blue;&quot;&gt;&quot;client&quot;&lt;/span&gt;, cascade = CascadeType.&lt;b style=&quot;color: blue;&quot;&gt;ALL&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; List&amp;lt;Account&gt; &lt;span style=&quot;color: blue;&quot;&gt;accounts&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Client() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }
 
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Client(String &lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;password&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;email&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;boolean&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;admin&lt;/span&gt;, List&amp;lt;Account&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;accounts&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;username&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;password&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;password&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;email&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;email&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;admin&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;admin&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;accounts&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;accounts&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public long&lt;/b&gt;  getId() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setId(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;id&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getUsername() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;username&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setUsername(String &lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;username&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;username&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getPassword() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;password&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setPassword(String &lt;span style=&quot;color: #82590f;&quot;&gt;password&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;password&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;password&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getName() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setName(String &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;name&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getEmail() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;email&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setEmail(String &lt;span style=&quot;color: #82590f;&quot;&gt;email&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;email&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;email&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public boolean&lt;/b&gt; isAdmin() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;admin&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setAdmin(&lt;b style=&quot;color: purple;&quot;&gt;boolean&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;admin&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;admin&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;admin&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Account&gt; getAccounts() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;accounts&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setAccounts(List&amp;lt;Account&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;accounts&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;accounts&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;accounts&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; addAccount(Account &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (getAccounts() == &lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.accounts = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; ArrayList&amp;lt;&gt;();
   }
    getAccounts().add(&lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;);
    &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;.setClient(&lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;);
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Credit.java &lt;/b&gt; This object &lt;b&gt;extends&lt;/b&gt; Operation&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/model/Credit.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyCredit(selectCredit)&quot; id=&quot;idBtnCredit&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCredit&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.DiscriminatorValue;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@DiscriminatorValue&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;&quot;C&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Credit &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; Operation {

 &lt;span style=&quot;color: blue;&quot;&gt;/**
 * 
 */&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: blue;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Credit() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Credit(Date &lt;span style=&quot;color: #82590f;&quot;&gt;operationDate&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;typeOperation&lt;/span&gt;, Account &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;(&lt;span style=&quot;color: #82590f;&quot;&gt;operationDate&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;typeOperation&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Operation.java &lt;/b&gt; This object content numberOperation, operationDate, amount, typeOperation and relational &lt;b&gt;@ManyToOne&lt;/b&gt; with Account&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/model/Operation.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyOperation(selectOperation)&quot; id=&quot;idBtnOperation&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectOperation&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.io.Serializable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.*;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.fasterxml.jackson.annotation.JsonBackReference;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@Table&lt;/span&gt;(name = &lt;span style=&quot;color: blue;&quot;&gt;&quot;accounts&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@Inheritance&lt;/span&gt;(strategy = InheritanceType.&lt;b style=&quot;color: blue;&quot;&gt;SINGLE_TABLE&lt;/b&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Operation &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; Serializable {

 &lt;span style=&quot;color: blue;&quot;&gt;/**
 * 
 */&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: blue;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Id
 @GeneratedValue&lt;/span&gt;(strategy = GenerationType.&lt;b style=&quot;color: blue;&quot;&gt;AUTO&lt;/b&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private long&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;numberOperation&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Date &lt;span style=&quot;color: blue;&quot;&gt;operationDate&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private double&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;amount&lt;/span&gt;;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; String &lt;span style=&quot;color: blue;&quot;&gt;typeOperation&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@ManyToOne
 @JsonBackReference&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;accounnt&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; Account &lt;span style=&quot;color: blue;&quot;&gt;account&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Operation() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Operation(Date &lt;span style=&quot;color: #82590f;&quot;&gt;operationDate&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;typeOperation&lt;/span&gt;, Account &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;operationDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;operationDate&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;amount&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;typeOperation&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;typeOperation&lt;/span&gt;;
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;account&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public long&lt;/b&gt; getNumberOperation() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;numberOperation&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setNumberOperation(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;numberOperation&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;numberOperation&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;numberOperation&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Date getOperationDate() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;operationDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setOperationDate(Date &lt;span style=&quot;color: #82590f;&quot;&gt;operationDate&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;operationDate&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;operationDate&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public double&lt;/b&gt; getAmount() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;amount&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setAmount(&lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;amount&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; String getTypeOperation() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;typeOperation&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setTypeOperation(String &lt;span style=&quot;color: #82590f;&quot;&gt;typeOperation&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;typeOperation&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;typeOperation&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Account getAccount() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;account&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setAccount(Account &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;account&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;;
 }

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;SavingsAccount.java &lt;/b&gt; This object &lt;b&gt;extends&lt;/b&gt; Account&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/model/SavingsAccount.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copySavingsAccount(selectSavingsAccount)&quot; id=&quot;idBtnSavingsAccount&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSavingsAccount&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.DiscriminatorValue;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@DiscriminatorValue&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;&quot;SA&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; SavingsAccount &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; Account {

 &lt;span style=&quot;color: blue;&quot;&gt;/**
 * 
 */&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: blue;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;
	
 &lt;b style=&quot;color: purple;&quot;&gt;private double&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;tax&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; SavingsAccount() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; SavingsAccount(String &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, Date &lt;span style=&quot;color: #82590f;&quot;&gt;createDate&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;balance&lt;/span&gt;, Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;tax&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;(&lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;createDate&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;balance&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;tax&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;tax&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public double&lt;/b&gt; getTax() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;tax&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setTax(&lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;tax&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;tax&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;tax&lt;/span&gt;;
 } 

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;StandingAccount.java &lt;/b&gt; This object &lt;b&gt;extends&lt;/b&gt; Account&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/model/StandingAccount.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyStandingAccount(selectStandingAccount)&quot; id=&quot;idBtnStandingAccount&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectStandingAccount&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.DiscriminatorValue;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@DiscriminatorValue&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;&quot;CA&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; StandingAccount &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; Account {

 &lt;span style=&quot;color: blue;&quot;&gt;/**
 * 
 */&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: blue;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;
	
 &lt;b style=&quot;color: purple;&quot;&gt;private double&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;loan&lt;/span&gt;;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; StandingAccount() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; StandingAccount(String &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, Date &lt;span style=&quot;color: #82590f;&quot;&gt;createDate&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;balance&lt;/span&gt;, Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;loan&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;(&lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;createDate&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;balance&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;loan&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;loan&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public double&lt;/b&gt; getLoan() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;loan&lt;/span&gt;;
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; setLoan(&lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;loan&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;this&lt;/b&gt;.&lt;span style=&quot;color: blue;&quot;&gt;loan&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;loan&lt;/span&gt;;
 } 

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating an Entity&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Credit.java &lt;/b&gt; This object &lt;b&gt;extends&lt;/b&gt; Operation&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/model/Credit.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyWithdraw(selectWithdraw)&quot; id=&quot;idBtnWithdraw&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectWithdraw&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.modal;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.DiscriminatorValue;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.persistence.Entity;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Entity
@DiscriminatorValue&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;&quot;w&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; Withdraw &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; Operation {

 &lt;span style=&quot;color: blue;&quot;&gt;/**
 * 
 */&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private static final long&lt;/b&gt; &lt;b style=&quot;color: blue;&quot;&gt;serialVersionUID&lt;/b&gt; = 1L;

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Withdraw() {
  &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;();
 }

 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Withdraw(Date &lt;span style=&quot;color: #82590f;&quot;&gt;operationDate&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;, String &lt;span style=&quot;color: #82590f;&quot;&gt;typeOperation&lt;/span&gt;, Account &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;super&lt;/b&gt;(&lt;span style=&quot;color: #82590f;&quot;&gt;operationDate&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;typeOperation&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Spring Data JPA Projections&lt;/h2&gt;

&lt;p&gt;When using &lt;b style=&quot;color: purple;&quot;&gt;Spring Data JPA&lt;/b&gt; to implement the persistence layer, the repository typically returns one or more instances of the root class. However, more often than not, we don&#39;t need all the properties of the returned objects.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;In such cases, it may be desirable to retrieve data as objects of customized types. &lt;b&gt;These types reflect partial views of the root class, containing only properties we care about&lt;/b&gt;. This is where projections come in handy.&lt;/p&gt;
&lt;h2&gt;We need to create these interface dao &lt;/h2&gt;
&lt;div style=&quot;color: #2980b9; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; AccountDao&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; ClientDao&lt;/p&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; OperationDao&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating a AccountDao interface&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/dao/AccountDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyAccountDao(selectAccountDao)&quot; id=&quot;idBtnAccountDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAccountDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Optional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Account;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; AccountDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Account, Integer&gt; {
  Optional&amp;lt;Account&gt; findByCode(String &lt;span style=&quot;color: #82590f;&quot;&gt; code&lt;/span&gt;);
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a ClientDao interface&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/dao/ClientDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyClientDao(selectClientDao)&quot; id=&quot;idBtnClientDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectClientDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.dao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Client;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; ClientDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Client, Long&gt; {

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;p&gt;Here, we are creating a OperationDao interface&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/dao/OperationDao.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyOperationDao(selectOperationDao)&quot; id=&quot;idBtnOperationDao&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectOperationDao&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.dao;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.JpaRepository;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.jpa.repository.Query;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.data.repository.query.Param;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Operation;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; OperationDao &lt;b style=&quot;color: purple;&quot;&gt;extends&lt;/b&gt; JpaRepository&amp;lt;Operation, Long&gt; {
  &lt;span style=&quot;color: #8a8787;&quot;&gt;@Query&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;&quot;select o from Operation o where o.account.id=:x order by o.operationDate desc&quot;&lt;/span&gt;)
  public List&amp;lt;Operation&gt; checkingAccount(&lt;span style=&quot;color: #8a8787;&quot;&gt;@Param&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;&quot;x&quot;&lt;/span&gt;) &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;The services&lt;/h2&gt;
&lt;p&gt;Service Components are the class file which contains @Service annotation. These class files are used to write business logic in a different layer, separated from @RestController class file. The logic for creating a service component class file is shown here &lt;/p&gt;&lt;br /&gt;
  &lt;h2&gt;We will create one interface in service package:&lt;/h2&gt;

&lt;div style=&quot;color: #2980b9; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; BankService&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating a BankService &lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/model/BankService.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyBankService(selectBankService)&quot; id=&quot;idBtnBankService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectBankService&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Account;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Client;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Operation;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.SavingsAccount;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.StandingAccount;

&lt;b style=&quot;color: purple;&quot;&gt;public interface&lt;/b&gt; BankService {

 List&amp;lt;Operation&gt; checkingAccount(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;);

 Operation deposit(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;);

 Operation debit(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;);

 Operation transfer(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code1&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code2&lt;/span&gt;, Operation operation);

 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; debitOperation(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;);

 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; depositOperation(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;);

 Client loginClient(Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;);
	
 Client updateClient(Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 StandingAccount addStandingAccount(StandingAccount &lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 SavingsAccount addSavingsAccount(SavingsAccount &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 StandingAccount editStandingAccount(StandingAccount &lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 SavingsAccount editSavingsAccount(SavingsAccount &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 List&amp;lt;Operation&gt; findWithdraws(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

 List&amp;lt;Operation&gt; findCredits(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;Client&gt; findClients();
	
 Client findClient(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #8a8787;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;Account&gt; findStandingAccountAccounts(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;Account&gt; findSavingsAccountAccounts(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
	
 List&amp;lt;Account&gt; findAccountsForClient(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;The managers classes implementation&lt;/h2&gt;
&lt;p&gt;An impl class is usually a class that implements the behaviour described by one of these interfaces. While the internal implementation class,  With transactions configured, we can now annotation a bean with &lt;b&gt;@Transactional&lt;/b&gt; and &lt;b&gt;@Service&lt;/b&gt; either at the class or method level. Then conversion Entity to DTO. This is stands for Data Transfer Object and is a simple Plain Old Java Object which contains class properties and getters and settings methods for accessing those properties.&lt;/p&gt;&lt;br&gt;


&lt;h2&gt;We will create ont class in the impl package &lt;/h2&gt;
&lt;div style=&quot;color: #2980b9; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; BankServiceImpl&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Here, we are creating a BankServiceImpl&lt;/p&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/service/BankServiceImpl.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyBankServiceImpl(selectBankServiceImpl)&quot; id=&quot;idBtnBankServiceImpl&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectBankServiceImpl&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.service;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Date;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.Random;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.stream.Collectors;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; javax.transaction.Transactional;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.stereotype.Component;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.dao.AccountDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.dao.ClientDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.dao.OperationDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Account;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Client;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Credit;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.StandingAccount;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Operation;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.SavingsAccount;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Withdraw;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@Transactional
@Component&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; BankServiceImp &lt;b style=&quot;color: purple;&quot;&gt;implements&lt;/b&gt; BankService {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; AccountDao &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; OperationDao &lt;span style=&quot;color: blue;&quot;&gt;operationDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; ClientDao &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Operation&gt; checkingAccount(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;operationDao&lt;/span&gt;.checkingAccount(&lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Operation deposit(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;) {
   String &lt;span style=&quot;color: #82590f;&quot;&gt;deposit&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;&quot;deposit&quot;&lt;/span&gt;;
   Account &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   Credit &lt;span style=&quot;color: #82590f;&quot;&gt;credit&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Credit(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date(), &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;deposit&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;.setBalance(account.getBalance() + &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;);
   &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;operationDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;credit&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Operation debit(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;) {
   String &lt;span style=&quot;color: #82590f;&quot;&gt;debit&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;&quot;debit&quot;&lt;/span&gt;;
   Account &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   double &lt;span style=&quot;color: #82590f;&quot;&gt;checkout&lt;/span&gt; = 0;
  &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (&lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt; instanceof StandingAccount) {
   &lt;span style=&quot;color: #82590f;&quot;&gt;checkout&lt;/span&gt; = ((StandingAccount) &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;).getLoan();
  }

 &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (account.getBalance() + checkout &amp;lt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;throw new&lt;/b&gt; RuntimeException(&lt;span style=&quot;color: blue;&quot;&gt;&quot;Insufficient balance&quot;&lt;/span&gt;);
 }
   Withdraw &lt;span style=&quot;color: #82590f;&quot;&gt;withdraw&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Withdraw(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date(), &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;debit&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;.setBalance(&lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;.getBalance() - &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;);
   &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;);

   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;operationDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;withdraw&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Operation transfer(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code1&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code2&lt;/span&gt;, Operation &lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (&lt;span style=&quot;color: #82590f;&quot;&gt;code1&lt;/span&gt; == &lt;span style=&quot;color: #82590f;&quot;&gt;code2&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;throw new&lt;/b&gt; RuntimeException(&lt;span style=&quot;color: blue;&quot;&gt;&quot;Cannot transfer to the same account &quot;&lt;/span&gt;);
  }
   deposit(&lt;span style=&quot;color: #82590f;&quot;&gt;code1&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;.getAmount());
   debit(&lt;span style=&quot;color: #82590f;&quot;&gt;code2&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;.getAmount());
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;operationDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; depositOperation(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;) {
   Account &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   deposit(&lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;.getId(), &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Client loginClient(Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;) {
   List&amp;lt;Client&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;clients&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.findAll();
    &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (&lt;span style=&quot;color: #82590f;&quot;&gt;clients&lt;/span&gt;.size() == 0) {
     &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;.setAdmin(true);
   }

   &lt;b style=&quot;color: purple;&quot;&gt;for&lt;/b&gt; (Client &lt;span style=&quot;color: #82590f;&quot;&gt;client2&lt;/span&gt; : &lt;span style=&quot;color: #82590f;&quot;&gt;clients&lt;/span&gt;) {
     &lt;b style=&quot;color: purple;&quot;&gt;if&lt;/b&gt; (&lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;.getUsername().equals(&lt;span style=&quot;color: #82590f;&quot;&gt;client2&lt;/span&gt;.getUsername())) {
      &lt;span style=&quot;color: #82590f;&quot;&gt;client2&lt;/span&gt;.setUsername(&lt;span style=&quot;color: #82590f;&quot;&gt;client2&lt;/span&gt;.getUsername());
      &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;client2&lt;/span&gt;);
    }
   }
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; StandingAccount addStandingAccount(StandingAccount standingAccount, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;char&lt;/b&gt;[] &lt;span style=&quot;color: #82590f;&quot;&gt;chars&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;&quot;0123456789abcdefghijklmnopqrstuvwxyz&quot;&lt;/span&gt;.toCharArray();
   StringBuilder &lt;span style=&quot;color: #82590f;&quot;&gt;sb&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt;  StringBuilder(6);
   Random &lt;span style=&quot;color: #82590f;&quot;&gt;random&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Random();
  &lt;b style=&quot;color: purple;&quot;&gt;for&lt;/b&gt; (&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt;  &lt;span style=&quot;color: #82590f;&quot;&gt;i&lt;/span&gt; = 0; &lt;span style=&quot;color: #82590f;&quot;&gt;i&lt;/span&gt; &amp;lt; 6; &lt;span style=&quot;color: #82590f;&quot;&gt;i&lt;/span&gt;++) {
    char &lt;span style=&quot;color: #82590f;&quot;&gt;c&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;chars&lt;/span&gt;[&lt;span style=&quot;color: #82590f;&quot;&gt;random&lt;/span&gt;.nextInt(&lt;span style=&quot;color: #82590f;&quot;&gt;chars&lt;/span&gt;.length)];
      &lt;span style=&quot;color: #82590f;&quot;&gt;sb&lt;/span&gt;.append(&lt;span style=&quot;color: #82590f;&quot;&gt;c&lt;/span&gt;);
   }
  String &lt;span style=&quot;color: #82590f;&quot;&gt;output&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;sb&lt;/span&gt;.toString();
  Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
  &lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;.setCreateDate(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Date());
  &lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;.setCode(&lt;span style=&quot;color: #82590f;&quot;&gt;output&lt;/span&gt;);
  client.addAccount(&lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;);
  &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public void&lt;/b&gt; debitOperation(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;double&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;) {
    Account &lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
    debit(&lt;span style=&quot;color: #82590f;&quot;&gt;account&lt;/span&gt;.getId(), &lt;span style=&quot;color: #82590f;&quot;&gt;amount&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; SavingsAccount addSavingsAccount(SavingsAccount &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
  &lt;b style=&quot;color: purple;&quot;&gt;char&lt;/b&gt;[] &lt;span style=&quot;color: #82590f;&quot;&gt;chars&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;&quot;0123456789abcdefghijklmnopqrstuvwxyz&quot;&lt;/span&gt;.toCharArray();
  StringBuilder &lt;span style=&quot;color: #82590f;&quot;&gt;sb&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; StringBuilder(6);
  Random &lt;span style=&quot;color: #82590f;&quot;&gt;random&lt;/span&gt; = &lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt; Random();
  
   &lt;b style=&quot;color: purple;&quot;&gt;for&lt;/b&gt; (&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;i&lt;/span&gt; = 0; &lt;span style=&quot;color: #82590f;&quot;&gt;i&lt;/span&gt; &amp;lt; 6; &lt;span style=&quot;color: #82590f;&quot;&gt;i&lt;/span&gt;++) {
    char &lt;span style=&quot;color: #82590f;&quot;&gt;c&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;chars&lt;/span&gt;[&lt;span style=&quot;color: #82590f;&quot;&gt;random&lt;/span&gt;.nextInt(&lt;span style=&quot;color: #82590f;&quot;&gt;chars&lt;/span&gt;.length)];
     &lt;span style=&quot;color: #82590f;&quot;&gt;sb&lt;/span&gt;.append(&lt;span style=&quot;color: #82590f;&quot;&gt;c&lt;/span&gt;);
   }
   String &lt;span style=&quot;color: #82590f;&quot;&gt;output&lt;/span&gt; = &lt;span style=&quot;color: #82590f;&quot;&gt;sb&lt;/span&gt;.toString();
   Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;.setCreateDate(&lt;b style=&quot;color: purple;&quot;&gt;new&lt;/b&gt;  Date());
   &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;.setCode(&lt;span style=&quot;color: #82590f;&quot;&gt;output&lt;/span&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;.addAccount(&lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Operation&gt; findWithdraws(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   List&amp;lt;Operation&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;operations&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.getOne(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).getOperations().stream().filter(&lt;span style=&quot;color: #82590f;&quot;&gt;w&lt;/span&gt; -&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;w&lt;/span&gt; instanceof Withdraw)
      .collect(Collectors.toList());
     &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;operations&lt;/span&gt;;
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Operation&gt; findCredits(&lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
    List&amp;lt;Operation&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;operations&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.getOne(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).getOperations().stream().filter(&lt;span style=&quot;color: #82590f;&quot;&gt;c&lt;/span&gt; -&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;c&lt;/span&gt; instanceof Credit)
      .collect(Collectors.toList());
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;operations&lt;/span&gt;;
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Client&gt; findClients() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.findAll();
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Client findClient(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; Client updateClient(Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Client client2 = &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;span style=&quot;color: #82590f;&quot;&gt;client2&lt;/span&gt;.setPassword(&lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;.getPassword());
   &lt;span style=&quot;color: #82590f;&quot;&gt;client2&lt;/span&gt;.setUsername(&lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;.getUsername());
   &lt;span style=&quot;color: #82590f;&quot;&gt;client2&lt;/span&gt;.setEmail(&lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;.getEmail());
   &lt;span style=&quot;color: #82590f;&quot;&gt;client2&lt;/span&gt;.setName(&lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;.getName());
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;client2&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Account&gt; findStandingAccountAccounts(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
    List&amp;lt;Account&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;accounts&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.getOne(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).getAccounts().stream().filter(&lt;span style=&quot;color: #82590f;&quot;&gt;s&lt;/span&gt; -&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;s&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;instanceof&lt;/b&gt; StandingAccount)
      .collect(Collectors.toList());
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;accounts&lt;/span&gt;;
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Account&gt; findSavingsAccountAccounts(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
    List&amp;lt;Account&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;accounts&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.getOne(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).getAccounts().stream().filter(&lt;span style=&quot;color: #82590f;&quot;&gt;s&lt;/span&gt; -&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;s&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;instanceof&lt;/b&gt;  SavingsAccount)
      .collect(Collectors.toList());
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;accounts&lt;/span&gt;;
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; List&amp;lt;Account&gt; findAccountsForClient(&lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt; = &lt;span style=&quot;color: blue;&quot;&gt;clientDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;.getAccounts();
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; StandingAccount editStandingAccount(StandingAccount &lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
    StandingAccount &lt;span style=&quot;color: blue;&quot;&gt;standingAccount2&lt;/span&gt; = (StandingAccount) &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
    &lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount2&lt;/span&gt;.setLoan(&lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;.getLoan());
    &lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount2&lt;/span&gt;.setBalance(&lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;.getBalance() + &lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;.getLoan());
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;accountDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount2&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Override&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;public&lt;/b&gt; SavingsAccount editSavingsAccount(SavingsAccount &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;, &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
    SavingsAccount &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount2&lt;/span&gt; = (SavingsAccount) &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
    &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount2&lt;/span&gt;.setTax(&lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;.getTax());
    &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount2&lt;/span&gt;.setBalance(&lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount2&lt;/span&gt;.getBalance() - &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;.getTax());
    &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.save(&lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount2&lt;/span&gt;);
 }

}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;@RestController API&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;@RestController&lt;/b&gt; is a convenience annotation for creating Restful controllers. It is a specialization of @Component and is autodetected through classpath scanning. It adds the @Controller and @ResponseBody annotations. It converts the response to JSON or XML. It does not work with the view technology, so the methods cannot return ModelAndView. It is typically used in combination with annotated handler methods based on the @RequestMapping annotation.&lt;/p&gt;&lt;br/&gt;

&lt;h2&gt;We will create one class in controller package:&lt;/h2&gt;
&lt;div style=&quot;color: #2980b9; font-weight: bold;&quot;&gt;
&lt;p class=&quot;sub-title&quot;&gt;-&gt; BankController&lt;/p&gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;In &lt;b&gt;The Controller&lt;/b&gt;  We&#39;ll inject this bean into the controller bean using &lt;b&gt;@Autowired&lt;/b&gt; on the field definition: We need to add map requests with request mapping annotations e.g. &lt;b&gt;@RequestMapping&lt;/b&gt;, &lt;b&gt;@GetMapping&lt;/b&gt; and &lt;b&gt;@PostMapping&lt;/b&gt;&lt;/p&gt;

&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/controller/BankController.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyBankController(selectBankController)&quot; id=&quot;idBtnBankController&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectBankController&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank.controller;

&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; java.util.List;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.beans.factory.annotation.Autowired;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.CrossOrigin;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.GetMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PathVariable;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PostMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.PutMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestBody;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RequestMapping;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.web.bind.annotation.RestController;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.dao.AccountDao;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Account;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Client;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.Operation;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.SavingsAccount;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.modal.StandingAccount;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; com.bank.service.BankService;

&lt;span style=&quot;color: #8a8787;&quot;&gt;@RestController
@RequestMapping&lt;/span&gt;(value = &lt;span style=&quot;color: blue;&quot;&gt;&quot;/api&quot;&lt;/span&gt;)
&lt;span style=&quot;color: #8a8787;&quot;&gt;@CrossOrigin&lt;/span&gt;(origins = &lt;span style=&quot;color: blue;&quot;&gt;&quot;*&quot;&lt;/span&gt;)
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; BankController {

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; BankService &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;;
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@Autowired&lt;/span&gt;
 &lt;b style=&quot;color: purple;&quot;&gt;private&lt;/b&gt; AccountDao &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;;

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/checkingAccount/{code}&quot;&lt;/span&gt;)
 List&amp;lt;Operation&gt; checkingAccount(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; bankService.checkingAccount(&lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/depositOperation/{code}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; depositOperation(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Operation &lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.depositOperation(&lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;.getAmount());
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/saveClient&quot;&lt;/span&gt;)
 Client loginClient(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.loginClient(&lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addStandingAccount/{id}&quot;&lt;/span&gt;)
 StandingAccount addStandingAccount(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; StandingAccount &lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.addStandingAccount(&lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/addSavingsAccount/{id}&quot;&lt;/span&gt;)
 SavingsAccount addSavingsAccount(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; SavingsAccount &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.addSavingsAccount(&lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/debitOperation/{code}&quot;&lt;/span&gt;)
 &lt;b style=&quot;color: purple;&quot;&gt;void&lt;/b&gt; debitOperation(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; int &lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Operation &lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;) {
   &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.debitOperation(&lt;span style=&quot;color: #82590f;&quot;&gt;code&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;.getAmount());
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findWithdraws/{id}&quot;&lt;/span&gt;)
 List&amp;lt;Operation&gt; findWithdraws(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.findWithdraws(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findCredits/{id}&quot;&lt;/span&gt;)
 List&amp;lt;Operation&gt; findCredits(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.findCredits(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }

 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/transfer/{code1}/{code2}&quot;&lt;/span&gt;)
 Operation transfer(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code1&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;code2&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Operation &lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.transfer(&lt;span style=&quot;color: #82590f;&quot;&gt;code1&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;code2&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;operation&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findClients&quot;&lt;/span&gt;)
 List&amp;lt;Client&gt; findClients() {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.findClients();
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findClient/{id}&quot;&lt;/span&gt;)
 Client findClient(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.findClient(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PutMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/updateClient/{id}&quot;&lt;/span&gt;)
 Client updateClient(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; Client &lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.updateClient(&lt;span style=&quot;color: #82590f;&quot;&gt;client&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
    
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findStandingAccountAccounts/{id}&quot;&lt;/span&gt;)
 List&amp;lt;Account&gt; findStandingAccountAccounts(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; long &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.findStandingAccountAccounts(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findSavingsAccountAccounts/{id}&quot;&lt;/span&gt;)
 List&amp;lt;Account&gt; findSavingsAccountAccounts(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.findSavingsAccountAccounts(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
	
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findAccountById/{id}&quot;&lt;/span&gt;)
 Account findAccountById(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;accountDao&lt;/span&gt;.findById(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;).orElse(&lt;b style=&quot;color: purple;&quot;&gt;null&lt;/b&gt;);
 }
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@GetMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/findAccountsForClient/{id}&quot;&lt;/span&gt;)
 List&amp;lt;Account&gt; findAccountsForClient(&lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;long&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.findAccountsForClient(&lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editStandingAccount/{id}&quot;&lt;/span&gt;)
 StandingAccount editStandingAccount(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; StandingAccount &lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.editStandingAccount(&lt;span style=&quot;color: #82590f;&quot;&gt;standingAccount&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
 
 &lt;span style=&quot;color: #8a8787;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #49498c;&quot;&gt;&quot;/editSavingsAccount/{id}&quot;&lt;/span&gt;)
 SavingsAccount editSavingsAccount(&lt;span style=&quot;color: #8a8787;&quot;&gt;@RequestBody&lt;/span&gt; SavingsAccount &lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;, &lt;span style=&quot;color: #8a8787;&quot;&gt;@PathVariable&lt;/span&gt; &lt;b style=&quot;color: purple;&quot;&gt;int&lt;/b&gt; &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;) {
   &lt;b style=&quot;color: purple;&quot;&gt;return&lt;/b&gt; &lt;span style=&quot;color: blue;&quot;&gt;bankService&lt;/span&gt;.editSavingsAccount(&lt;span style=&quot;color: #82590f;&quot;&gt;savingsAccount&lt;/span&gt;, &lt;span style=&quot;color: #82590f;&quot;&gt;id&lt;/span&gt;);
 }
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;BankApplication&lt;/h2&gt;
&lt;p&gt;&lt;b&gt;@BookStoreApplication&lt;/b&gt; and its use in a simple Spring Boot application. We use the @SpringBootApplication annotation in our Application or Main class to enable a host of features, e.g. Java-based Spring configuration, component scanning, and in particular for enabling Spring &lt;/p&gt;&lt;br /&gt;
&lt;h3 class=&quot;h3-title&quot;&gt;src/main/java/com/bank/BankApplication.java):&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

&lt;button type=&quot;button&quot; onclick=&quot;copyBankApplication(selectBankApplication)&quot; id=&quot;idBtnBankApplication&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectBankApplication&quot;&gt;

&lt;b style=&quot;color: purple;&quot;&gt;package&lt;/b&gt; com.bank;
&lt;b style=&quot;color: purple;&quot;&gt;import&lt;/b&gt; org.springframework.boot.autoconfigure.SpringBootApplication;

&lt;span style=&quot;color: #8a8787;&quot;&gt;
@SpringBootApplication&lt;/span&gt;
&lt;b style=&quot;color: purple;&quot;&gt;public class&lt;/b&gt; BankApplication {

 &lt;b style=&quot;color: purple;&quot;&gt;public static void&lt;/b&gt; main(String[] &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;) {
   SpringApplication.run(BankApplication.&lt;b style=&quot;color: purple;&quot;&gt;class&lt;/b&gt;, &lt;span style=&quot;color: sienna;&quot;&gt;args&lt;/span&gt;);		
   System.&lt;b style=&quot;color: blue;&quot;&gt;out&lt;/b&gt;.println(&lt;span style=&quot;color: blue;&quot;&gt;&quot;App started....&quot;&lt;/span&gt;);
  }
  
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;


&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Spring Boot example when building a @RestController API.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp; Spring Data JPA, as well, we are gooing to continue with Ionic project structure for building a front-end app to make HTTP requests and consume responses.&lt;/p&gt;&lt;br&gt;&lt;br&gt;


&lt;div style=&quot;background: #fff; border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring.html&quot;&gt;Building an application bank with Spring boot and Ionic part 2&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: none 0% 0% repeat scroll rgb(0, 137, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/bank-spring&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download This Application My bank From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;

&lt;style&gt;
pre:before {
   content: none;
}
pre {
background: #f1f2f6;
line-height: 20px;
position: relative;
overflow: auto;
width: 100%;
border: 1px solid #d0c6c6;
}
  
code {
 padding: 0px 0px 0 20px;
 display: block; 
 color: #000; 
 font-family: monospace; 
 font-size: 16px;
 margin-top: -30px;
}
  .h2-title {
   background: #40739e;
   border-left: 10px solid #e1b12c;
   padding: 10px !important;
    color: #f5f6fa !important;
  } 
 pre div::selection,
 b::selection,
 code::selection,
 span::-moz-selection {
  color: #ecf0f1;
  background-color: #2980b9;
   padding: 0px 16px;
}
pre div::selection,
b::selection,
code::selection,
span::selection {
  color: #ecf0f1;
  background-color: #2980b9;
  padding: 0px 16px;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
  .h3-title {
    background: #40739e !important;
    color: #f1f2f6 !important;
    margin-bottom: -15px !important; 
    padding: 10px !important;
  }
&lt;/style&gt;

&lt;script&gt;
  function copyPom(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPom&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyPro(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnPro&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAccount(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAccount&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyClient(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnClient&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCredit(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCredit&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyOperation(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnOperation&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySavingsAccount(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSavingsAccount&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyStandingAccount(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnStandingAccount&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyWithdraw(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnWithdraw&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAccountDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAccountDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyClientDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnClientDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyOperationDao(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnOperationDao&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyBankService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnBankService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyBankServiceImpl(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnBankServiceImpl&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyBankApplication(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnBankApplication&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyBankController(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnBankController&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
 
&lt;/script&gt;

</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/545076606659575267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/545076606659575267'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/545076606659575267'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/building-application-bank-with-spring.html' title='Building an application bank with Spring boot and Ionic part 1'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/mYCJesq2-vc/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-282344040357066646</id><published>2022-01-18T03:34:00.017-08:00</published><updated>2022-08-26T09:33:15.609-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><title type='text'>Build an application Ecommerce with Spring boot and Angular part 2</title><content type='html'>&lt;h1 style=&quot;background: rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;Getting Started | Building an Application with Angular&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://i.ibb.co/hBbF0ck/Screenshot-2021-01-19-at-18-44-42.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;452&quot; data-original-width=&quot;800&quot; src=&quot;https://i.ibb.co/hBbF0ck/Screenshot-2021-01-19-at-18-44-42.png&quot; style=&quot;border: 1px solid;&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;lJh35C56zII&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/lJh35C56zII&quot;&gt;&lt;/iframe&gt;

&lt;h2&gt;Angular 10 Front-end&lt;/h2&gt;
&lt;p&gt;In this tutorial We are going to build an application Ecommerce. The project content user, category, product, comment and cart for the user, we will create to parts backend use Spring boot and frontend use Angular. The admin can add, modfily and delete, the user after login can add a comment or buy products as will choose to delivery also can add to his cart. Front-end side is made with Angular 10, HTTPClient &amp;amp; Router.&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt; Technology &lt;/h2&gt;
&lt;div style=&quot;margin-left: 20px;&quot;&gt;
&lt;p&gt;Angular 10&lt;/p&gt;
&lt;p&gt;Angular HTTPClient&lt;/p&gt;
&lt;p&gt;Angular Router&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;

&lt;h2&gt;Angular CLI version (10.1.1)&lt;/h2&gt;
&lt;h2&gt;ng new&lt;/h2&gt;
&lt;p&gt;The Angular CLI makes it easy to create an application that already works, right out of the box. It already follows our best practices!&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;ng generate&lt;/h2&gt;
&lt;p&gt;Generate components, routes, services and pipes with a simple command. The CLI will also create simple test shells for all of these.&lt;/p&gt;&lt;br /&gt;

&lt;h2&gt;ng serve&lt;/h2&gt;
&lt;p&gt;Easily test your app locally while developing.&lt;/p&gt;&lt;br /&gt;

&lt;pre style=&quot;color: #f6e58d; font-weigth: bold; background: #444&quot;&gt;&lt;code style=&quot;color: #f6e58d; font-weigth: bold; background: #444&quot;&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;npm install -g @angular/cli&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng new ecommerce&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;cd ecommerce&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng serve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 style=&quot;color: #fb4834;&quot;&gt;Project Structure&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://i.ibb.co/8mx40j7/Screenshot-2021-01-22-at-18-57-48.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;800&quot; data-original-width=&quot;519&quot; src=&quot;https://i.ibb.co/8mx40j7/Screenshot-2021-01-22-at-18-57-48.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;

&lt;h2&gt;Install Bootstrap CSS framework&lt;/h2&gt;
&lt;p&gt;&lt;b style=&quot;color: blue;&quot;&gt;Bootstrap&lt;/b&gt; a framework to encourage consistency across internal tools. Before Bootstrap, various libraries were used for interface development, which led to inconsistencies and a high maintenance burden. According to Twitter developer Mark Otto:&lt;/p&gt;
&lt;p&gt;Use the following command to install bootstrap in the project.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;npm install bootstrap --save&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2&gt;Angular Material Tutorial&lt;/h2&gt;
&lt;p&gt;The idea of this is article is to teach you how to use Angular Material through a hands-on exercise. First, you will check the dependencies that you need on your computer to use and develop with Angular Material, then you will learn how to configure and use different components.&lt;/p&gt;&lt;br&gt;

&lt;h2&gt;Install Angular Material&lt;/h2&gt;
&lt;p&gt;&lt;b style=&quot;color: blue;&quot;&gt;Angular Material&lt;/b&gt; In addition to the install schematic, Angular Material comes with &lt;b&gt;several schematics&lt;/b&gt; (like nav, table, address-form, etc.) that can be used to easily generate pre-built components in your application.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng add @angular/material&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;MaterialModule&lt;/h2&gt;
&lt;p&gt;In earlier versions of Angular Material, we could import MaterialModule which imports all components from Angular Material and makes them available in our app. Most of the time we will need to import the most of material.&lt;/p&gt;&lt;br/&gt;

&lt;p&gt;src/app/material-module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyMaterialModule(selectMaterialModule)&quot; style=&quot;float: right; cursor: pointer;&quot; id=&quot;idBtnMaterialModule&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectMaterialModule&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;NgModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatAutocompleteModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/autocomplete&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatBadgeModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/badge&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatBottomSheetModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/bottom-sheet&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatButtonModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/button&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatButtonToggleModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/button-toggle&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatCardModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/card&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatCheckboxModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/checkbox&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatChipsModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/chips&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatStepperModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/stepper&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatDatepickerModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/datepicker&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatDialogModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatDividerModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/divider&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatExpansionModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/expansion&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatGridListModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/grid-list&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatIconModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/icon&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatInputModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/input&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatListModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/list&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatMenuModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/menu&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatNativeDateModule, MatRippleModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatPaginatorModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/paginator&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatProgressBarModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/progress-bar&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatProgressSpinnerModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/progress-spinner&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatRadioModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/radio&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSelectModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/select&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSidenavModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/sidenav&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSliderModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/slider&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSlideToggleModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/slide-toggle&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSnackBarModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/snack-bar&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatSortModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/sort&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTableModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/table&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTabsModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/tabs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatToolbarModule&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/toolbar&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTooltipModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/tooltip&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #66c4e8&quot;&gt;MatTreeModule &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/tree&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #66c4e8&quot;&gt;exports&lt;/span&gt;: [&lt;span style=&quot;color: #48bdad;&quot;&gt;
    MatAutocompleteModule,
    MatBadgeModule,
    MatBottomSheetModule,
    MatButtonModule,
    MatButtonToggleModule,
    MatCardModule,
    MatCheckboxModule,
    MatChipsModule,
    MatStepperModule,
    MatDatepickerModule,
    MatDialogModule,
    MatDividerModule,
    MatExpansionModule,
    MatGridListModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatMenuModule,
    MatNativeDateModule,
    MatPaginatorModule,
    MatProgressBarModule,
    MatProgressSpinnerModule,
    MatRadioModule,
    MatRippleModule,
    MatSelectModule,
    MatSidenavModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatSnackBarModule,
    MatSortModule,
    MatTableModule,
    MatTabsModule,
    MatToolbarModule,
    MatTooltipModule,
    MatTreeModule,&lt;/span&gt;
  ],
  &lt;span style=&quot;color: #66c4e8&quot;&gt;imports&lt;/span&gt;: [&lt;span style=&quot;color: #48bdad;&quot;&gt;
    MatAutocompleteModule,
    MatBadgeModule,
    MatBottomSheetModule,
    MatButtonModule,
    MatButtonToggleModule,
    MatCardModule,
    MatCheckboxModule,
    MatChipsModule,
    MatStepperModule,
    MatDatepickerModule,
    MatDialogModule,
    MatDividerModule,
    MatExpansionModule,
    MatGridListModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatMenuModule,
    MatNativeDateModule,
    MatPaginatorModule,
    MatProgressBarModule,
    MatProgressSpinnerModule,
    MatRadioModule,
    MatRippleModule,
    MatSelectModule,
    MatSidenavModule,
    MatSliderModule,
    MatSlideToggleModule,
    MatSnackBarModule,
    MatSortModule,
    MatTableModule,
    MatTabsModule,
    MatToolbarModule,
    MatTooltipModule,
    MatTreeModule,&lt;/span&gt;
  ]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;MaterialModule&lt;/span&gt; { }
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Style.css&lt;/h2&gt;
&lt;p&gt;First of all, we need to create the various entry point CSS files of course. You can just create further scss files at the level where the styles.scss is in your project.&lt;/p&gt;&lt;br/&gt;
&lt;p&gt;src/style.css&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyStyle(selectStyle)&quot; style=&quot;float: right; cursor: pointer;&quot; id=&quot;idBtnStyle&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectStyle&quot;&gt;

/* You can add global styles to this file, and also import other style files */

&lt;span style=&quot;color: #d577e6;&quot;&gt;@import&lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&quot;~bootstrap/dist/css/bootstrap.min.css&quot;&lt;/span&gt;;
&lt;span style=&quot;color: #f39c12;&quot;&gt;html&lt;/span&gt;,
&lt;span style=&quot;color: #f39c12;&quot;&gt;body&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;height&lt;/span&gt;: 100%;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;body&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #2980b9&quot;&gt;background&lt;/span&gt;: &lt;span style=&quot;color: #d577e6;&quot;&gt;linear-gradient&lt;/span&gt;(
   &lt;span style=&quot;color: #f19066;&quot;&gt;to right,
    #d1d8e0,
    #d980fa,
    #c8d6e5,
    #9980fa,
    #d1d8e0&lt;/span&gt;
  );
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-family&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;initial&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;!important&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#222f3e&lt;/span&gt;;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;.title-page&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;border-bottom&lt;/span&gt;: 1px solid;
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-family&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;initial&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;padding&lt;/span&gt;: 10px 20px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;border-radius&lt;/span&gt;: 10px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;width&lt;/span&gt;: 230px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;text-align&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;center&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#2c3e50&lt;/span&gt;;
}

&lt;span style=&quot;color: #f39c12;&quot;&gt;.container&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-top&lt;/span&gt;: 40px;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;.fa-info-circle&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#4b6584&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-size&lt;/span&gt;: 20px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;cursor&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;pointer&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-left&lt;/span&gt;: 22px;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;#btn&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;background&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#fff&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;border&lt;/span&gt;: 0;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;.modal&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;none&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;position&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;fixed&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;z-index&lt;/span&gt;: 1;
  &lt;span style=&quot;color: #2980b9&quot;&gt;padding-top&lt;/span&gt;: 100px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;left&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #2980b9&quot;&gt;top&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #2980b9&quot;&gt;width&lt;/span&gt;: 100%;
  &lt;span style=&quot;color: #2980b9&quot;&gt;height&lt;/span&gt;: 100%;
  &lt;span style=&quot;color: #2980b9&quot;&gt;overflow&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;auto&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;background-color&lt;/span&gt;: rgb(0, 0, 0);
  &lt;span style=&quot;color: #2980b9&quot;&gt;background-color&lt;/span&gt;: rgba(0, 0, 0, 0.4);
}

&lt;span style=&quot;color: #f39c12;&quot;&gt;.modal-content&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;background-color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#ffd&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin&lt;/span&gt;: auto;
  &lt;span style=&quot;color: #2980b9&quot;&gt;padding&lt;/span&gt;: 10px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;border&lt;/span&gt;: 1px solid &lt;span style=&quot;color: #f19066;&quot;&gt;#888&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;width&lt;/span&gt;: 80%;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;#price&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#c23616&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-weight&lt;/span&gt;: bold;
  &lt;span style=&quot;color: #2980b9&quot;&gt;padding&lt;/span&gt;: 10px 20px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;border&lt;/span&gt;: 1px solid &lt;span style=&quot;color: #f19066;&quot;&gt;antiquewhite&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-size&lt;/span&gt;: 16px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;inline-block&lt;/span&gt;;
}

&lt;span style=&quot;color: #f39c12;&quot;&gt;.fa-eye-slash&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-size&lt;/span&gt;: 22px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#4b6584&lt;/span&gt;;
}
&lt;span style=&quot;color: #f39c12;&quot;&gt;.btn-primary&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-size&lt;/span&gt;: 12px;
}

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Modals interfaces&lt;/h2&gt;
&lt;p&gt;The purpose of this class is to map the specified fields with the fields of Spring entity class. &lt;/p&gt;&lt;br/&gt;
&lt;p&gt;Angular NgModules differ from and complement JavaScript (ES2015) modules. An NgModule declares a compilation context for a set of components that is dedicated to an application domain, a workflow, or a closely related set of capabilities. An NgModule can associate its components with related code, such as services, to form functional units.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Every Angular app has a root module, conventionally named AppModule, which provides the bootstrap mechanism that launches the application. An app typically contains many functional modules.&lt;/p&gt;&lt;br&gt;


&lt;p&gt;src/app/Modal.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyModals(selectModals)&quot; id=&quot;idBtnModals&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectModals&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;username&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;password&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;address&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;admin&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;boolean&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;cardNumber&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;cvv&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;email&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;nameOnCard&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;price&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;quantity&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;pictureUrl&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;addedAt&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;addedBy&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;message&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;title&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
}

&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Order&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;dateCreated&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;status&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductOrder&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;quantity&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt; = &lt;span style=&quot;color: #CEFFF5;&quot;&gt;1&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;quantity&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt; = &lt;span style=&quot;color: #48bdad;&quot;&gt;product&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;quantity&lt;/span&gt; = &lt;span style=&quot;color: #48bdad;&quot;&gt;quantity&lt;/span&gt; = 1;
  }
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductOrders&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;productOrders&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductOrder&lt;/span&gt;[] = [];
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;description&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;pictureUrl&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;price&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;products&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Item&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;price&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;UpdateProduct&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;description&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;price&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;pictureUrl&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;;
}
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;ITEMS&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Item&lt;/span&gt;[] = [
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;TakAway  &#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;item_1&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;price&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;1.99&lt;/span&gt;,
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;Relay  &#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;item_2&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;price&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;2.99&lt;/span&gt;,
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;Express  &#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;item_3&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;price&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;3.99&lt;/span&gt;,
  },
  {
    &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;Direct  &#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;item_4&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #2980b9&quot;&gt;price&lt;/span&gt;: &lt;span style=&quot;color: #CEFFF5;&quot;&gt;4.99&lt;/span&gt;,
  },
];
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Angular Services&lt;/h2&gt;
&lt;p&gt;Angular services are singleton objects that get instantiated only once during the lifetime of an application. They contain methods that maintain data throughout the life of an application, i.e. data does not get refreshed and is available all the time. The main objective of a service is to organize and share business logic, models, or data and functions with different components of an Angular application.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;An example of when to use services would be to transfer data from one controller to another custom service.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;Why Should We Use Services in Angular?
The separation of concerns is the main reason why Angular services came into existence. An Angular service is a stateless object and provides some very useful functions. These functions can be invoked from any component of Angular, like Controllers, Directives, etc. This helps in dividing the web application into small, different logical units which can be reused.&lt;/p&gt;&lt;br&gt;

&lt;h2 style=&quot;background: aliceblue; border-left: 10px solid; padding: 5px 10px;&quot;&gt;Create Data services&lt;/h2&gt;
&lt;p&gt;This service will use Angular HTTPClient to send HTTP requests.
  You can see that its functions includes CRUD operations and finder method&lt;/p&gt;&lt;br/&gt;
&lt;h2&gt;Create these services in the service package &lt;/h2&gt;
&lt;b&gt;- CartService &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- CategoryService &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- CommentService &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- OrderService &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- ProductService &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- TagService &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- UserService &lt;/b&gt;&lt;br&gt;


&lt;pre&gt;&lt;code&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate service service/cart&lt;/span&gt;&lt;br&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate service service/category&lt;/span&gt;&lt;br&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate service service/comment&lt;/span&gt;&lt;br&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate service service/order&lt;/span&gt;&lt;br&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate service service/product&lt;/span&gt;&lt;br&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate service service/tag&lt;/span&gt;&lt;br&gt;
&lt;strong style=&quot;color: #c56cf0; font-weigth: bold;&quot;&gt;$ &lt;/strong&gt; &lt;span&gt;ng generate service service/user&lt;/span&gt;&lt;br&gt;&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

&lt;p&gt;src/app/service/cart.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyCartService(selectCartService)&quot; id=&quot;idBtnCartService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCartService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Cart&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;NAME_KEY&lt;/span&gt; = &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;NAME&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;CartService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;addCartToUser&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;cart&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/addCartToUser/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;}`, &lt;span style=&quot;color: #2980b9&quot;&gt;cart&lt;/span&gt;); 
  }
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;removeFromCart&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idCart&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/removeFromCart/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idCart&lt;/span&gt;}/${&lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;}`); 
   }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findCartById&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findCartById/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;deleteCart&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/deleteCart/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }

   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findCartsForUser&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findCartsForUser/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findByCartName&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findByCartName/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;}`); 
   }
   
 &lt;span style=&quot;color: #f39c12;&quot;&gt;saveCartName&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;) {
    &lt;span style=&quot;color: #2980b9&quot;&gt;window.sessionStorage&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;removeItem&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt; NAME_KEY&lt;/span&gt;);
    &lt;span style=&quot;color: #2980b9&quot;&gt;window.sessionStorage&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;setItem&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt; NAME_KEY&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;);
  }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;getCartName&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;sessionStorage&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;getItem&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt; NAME_KEY&lt;/span&gt;);
  }

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/category.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyCategoryService(selectCategoryService)&quot; id=&quot;idBtnCategoryService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCategoryService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Category&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;CategoryService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;addCategoryToUser&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Cart&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/addCategoryToUser/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;}`, &lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;editCategory&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/editCategory/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`, &lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;); 
  }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findCategoryById&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findCategoryById/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;deleteCategory&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/deleteCategory/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }

   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findCategoriesForUser&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findCategoriesForUser/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;}`); 
   }
   
   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findAllCategories&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findAllCategories/&lt;/span&gt;`); 
   }

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/comment.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyCommentService(selectCommentService)&quot; id=&quot;idBtnCommentService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCommentService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Comment&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;CommentService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;addCommentToProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;comment&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/addCommentToProduct/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;}`, &lt;span style=&quot;color: #2980b9&quot;&gt;comment&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;editComment&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;comment&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/editComment/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`, &lt;span style=&quot;color: #2980b9&quot;&gt;comment&lt;/span&gt;); 
  }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findCommentById&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findCommentById/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;deleteComment&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/deleteComment/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }

   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findCommentsForProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findCommentsForProduct/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;}`); 
   }
   
   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findAllComments&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findAllComments/&lt;/span&gt;`); 
   }

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/order.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyOrderService(selectOrderService)&quot; id=&quot;idBtnOrderService&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectOrderService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;HttpClient&lt;/span&gt;  } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt; ;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Injectable&lt;/span&gt;  } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt; ;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Subject&lt;/span&gt;  } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt; ;
&lt;span style=&quot;color: #d577e6;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ProductOrder, ProductOrders&lt;/span&gt;  } &lt;span style=&quot;color: #d577e6;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;../modal/Modal&#39;&lt;/span&gt; ;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;root&#39;&lt;/span&gt;,
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OrderService&lt;/span&gt; {
  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;ordersUrl&lt;/span&gt; = &lt;span style=&quot;color: #f19066;&quot;&gt; &#39;/api/orders&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;productOrder&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductOrder&lt;/span&gt;;
  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;orders&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductOrders&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductOrders&lt;/span&gt;();

  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;productOrderSubject&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Subject&lt;/span&gt;();
  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;ordersSubject&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Subject&lt;/span&gt;();
  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;totalSubject&lt;/span&gt; = &lt;span style=&quot;color: #d577e6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Subject&lt;/span&gt;();

  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;total&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;;

  &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductOrderChanged&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;productOrderSubject&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;asObservable&lt;/span&gt;();
  &lt;span style=&quot;color: #48bdad;&quot;&gt;OrdersChanged&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;ordersSubject&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;asObservable&lt;/span&gt;();
  &lt;span style=&quot;color: #48bdad;&quot;&gt;TotalChanged&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;totalSubject&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;asObservable&lt;/span&gt;();

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) {}

  &lt;span style=&quot;color: #f39c12;&quot;&gt;saveOrder&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;order&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductOrders&lt;/span&gt;) {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;post&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;ordersUrl&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;order&lt;/span&gt;);
  }
  &lt;span style=&quot;color: #3498db;&quot;&gt;set&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;SelectedProductOrder&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductOrder&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;productOrder&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;productOrderSubject&lt;/span&gt;.&lt;span style=&quot;color: #48bdad;&quot;&gt;next&lt;/span&gt;();
  }

  &lt;span style=&quot;color: #3498db;&quot;&gt;get&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;SelectedProductOrder&lt;/span&gt;() {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;productOrder&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #3498db;&quot;&gt;set&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;ProductOrders&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductOrders&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;orders&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt; value&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;ordersSubject&lt;/span&gt;.&lt;span style=&quot;color: #48bdad;&quot;&gt;next&lt;/span&gt;();
  }

  &lt;span style=&quot;color: #3498db;&quot;&gt;get&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;ProductOrders&lt;/span&gt;() {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;orders&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #3498db;&quot;&gt;get&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;Total&lt;/span&gt;() {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;total&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #3498db;&quot;&gt;set&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;Total&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt; value&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;total&lt;/span&gt; = &lt;span style=&quot;color: #48bdad;&quot;&gt;value&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;totalSubject&lt;/span&gt;.&lt;span style=&quot;color: #48bdad;&quot;&gt;next&lt;/span&gt;();
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/product.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyProductService(selectProductService)&quot; id=&quot;idBtnProductService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProductService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Product&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;addProductToCategory&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/addProductToCategory/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt;}`, &lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;editProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/editProduct/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`, &lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;); 
  }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findProductById&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findProductById/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;deleteProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/deleteProduct/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }

   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findProductsForCategory&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findProductsForCategory/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt;}`); 
   }
   
   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findAllProducts&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findAllProducts/&lt;/span&gt;`); 
   }
   
   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findByName&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findByName/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;deleteProductFromTag&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idTag&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/deleteProductFromTag/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;}/${&lt;span style=&quot;color: #2980b9&quot;&gt;idTag&lt;/span&gt;}`); 
   }

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/tag.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyTagService(selectTagService)&quot; id=&quot;idBtnTagService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectTagService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Product, Tag&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;TagService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;addTagToProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idTag&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/addTagToProduct/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;}/${&lt;span style=&quot;color: #2980b9&quot;&gt;idTag&lt;/span&gt;}`); 
  }
  
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;editTag&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;put&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/editTag/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`, &lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt;); 
  }
  
 &lt;span style=&quot;color: #c1bd2c;&quot;&gt;addTag&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/addTag/&lt;/span&gt;`, &lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt;); 
  }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findTagById&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findTagById/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;deleteTag&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/deleteTag/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }

   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findTagsForProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findTagsForProduct/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;}`); 
   }
   
   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findAllTags&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findAllTags/&lt;/span&gt;`); 
   }
   
   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findByName&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findByName/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;deleteProductFromTag&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idTag&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/deleteProductFromTag/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;}/${&lt;span style=&quot;color: #2980b9&quot;&gt;idTag&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findAllTagByName&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findAllTagByName/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findProductsForTag&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idTag&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findProductsForTag/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idTag&lt;/span&gt;}`); 
   }

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/service/user.service.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyUserService(selectUserService)&quot; id=&quot;idBtnUserService&quot; class=&quot;btnCopy&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUserService&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;HttpClient&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Injectable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Observable&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;User&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;USERNAME_KEY&lt;/span&gt; = &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;USERNAME&#39;&lt;/span&gt;;

 @&lt;span style=&quot;color: #48bdad;&quot;&gt;Injectable&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;providedIn&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;root&#39;&lt;/span&gt;
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;UserService&lt;/span&gt; {

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;HttpClient&lt;/span&gt;) { }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;addUser&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/addUser&lt;/span&gt;`, &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;); 
  }

  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;editUser&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;post&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/editUser/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;}`, &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;); 
  }
  
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findUserById&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findUserById/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;deleteUser&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;number&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;delete&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/deleteUser/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;}`); 
   }

   &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findAllUsers&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;[]&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;[]&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findAllUsers/&lt;/span&gt;`); 
   }
   
  &lt;span style=&quot;color: #c1bd2c;&quot;&gt;findByUsername&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;): &lt;span style=&quot;color: #48bdad;&quot;&gt;Observable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;http&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;get&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;&gt;(`&lt;span style=&quot;color: #f19066;&quot;&gt;http://localhost:8080/api/findByUsername/&lt;/span&gt;${&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;}`); 
   }
   
 &lt;span style=&quot;color: #f39c12;&quot;&gt;saveUsername&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;username&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt;) {
    &lt;span style=&quot;color: #2980b9&quot;&gt;window.sessionStorage&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;removeItem&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt; USERNAME_KEY&lt;/span&gt;);
    &lt;span style=&quot;color: #2980b9&quot;&gt;window.sessionStorage&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;setItem&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt; USERNAME_KEY&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;username&lt;/span&gt;);
  }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;getUsername&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;string&lt;/span&gt; {
   &lt;span style=&quot;color: #d577e6;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;sessionStorage&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;getItem&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt; USERNAME_KEY&lt;/span&gt;);
  }

}
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Font Awesome&lt;/h2&gt;
&lt;p&gt;Font Awesome is a font and icon toolkit based on CSS and Less. It was made by Dave Gandy for use with Bootstrap, and later was incorporated into the BootstrapCDN. Font Awesome has a 38% market share among those websites that use third-party font scripts on their platform, ranking it second place after Google Fonts.&lt;/p&gt;&lt;br&gt;

&lt;p&gt;We need to add these links in index.html&lt;/p&gt;
&lt;p&gt;src/app/index.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyIndex(selectIndex)&quot; id=&quot;idBtnIndex&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectIndex&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;link&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;rel&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;https://use.fontawesome.com/releases/v5.2.0/css/all.css&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;integrity&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;crossorigin&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;anonymous&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;link&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;rel&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css&quot;&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;h2 class=&quot;h2-title&quot;&gt;Components&lt;/h2&gt;
&lt;p&gt;The @Component decorator identifies the class immediately below it as a component class, and specifies its metadata. In the example code below, you can see that Component is just a class, with no special Angular notation or syntax at all. It&#39;s not a component until you mark it as one with the @Component decorator. &lt;/p&gt;&lt;br&gt;
&lt;p&gt;The metadata for a component tells Angular where to get the major building blocks that it needs to create and present the component and its view. In particular, it associates a template with the component, either directly with inline code, or by reference. Together, the component and its template describe a view.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;In addition to containing or pointing to the template, the @Component metadata configures, for example, how the component can be referenced in HTML and what services it requires.&lt;/p&gt;&lt;br&gt;
&lt;b&gt;- app.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- app.component.html &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- app.component.css &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;p&gt;The above files were created by default when we created new project using the angular-cli command.&lt;/p&gt;

&lt;p&gt;src/app/app.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppComponent(selectAppComponent)&quot; id=&quot;idBtnAppComponent&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppComponent&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;User, Category &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;CategoryService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../service/category.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;UserService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../service/user.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-root&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./app.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./app.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AppComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;categories&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;[];
  &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;MatDialog&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;UserService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;categoryService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;CategoryService&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findByUsername&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;getUsername&lt;/span&gt;()).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;;
    })
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;categoryService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findAllCategories&lt;/span&gt;().&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;categories&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;categories&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;categories&lt;/span&gt;;
    });
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;login&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #48bdad;&quot;&gt;LoginComponent&lt;/span&gt;);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;p&gt;src/app/app-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppComponentHtml(selectAppComponentHtml)&quot; id=&quot;idBtnAppComponentHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppComponentHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;toolbar&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;role&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;banner&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-shopping-cart&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;routerLink&lt;/span&gt;]=&quot;[&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;/dashboard&#39;&lt;/span&gt;]&quot;&gt;Welcome to your eccommerce&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;mat-button&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;matMenuTriggerFor&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;menu&quot;&lt;/span&gt;&gt;Menu &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-caret-down&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-menu&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;#menu&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;matMenu&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*mat-menu-item ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let cat of categories&quot;&lt;/span&gt;
      [&lt;span style=&quot;color: #2980b9&quot;&gt;routerLink&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;[&#39;/dsiplay-category/&#39;, cat.id]&quot;&lt;/span&gt;&gt;{{cat.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-menu&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;spacer&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;routerLink&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;[&#39;/dashboard&#39;]&quot;&lt;/span&gt;&gt;
    Home &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-home&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;routerLink&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;[&#39;/profile/&#39;, user.id]&quot;&lt;/span&gt;&gt;
    Profile &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i &lt;/span&gt;&lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-user&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;login&lt;/span&gt;()&quot; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!user&quot;&lt;/span&gt;&gt;
    login
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/app-component.css&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppComponentCss(selectAppComponentCss)&quot; id=&quot;idBtnAppComponentCss&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppComponentCss&quot;&gt;
&lt;span style=&quot;color: #f39c12;&quot;&gt;body&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-family&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;initial&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-size&lt;/span&gt;: 16px;
}

&lt;span style=&quot;color: #f39c12;&quot;&gt;.spacer&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;flex&lt;/span&gt;: 1;
}

&lt;span style=&quot;color: #f39c12;&quot;&gt;a&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin-right&lt;/span&gt;: 20px;
 &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;aliceblue&lt;/span&gt;;
}

&lt;span style=&quot;color: #f39c12;&quot;&gt;.toolbar&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;position&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;absolute&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;top&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #2980b9&quot;&gt;left&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #2980b9&quot;&gt;right&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #2980b9&quot;&gt;height&lt;/span&gt;: 60px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;flex&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;align-items&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;center&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;background-color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#1976d2&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;white&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-weight&lt;/span&gt;: 600;
}

&lt;span style=&quot;color: #f39c12;&quot;&gt;.toolbar img&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin&lt;/span&gt;: 0 16px;
}

&lt;span style=&quot;color: #f39c12;&quot;&gt;.toolbar #twitter-logo&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;height&lt;/span&gt;: 40px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin&lt;/span&gt;: 0 16px;
}

&lt;span style=&quot;color: #f39c12;&quot;&gt;.toolbar #twitter-logo:hover&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;opacity&lt;/span&gt;: 0.8;
}

&lt;span style=&quot;color: #f39c12;&quot;&gt;.fa-shopping-cart&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;font-size&lt;/span&gt;: 50px;
  &lt;span style=&quot;color: #2980b9&quot;&gt;margin&lt;/span&gt;: 10px;
}

 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a login page to login. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- login.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- login.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/login-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyLoginComponentTs(selectLoginComponentTs)&quot; id=&quot;idBtnLoginComponentTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLoginComponentTs&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;User &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;UserService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../service/user.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-login&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./login.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./login.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;LoginComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;UserService&lt;/span&gt;) {}
  
 &lt;span style=&quot;color: #c1bd2c;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;addUser&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;addUser&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;) =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;saveUsername&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;user.username&lt;/span&gt;);
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;/&#39;&lt;/span&gt;);
    });
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/login-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyLoginComponentHtml(selectLoginComponentHtml)&quot; id=&quot;idBtnLoginComponentHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectLoginComponentHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 18rem;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt;&gt;Login&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;exampleInputEmail1&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Username&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;username&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.username&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;exampleInputPassword1&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Password&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;password&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;password&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.password&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;addUser&lt;/span&gt;()&quot;&gt;Login&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a profile page to display the profile information. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- profile.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- profile.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/profile-component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyProfileComponentTs(selectProfileComponentTs)&quot; id=&quot;idBtnProfileComponentTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProfileComponentTs&quot;&gt;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Router, ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;User, Cart, Category &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;AddTagComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../admin/add-tag/add-tag.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;CategoryService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../service/category.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;UserService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../service/user.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;AddCategoryComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../admin/add-category/add-category.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;AddProductComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../admin/add-product/add-product.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;UpdateProfileComponent &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../update-profile/update-profile.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;CartService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../service/cart.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-profile&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./profile.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./profile.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;HomeComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;categories&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;[];
  &lt;span style=&quot;color: #2980b9&quot;&gt;carts&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Carts&lt;/span&gt;[];
  &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;cartLength&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;0&lt;/span&gt;;

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;UserService&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ActivatedRoute&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;MatDialog&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;categoryService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;CategoryService&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;cartService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;CartService&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Router&lt;/span&gt;
  ) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #2980b9&quot;&gt;params&lt;/span&gt;) =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;
        .&lt;span style=&quot;color: #f39c12;&quot;&gt;findByUsername&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;getUsername&lt;/span&gt;())
        .&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #2980b9;&quot;&gt;user&lt;/span&gt;) =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;;
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;cartService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findCartsForUser&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;user.id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #2980b9&quot;&gt;carts&lt;/span&gt;) =&gt; {
            &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;carts&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;carts&lt;/span&gt;;
            &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;cartLength&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;carts.length&lt;/span&gt;;
          });
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;categoryService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findAllCategories&lt;/span&gt;().&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #2980b9&quot;&gt;categories&lt;/span&gt;) =&gt; {
            &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;categories&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;categories&lt;/span&gt;;
          });
        });
    });
  }
  
&lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;logout&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #2980b9&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;/dashboard&#39;&lt;/span&gt;);
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;signOut&lt;/span&gt;();
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;addCategory&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;: &lt;span style=&quot;color: #2980b9&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #48bdad;&quot;&gt;AddCategoryComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #2980b9&quot;&gt;data&lt;/span&gt;: { &lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt; },
    });
  }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;addProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #48bdad;&quot;&gt;AddProductComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #2980b9&quot;&gt;data&lt;/span&gt;: { &lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt; },
    });
  }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;addTag&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #48bdad;&quot;&gt;AddTagComponent&lt;/span&gt;);
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;updateProfile&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #48bdad;&quot;&gt;UpdateProfileComponent&lt;/span&gt;);
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;deleteCart&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idPro&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;) {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #f39c12;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;Are you sure&#39;&lt;/span&gt;)) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;cartService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;removeFromCart&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idPro&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
        &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;reload&lt;/span&gt;();
      });
    }
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;sangleProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;navigate&lt;/span&gt;([&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;/puy/product/&#39;&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;]);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/profile-component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyProfileComponentHtml(selectProfileComponentHtml)&quot; id=&quot;idBtnProfileComponentHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProfileComponentHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-top: 40px;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-lg-4&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;background-color: #e15f41; padding: 0px; padding-left: 10px; color: wheat;&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt;&gt;Your Profile {{user.username}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group list-group-flush&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.email || user.nameOnCard || user.cardNumber&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group-item&quot;&lt;/span&gt;&gt;{{user.nameOnCard}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group-item&quot;&lt;/span&gt;&gt;{{user.email}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group-item&quot;&lt;/span&gt;&gt;{{user.address}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.admin==true&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let cat of categories&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group-item d-flex justify-content-between align-items-center&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;cursor: pointer;&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt; routerLink&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;[&#39;/profile/&#39; + user.id + &#39;/categories/&#39;, cat.id]&quot;&lt;/span&gt;
              &lt;span style=&quot;color: #2980b9&quot;&gt;routerLinkActive&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;router-link-active&quot;&lt;/span&gt;&gt; {{cat.name}}                    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-outline-primary btn-sm&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;addProduct&lt;/span&gt;(cat.id)&quot;&lt;/span&gt;&gt;Add
              product&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-danger&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;logout&lt;/span&gt;(user.id)&quot;&lt;/span&gt;&gt;Logout&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin: 0 10px;&quot;&lt;/span&gt;
          (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;updateProfile(user.id)&quot;&gt;Update&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-info&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt; click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;addCategory&lt;/span&gt;(user.id)&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt; *ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.admin&quot;&lt;/span&gt;&gt;Add
          category&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-success&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;addTag&lt;/span&gt;()&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-left: 10px;&quot;&lt;/span&gt;
          &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.admin&quot;&lt;/span&gt;&gt;Add tag&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-lg-8&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;cartLength&gt;=1&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-top: 30px;&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-accordion&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel&lt;/span&gt; hideToggle&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel-header&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-title&lt;/span&gt;&gt;
                Your product
              &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-title&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-description&lt;/span&gt;&gt;
                This is a product saved
              &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-description&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel-header&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;table&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;table&quot;&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;thead&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;tr&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;scope&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col&quot;&lt;/span&gt;&gt;Product&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;scope&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col&quot;&lt;/span&gt;&gt;Name&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;scope&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col&quot;&lt;/span&gt;&gt;Price&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;scope&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col&quot;&lt;/span&gt;&gt;Quantity&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;scope&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col&quot;&lt;/span&gt;&gt;Delete&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt;&gt;
                &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;tr&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;thead&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;tbody&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;tr&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let cart of carts&quot;&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;scope&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row&quot;&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;{{cart.pictureUrl}}&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;img-thumbnail&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 100px;&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;th&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;td&lt;/span&gt;&gt;{{cart.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;td&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;td&lt;/span&gt;&gt;{{cart.price}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;td&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;td&lt;/span&gt;&gt;{{cart.quantity}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;td&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;td&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;material-icons&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;deleteCart&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;cart.id, user.id&lt;/span&gt;)&quot;
                      &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;cursor: pointer; color: #e15f41;&quot;&lt;/span&gt;&gt;delete_forever&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;td&lt;/span&gt;&gt;
                &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;tr&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;tbody&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;table&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-accordion&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;router-outlet&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;router-outlet&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a update-profile page to update informaion. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- update-profile.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- update-profile.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/update-profile.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyUpdateProfileComponentTs(selectUpdateProfileComponentTs)&quot; id=&quot;idBtnUpdateProfileComponentTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUpdateProfileComponentTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Router &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;User &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;UserService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../service/user.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-update-profile&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./update-profile.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./update-profile.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;LoginComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;UserService&lt;/span&gt;) {}
  
 &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { 
     &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findByUsername&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;getUsername&lt;/span&gt;()).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;;
    })
 }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;updateUser&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;editUser&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;) =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;saveUsername&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;user.username&lt;/span&gt;);
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;reload&lt;/span&gt;();
    });
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/update-profile.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyUpdateProfileComponentHtml(selectUpdateProfileComponentHtml)&quot; id=&quot;idBtnUpdateProfileComponentHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectUpdateProfileComponentHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 18rem;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt;&gt;Update profile&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
      
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;exampleInputEmail1&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Username&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;username&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.username&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;exampleInputPassword1&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Password&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;password&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;password&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.password&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;exampleInputEmail1&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Card Number&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;cardNumber&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.cardNumber&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;exampleInputEmail1&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Cvv&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;cvv&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.cvv&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;exampleInputEmail1&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Name On Card&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;nameOnCard&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.nameOnCard&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;exampleInputEmail1&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Email&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;email&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.email&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      
     &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;exampleInputEmail1&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Address&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;address&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user.address&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;updateUser&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;user.id&lt;/span&gt;)()&quot;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a categories page to display informaion. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- categories.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- categories.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/admin/categories.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyCategoriesTs(selectCategoriesTs)&quot; id=&quot;idBtnCategoriesTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCategoriesTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;AddTagToProductComponent&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../add-tag-to-product/add-tag-to-product.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Product, Category, User, Tag, Comment&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../../modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;AddProductComponent&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../add-product/add-product.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;AddCategoryComponent&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../add-category/add-category.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;UserService&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../../service/user.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;MatDialog&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;CategoryService&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../../service/category.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ProductService&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../../service/product.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ActivatedRoute&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;TagService&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/tag.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;CommentService&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/comment.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-categories&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./categories.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./categories.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;CategoriesComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;products&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;[];
  &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;User&lt;/span&gt;;
 &lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;panelOpenState&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;boolean&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;tags&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;Tag&lt;/span&gt;[];
  &lt;span style=&quot;color: #2980b9&quot;&gt;comments&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Comment&lt;/span&gt;[];

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;productService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;categoryService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;CategoryService&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ActivatedRoute&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;MatDialog&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;UserService&lt;/span&gt;,
     &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;tagService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;TagService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;commentService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;CommentService&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(
      params =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;route.snapshot.params.idCategory&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;categoryService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findCategoryById&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;;
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findProductsForCategory&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;products&lt;/span&gt; =&gt; {
            &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;products&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;products&lt;/span&gt;;
          });
        })
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findByUsername&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;getUsername&lt;/span&gt;()).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;user&lt;/span&gt;;
        })
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;commentService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findAllComments&lt;/span&gt;().&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;comments&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;comments&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;comments&lt;/span&gt;;
        })
      }
    )
  }
  
  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }
 
   &lt;span style=&quot;color: #f39c12;&quot;&gt;addTag&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;AddTagToProductComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #2980b9&quot;&gt;data&lt;/span&gt;: { &lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt; }
    })
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;showTags&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tagService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findTagsForProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;tags&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tags&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;tags&lt;/span&gt;;
    })
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;deleteCategory&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;) {
    &lt;span style=&quot;color: #d577e6;&quot;&gt; if&lt;/span&gt; (&lt;span style=&quot;color: #f39c12;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;Are you sure&quot;&lt;/span&gt;)) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;categoryService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;deleteCategory&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;`/profile/${idUser}`&lt;/span&gt;)
      })
    }
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;editCategory&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #48bdad;&quot;&gt;AddCategoryComponent&lt;/span&gt;, {
    &lt;span style=&quot;color: #2980b9&quot;&gt;data&lt;/span&gt;: { &lt;span style=&quot;color: #2980b9&quot;&gt;idCategory&lt;/span&gt; }
    })
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;deleteProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idUser&lt;/span&gt;) {
     &lt;span style=&quot;color: #d577e6;&quot;&gt; if&lt;/span&gt; (&lt;span style=&quot;color: #f39c12;&quot;&gt;confirm&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;Are you sure&quot;&lt;/span&gt;)) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;deleteProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;replace&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;`/profile/${idUser}`&lt;/span&gt;)
      })
    }
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;editProduct&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #48bdad;&quot;&gt;AddProductComponent&lt;/span&gt;, {
    &lt;span style=&quot;color: #2980b9&quot;&gt;data&lt;/span&gt;: { &lt;span style=&quot;color: #2980b9&quot;&gt;idProduct&lt;/span&gt; }
    })
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;deleteComment&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;commentService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;deleteComment&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
    &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;reload&lt;/span&gt;();
    })
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/admin/categories.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyCategoriesHtml(selectCategoriesHtml)&quot; id=&quot;idBtnCategoriesHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectCategoriesHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-md-6&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div mat-card-avatar&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;{{category.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;All products for this category&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card mb-3&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let pro of products&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row g-0&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-md-4&quot;&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;{{pro.pictureUrl}}&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;alt&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;{{pro.name}}&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 150px;&quot;&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-md-8&quot;&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt;&gt;{{pro.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;color: firebrick; font-weight: bold;&quot;&lt;/span&gt;&gt;Price: {{pro.price}}
                &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-text&quot;&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;small&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text-muted&quot;&lt;/span&gt;&gt;{{pro.description}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;small&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group list-group-horizontal&quot;&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group-item&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;cursor: pointer;&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;editProduct&lt;/span&gt;(pro.id)&quot;&lt;/span&gt;&gt;Update&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group-item&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;cursor: pointer;&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;deleteProduct&lt;/span&gt;(pro.id, user.id)&quot;&lt;/span&gt;&gt;Delete
                  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
                &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-md-4&quot;&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;badge rounded-pill bg-dark&quot;&lt;/span&gt;
                &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;cursor: pointer; margin: 10px; color: aliceblue; padding: 5px 10px;&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;addTag&lt;/span&gt;(pro.id)&quot;&lt;/span&gt;&gt;
                Add Tag&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-md-8&quot;&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-accordion&lt;/span&gt;&gt;
                &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel&lt;/span&gt; hideToggle&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel-header&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;showTags(pro.id)&quot;&lt;/span&gt;&gt;
                    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-title&lt;/span&gt;&gt;
                      Tags
                    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-title&lt;/span&gt;&gt;
                    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-description&lt;/span&gt;&gt;
                      for this product
                    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-description&lt;/span&gt;&gt;
                  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel-header&lt;/span&gt;&gt;
                  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-chip-list&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;example-chip&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;cdkDropList cdkDropListOrientation&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;horizontal&quot;&lt;/span&gt;&gt;
                    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-chip&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;example-box&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;cdkDrag *ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let tag of tags&quot;&lt;/span&gt;&gt;
                      {{tag.name}}
                    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-chip&lt;/span&gt;&gt;
                  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-chip-list&lt;/span&gt;&gt;
                &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel&lt;/span&gt;&gt;
              &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-accordion&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button mat-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;editCategory&lt;/span&gt;(category.id)&quot;&lt;/span&gt;&gt;Update category&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button mat-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;accent&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;deleteCategory&lt;/span&gt;(category.id, user.id)&quot;&lt;/span&gt;&gt;Delete
          category&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-lg-md&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-left: 25px;&quot;&lt;/span&gt;&gt;Comments&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-accordion&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel&lt;/span&gt; hideToggle&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel-header&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-title&lt;/span&gt;&gt;
              Management
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-title&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-description&lt;/span&gt;&gt;
              The comments
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-panel-description&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel-header&lt;/span&gt;&gt;

          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;example-card&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let comment of comments&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-bottom: 10px;&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;mat-card-avatar class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;example-header-image&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;Added By {{comment.addedBy}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-title&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;Added At {{comment.addedBy}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-subtitle&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-header&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;{{comment.title}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 350px;&quot;&lt;/span&gt;&gt;{{comment.message}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-content&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button mat-button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;accent&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;deleteComment&lt;/span&gt;(comment.id)&quot;&lt;/span&gt;&gt;Delete&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card-actions&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;

        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-expansion-panel&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-accordion&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-card&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a add-category page to add a category. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- add-category.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- add-category.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/admin/add-category.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddCategoryTs(selectAddCategoryTs)&quot; id=&quot;idBtnAddCategoryTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddCategoryTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;CategoryService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../../service/category.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Category &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-add-category&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./add-category.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./add-category.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddCategoryComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Category&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;flase&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(@&lt;span style=&quot;color: #48bdad;&quot;&gt;Inject&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;MAT_DIALOG_DATA&lt;/span&gt;) &lt;span style=&quot;color: #3498db;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;categoryService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;CategoryService&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idCategory&lt;/span&gt; != &lt;span style=&quot;color: #d577e6;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;categoryService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findCategoryById&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idCategory&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;;
      })
    }
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;addCategory&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idCategory&lt;/span&gt; != &lt;span style=&quot;color: #d577e6;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;categoryService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;editCategory&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idCategory&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;;
        &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;reload&lt;/span&gt;();
      })
     } &lt;span style=&quot;color: #d577e6;&quot;&gt;else&lt;/span&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;categoryService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;addCategoryToUser&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idUser&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;category&lt;/span&gt;;
        &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;reload&lt;/span&gt;();
      })
    }
  }
}
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/admin/add-category.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddCategoryHtml(selectAddCategoryHtml)&quot; id=&quot;idBtnAddCategoryHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddCategoryHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 18rem;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt;&gt;Add Category&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;category&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;ngSubmit&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;addCategory&lt;/span&gt;()&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;name&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Name&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;name&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;category.name&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-primary&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a add-product page to add a product. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- add-product.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- add-product.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/admin/add-product.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddProductTs(selectAddProductTs)&quot; id=&quot;idBtnAddProductTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddProductTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;ProductService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../../service/product.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Product&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-add-product&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./add-product.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./add-product.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddProductComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Product&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;flase&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(@&lt;span style=&quot;color: #48bdad;&quot;&gt;Inject&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;MAT_DIALOG_DATA&lt;/span&gt;) &lt;span style=&quot;color: #3498db;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;productService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;ProductService&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idProduct&lt;/span&gt; != &lt;span style=&quot;color: #d577e6;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findProductById&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idProduct&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;;
      })
    }
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;addProduct&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idProduct&lt;/span&gt; != &lt;span style=&quot;color: #d577e6;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;editProduct&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idProduct&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;;
        &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;reload&lt;/span&gt;();
      })
     } &lt;span style=&quot;color: #d577e6;&quot;&gt;else&lt;/span&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;addProductToCategory&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idCategory&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;product&lt;/span&gt;;
        &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;reload&lt;/span&gt;();
      })
    }
  }
}
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/admin/add-product.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddProductHtml(selectAddProductHtml)&quot; id=&quot;idBtnAddProductHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddProductHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 18rem;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt;&gt;Add Product&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;product&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;ngSubmit&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;addProduct&lt;/span&gt;()&quot;&lt;/span&gt;&gt;
     
     &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;name&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Name&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;name&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;product.name&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;price&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Price&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;price&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;product.price&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;pictureUrl&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Photo&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;pictureUrl&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;product.pictureUrl&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;description&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Description&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;textarea&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;description&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;product.description&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;textarea&lt;/span&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-primary&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a add-tag page to add a tag. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- add-tag.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- add-tag.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/admin/add-tag.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddTagTs(selectAddTagTs)&quot; id=&quot;idBtnAddTagTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddTagTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;TagService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../../service/tag.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Tag&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-add-tag&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./add-tag.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./add-tag.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddTagComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt; = {} &lt;span style=&quot;color: #d577e6;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;;
  &lt;span style=&quot;color: #2980b9&quot;&gt;progressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;flase&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(@&lt;span style=&quot;color: #48bdad;&quot;&gt;Inject&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;MAT_DIALOG_DATA&lt;/span&gt;) &lt;span style=&quot;color: #3498db;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;tagService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;TagService&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idTag&lt;/span&gt; != &lt;span style=&quot;color: #d577e6;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tagService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findTagById&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idTag&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt;;
      })
    }
  }
  &lt;span style=&quot;color: #f39c12;&quot;&gt;addTag&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;showProgressBar&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #d577e6;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idTag&lt;/span&gt; != &lt;span style=&quot;color: #d577e6;&quot;&gt;null&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tagService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;editTag&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idTag&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt;;
        &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;reload&lt;/span&gt;();
      })
     } &lt;span style=&quot;color: #d577e6;&quot;&gt;else&lt;/span&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tagService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;addTag&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;tag&lt;/span&gt;;
        &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;reload&lt;/span&gt;();
      })
    }
  }
}
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/admin/add-product.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddTagHtml(selectAddTagHtml)&quot; id=&quot;idBtnAddTagHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddTagHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 18rem;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt;&gt;Add Tag&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;mode&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;buffer&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;progressBar&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-progress-bar&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;tag&quot;&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;ngSubmit&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;addProduct&lt;/span&gt;()&quot;&lt;/span&gt;&gt;
     
     &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;for&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;name&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-label&quot;&lt;/span&gt;&gt;Name&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;label&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;name&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #2980b9&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;tag.name&quot;&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;submit&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-primary&quot;&lt;/span&gt;&gt;Save&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a add-tag-to-product page to add a tag to product. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- add-tag-to-product.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- add-tag-to-product.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/admin/add-tag-to-product.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddTagToProTs(selectAddTagToProTs)&quot; id=&quot;idBtnAddTagToProTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddTagToProTs&quot;&gt;

&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Component, Inject, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;TagService &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./../../service/tag.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;Tag&lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #d577e6;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #2980b9&quot;&gt;MAT_DIALOG_DATA &lt;/span&gt;} &lt;span style=&quot;color: #d577e6;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #48bdad;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #2980b9&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-add-tag-to-product&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./add-tag-to-product.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #2980b9&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./add-tag-to-product.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #d577e6;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;AddTagToProductComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #48bdad;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #2980b9&quot;&gt;tags&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;Tag&lt;/span&gt;[];
  &lt;span style=&quot;color: #2980b9&quot;&gt;filterTags&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;Tag&lt;/span&gt;[];
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(@&lt;span style=&quot;color: #48bdad;&quot;&gt;Inject&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;MAT_DIALOG_DATA&lt;/span&gt;) &lt;span style=&quot;color: #3498db;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;data&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;tagService&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;TagService&lt;/span&gt;) { }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #48bdad;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tagService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findAllTags&lt;/span&gt;().&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;tags&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tags&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;tags&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tagService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;findTagsForProduct&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idProduct&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;filterTags&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;filterTags&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;filterTags&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;filterTags&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;forEach&lt;/span&gt;(t =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tags&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tags&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;filter&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;item&lt;/span&gt; =&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;item.id&lt;/span&gt; !== &lt;span style=&quot;color: #2980b9&quot;&gt;t.id&lt;/span&gt;);
        })
      })
    })
  }

  &lt;span style=&quot;color: #f39c12;&quot;&gt;selectedValue&lt;/span&gt;(&lt;span style=&quot;color: #2980b9&quot;&gt;event&lt;/span&gt;: &lt;span style=&quot;color: #48bdad;&quot;&gt;any&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;idTag&lt;/span&gt; = &lt;span style=&quot;color: #2980b9&quot;&gt;event.value&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;tagService&lt;/span&gt;.&lt;span style=&quot;color: #f39c12;&quot;&gt;addTagToProduct&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #2980b9&quot;&gt;data.idProduct&lt;/span&gt;, &lt;span style=&quot;color: #2980b9&quot;&gt;idTag&lt;/span&gt;).&lt;span style=&quot;color: #f39c12;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #2980b9&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;reload&lt;/span&gt;();
    })
  }
}
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/admin/add-tag-to-product.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAddTagToProHtml(selectAddTagToProHtml)&quot; id=&quot;idBtnAddTagToProHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAddTagToProHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card&quot;&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 18rem;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;appearance&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fill&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;Choose a tags&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-label&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-select&lt;/span&gt; (&lt;span style=&quot;color: #2980b9&quot;&gt;selectionChange&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f39c12;&quot;&gt;selectedValue&lt;/span&gt;($event)&quot;&lt;/span&gt;&gt;&lt;span style=&quot;color: #f19066;&quot;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;mat-option&lt;/span&gt; &lt;span style=&quot;color: #2980b9&quot;&gt;*ngFor&lt;/span&gt;=&quot;let tag of tags&quot;&lt;/span&gt; [&lt;span style=&quot;color: #2980b9&quot;&gt;value&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;tag.id&quot;&lt;/span&gt;&gt;
          {{tag.name}}
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-option&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-select&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;mat-form-field&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Angular 10 Backend, We have been building the part of Admin &lt;/p&gt;
&lt;p&gt;In the next part we will continue to build user part.&lt;/p&gt;&lt;br&gt;&lt;br&gt;

&lt;div style=&quot;background: #fff; border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/build-application-ecommerce-with-spring_23.html&quot;&gt;Build an application Ecommerce with Spring boot and Angular part 3&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: none 0% 0% repeat scroll rgb(0, 137, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/ecommerce-angular&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download This Application Ecommerce From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;


&lt;br /&gt;
&lt;style&gt; 
 pre:before {
   content: none;
  }
  pre {
   background-color: #fff;
   border-radius: 7px;
   line-height: 20px; 
   position: relative;
   overflow: auto;
   width: 100%;
  }
  
  code {
  color: #000;
  font-size: 13px;
  background-color: #fff;
  padding: 3px 10px 20px;
  }
 div::-moz-selection,
 b::-moz-selection,
 strong::-moz-selection,
 code::-moz-selection,
 span::-moz-selection {
  color: #000;
  background-color: #fff;
}
div::selection,
strong::selection,
b::selection,
code::selection,
span::selection {
  color: #000;
  background-color: #fff;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
  .h2-title {
    background: #f9ca24; 
    border-left: 10px solid; 
    padding: 10px !important;
  }
&lt;/style&gt;


&lt;script&gt;
  function copyMaterialModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnMaterialModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyStyle(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnStyle&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyModals(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnModals&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCartService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCartService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCategoryService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCategoryService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCommentService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCommentService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyOrderService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnOrderService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProductService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProductService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyTagService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnTagService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUserService(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUserService&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppComponent(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppComponent&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppComponentHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppComponentHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyIndex(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnIndex&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAppComponentCss(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppComponentCss&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLoginComponentTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLoginComponentTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyLoginComponentHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnLoginComponentHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProfileComponentTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProfileComponentTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}  
  function copyProfileComponentHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProfileComponentHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUpdateProfileComponentTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUpdateProfileComponentTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyUpdateProfileComponentHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnUpdateProfileComponentHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCategoriesTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCategoriesTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyCategoriesHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnCategoriesHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddCategoryHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddCategoryHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddCategoryHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddCategoryHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddProductTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddProductTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddProductHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddProductHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddTagTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddTagTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddTagHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddTagHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddTagToProTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddTagToProTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyAddTagToProHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAddTagToProHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/282344040357066646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/build-application-ecommerce-with-spring_18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/282344040357066646'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/282344040357066646'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/build-application-ecommerce-with-spring_18.html' title='Build an application Ecommerce with Spring boot and Angular part 2'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/lJh35C56zII/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1477003560702602309.post-9009349415476049089</id><published>2022-01-18T03:34:00.014-08:00</published><updated>2022-08-26T09:27:36.757-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><title type='text'>Build an application Ecommerce with Spring boot and Angular part 3</title><content type='html'>&lt;h1 style=&quot;background: rgb(255, 118, 0); border-radius: 10px; padding: 10px;&quot;&gt;In this part we will continue to build user part.&lt;/h1&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://i.ibb.co/hBbF0ck/Screenshot-2021-01-19-at-18-44-42.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;452&quot; data-original-width=&quot;800&quot; src=&quot;https://i.ibb.co/hBbF0ck/Screenshot-2021-01-19-at-18-44-42.png&quot; style=&quot;border: 1px solid;&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;iframe class=&quot;BLOG_video_class&quot; allowfullscreen=&quot;&quot; youtube-src-id=&quot;lJh35C56zII&quot; width=&quot;720&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/lJh35C56zII&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;We are going to create a orders page. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- orders.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- orders.component.html &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- orders.component.css &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/ecommerce/orders.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyOrdersTs(selectOrdersTs)&quot; id=&quot;idBtnOrdersTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectOrdersTs&quot;&gt;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Subscription &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;.rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProductOrders, User &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/modal/Modal&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;OrderService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/order.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;UserService&lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/user.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;UpdateProfileComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/update-profile/update-profile.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #000&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-orders&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./orders.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./orders.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OrdersComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;orders&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductOrders&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;User&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;User&lt;/span&gt;();
  &lt;span style=&quot;color: #000&quot;&gt;total&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;paid&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;sub&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;Subscription&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;hideUpdateMessage&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;username&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;email&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;password&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;nameOnCard&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;cardNumber&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;cvv&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;  
  &lt;span style=&quot;color: #000&quot;&gt;address&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;errorMessage&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;hideDiv&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;newDate&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;Date&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;hideItem&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;boolean&lt;/span&gt;;
  
  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;orderService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;OrderService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;UserService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;MatDialog&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orders&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService&lt;/span&gt;.&lt;span style=&quot;color: #c0392b;&quot;&gt;ProductOrders&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findByUsername&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;getUsername&lt;/span&gt;()).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt;;
      if (&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;nameOnCard&lt;/span&gt; != &lt;span style=&quot;color: #3498db;&quot;&gt;null&lt;/span&gt; || &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cardNumber&lt;/span&gt; || &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cvv&lt;/span&gt; || &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;address&lt;/span&gt;) {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;nameOnCard&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;user.nameOnCard&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cardNumber&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;user.cardNumber&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cvv&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;user.cvv&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;address&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;user.address&lt;/span&gt;;
      }
    })
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;sub&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService&lt;/span&gt;.&lt;span style=&quot;color: #000;&quot;&gt;OrdersChanged&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orders&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService&lt;/span&gt;.&lt;span style=&quot;color: #000;&quot;&gt;ProductOrders&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400&quot;&gt;loadTotal&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;newDate&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;Date&lt;/span&gt;();
  }
  
   &lt;span style=&quot;color: #d35400;&quot;&gt;pay&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;paid&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;hideDiv&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;saveOrder&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orders&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;();
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;loadTotal&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;sub&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;TotalChanged&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;total&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;Total&lt;/span&gt;;
    });
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;goToHome&lt;/span&gt;() {
    &lt;span style=&quot;color: #000&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;reload&lt;/span&gt;();
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;goToUpdateProfile&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;idUser&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;hideUpdateMessage&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #c0392b;&quot;&gt;UpdateProfileComponent&lt;/span&gt;, {
      &lt;span style=&quot;color: #000&quot;&gt;data&lt;/span&gt;: { &lt;span style=&quot;color: #000&quot;&gt;idUser&lt;/span&gt; }
    })
  }

} 
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/ecommerce/orders.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyOrdersHtml(selectOrdersHtml)&quot; id=&quot;idBtnOrdersHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectOrdersHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&quot;(user | &lt;span style=&quot;color: #d35400;&quot;&gt;json&lt;/span&gt;) != &#39;{}&#39; || &lt;span style=&quot;color: #000&quot;&gt;user.nameOnCard&lt;/span&gt; || &lt;span style=&quot;color: #000&quot;&gt;user.address&lt;/span&gt; || &lt;span style=&quot;color: #000&quot;&gt;user.cardNumber&lt;/span&gt; || &lt;span style=&quot;color: #000&quot;&gt;user.email&lt;/span&gt; || &lt;span style=&quot;color: #000&quot;&gt;user.cvv&lt;/span&gt;; &lt;span style=&quot;color: #000&quot;&gt;else loggedOut&lt;/span&gt;&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;columns&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;hideDiv&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;cart-imgs&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!paid&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;img-thumbnail&quot;&lt;/span&gt;
            &lt;span style=&quot;color: #000&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;http://www.pret-pas-cher.fr/wp-content/uploads/2015/01/carte-mastercard.png&quot;&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;img-thumbnail&quot;&lt;/span&gt;
            &lt;span style=&quot;color: #000&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;https://www.techno-finance.fr/wp-content/uploads/2018/10/2000px-Visa_Electron.svg.png&quot;&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text-center&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!paid&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;role&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;alert&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;alert alert-primary&quot;&lt;/span&gt;&gt;ORDER&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!paid&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;bill&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let order of orders.productOrders&quot;&lt;/span&gt;&gt;
        {{ &lt;span style=&quot;color: #000&quot;&gt;order.product.name&lt;/span&gt; }} - ${{ &lt;span style=&quot;color: #000&quot;&gt;order.product.price&lt;/span&gt; }} x {{ &lt;span style=&quot;color: #000&quot;&gt;order.quantity&lt;/span&gt;}} pcs.
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;role&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;alert&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;alert alert-danger&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!paid&quot;&lt;/span&gt;&gt;Total amount: ${{ &lt;span style=&quot;color: #000&quot;&gt;total&lt;/span&gt; }}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-primary btn-block&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;pay&lt;/span&gt;()&quot; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!paid&quot;&lt;/span&gt;&gt;Pay&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;paid&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;columns&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;price&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;header&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;role&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;alert&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;alert alert-success&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-bottom: 1px;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;Congratulation!&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt; You successfully made the order. &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;Bill is&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;grey&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;color: #c0392b&quot;&lt;/span&gt;&gt;Total amount: ${{ total }} With delivry&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt; {{&lt;span style=&quot;color: #000&quot;&gt;newDate&lt;/span&gt; | &lt;span style=&quot;color: #d35400;&quot;&gt;date&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;yyyy-MM-dd hh:mm&#39;&lt;/span&gt; }} &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;grey&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;cursor: pointer; color: #FFF&quot;&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;goToHome&lt;/span&gt;()&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt;&gt;Finished&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ng-template&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;#loggedOut&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;alert alert-warning&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-top: 15px;&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;hideUpdateMessage&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;You must update your profile!&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt; To complete your chopping.
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-success&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;goToUpdateProfile&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;user.id&lt;/span&gt;)&quot;&lt;/span&gt;&gt;Update&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ng-template&lt;/span&gt;&gt;
  
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/ecommerce/orders.component.css&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyOrdersCss(selectOrdersCss)&quot; id=&quot;idBtnOrdersCss&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectOrdersCss&quot;&gt;

&lt;span style=&quot;color: #d35400;&quot;&gt; .container&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;padding-top&lt;/span&gt;: 65px;
}
&lt;span style=&quot;color: #d35400;&quot;&gt; #cart-imgs&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;display&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;flex&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;margin-top&lt;/span&gt;: 10px;
  &lt;span style=&quot;color: #000&quot;&gt;padding-left&lt;/span&gt;: 42px;
}
&lt;span style=&quot;color: #d35400;&quot;&gt; #cart-imgs img&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;height&lt;/span&gt;: 120px;
  &lt;span style=&quot;color: #000&quot;&gt;width&lt;/span&gt;: 250px;
  &lt;span style=&quot;color: #000&quot;&gt;margin-left&lt;/span&gt;: 10px;
}
* {
  &lt;span style=&quot;color: #000&quot;&gt;box-sizing&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;border-box&lt;/span&gt;;
}
&lt;span style=&quot;color: #d35400;&quot;&gt; #bill&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;border&lt;/span&gt;: 1px solid &lt;span style=&quot;color: #f19066;&quot;&gt;#f0f0f0&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;padding&lt;/span&gt;: 10px 24px;
  &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#2c3e50&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;margin&lt;/span&gt;: 0px &lt;span style=&quot;color: #f19066;&quot;&gt;!important&lt;/span&gt;;
}
&lt;span style=&quot;color: #d35400;&quot;&gt; .columns&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;float&lt;/span&gt;: left;
  &lt;span style=&quot;color: #000&quot;&gt;width&lt;/span&gt;: 100%;
  &lt;span style=&quot;color: #000&quot;&gt;margin-left&lt;/span&gt;: 4px;
  &lt;span style=&quot;color: #000&quot;&gt;background&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;antiquewhite&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;padding&lt;/span&gt;: 10px;
  &lt;span style=&quot;color: #000&quot;&gt;margin-top&lt;/span&gt;: 20px;
  &lt;span style=&quot;color: #000&quot;&gt;border-radius&lt;/span&gt;: 5px;
}
&lt;span style=&quot;color: #d35400;&quot;&gt; .price&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;list-style-type&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;none&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;border&lt;/span&gt;: 1px solid &lt;span style=&quot;color: #f19066;&quot;&gt;#eee&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;margin&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #000&quot;&gt;padding&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #000&quot;&gt;-webkit-transition&lt;/span&gt;: 0.3s;
  &lt;span style=&quot;color: #000&quot;&gt;transition&lt;/span&gt;: 0.3s;
}
&lt;span style=&quot;color: #d35400;&quot;&gt; .price:hover&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;box-shadow&lt;/span&gt;: 0 8px 12px 0 &lt;span style=&quot;color: #CEFFF5;&quot;&gt;rgba&lt;/span&gt;(0, 0, 0, 0.2);
}
&lt;span style=&quot;color: #d35400;&quot;&gt; .price .header&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;font-size&lt;/span&gt;: 25px;
}
&lt;span style=&quot;color: #d35400;&quot;&gt; .price li&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;border-bottom&lt;/span&gt;: 1px solid &lt;span style=&quot;color: #f19066;&quot;&gt;#eee&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;padding&lt;/span&gt;: 20px;
  &lt;span style=&quot;color: #000&quot;&gt;text-align&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;center&lt;/span&gt;;
}
&lt;span style=&quot;color: #d35400;&quot;&gt; .price .grey&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;background-color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#ecf0f1&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;font-size&lt;/span&gt;: 20px;
}
&lt;span style=&quot;color: #d35400;&quot;&gt; .button&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;background-color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#4caf50&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;border&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;none&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;white&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;padding&lt;/span&gt;: 10px 25px;
  &lt;span style=&quot;color: #000&quot;&gt;text-align&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;center&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;text-decoration&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;none&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;font-size&lt;/span&gt;: 18px;
  &lt;span style=&quot;color: #000&quot;&gt;border-radius&lt;/span&gt;: 5px;
}
&lt;span style=&quot;color: #8e44ad;&quot;&gt;@media&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt; only screen and&lt;/span&gt; (&lt;span style=&quot;color: #d35400;&quot;&gt; max-width&lt;/span&gt;: 600px) {
  &lt;span style=&quot;color: #d35400;&quot;&gt; .columns&lt;/span&gt; {
    &lt;span style=&quot;color: #000&quot;&gt;width&lt;/span&gt;: 100%;
  }
}
&lt;span style=&quot;color: #d35400;&quot;&gt; .alert-primary&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;margin&lt;/span&gt;: 20px 0px 0px 0px &lt;span style=&quot;color: #f19066;&quot;&gt;!important&lt;/span&gt;;
}
&lt;span style=&quot;color: #d35400;&quot;&gt; .alert-danger&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;margin&lt;/span&gt;: 0px &lt;span style=&quot;color: #f19066;&quot;&gt;!important&lt;/span&gt;;
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a products page. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- products.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- products.component.html &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- products.component.css &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/ecommerce/products.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyProductsTs(selectProductsTs)&quot; id=&quot;idBtnProductsTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProductsTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Router &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;User,ProductOrder, Product, ProductOrders &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;MatDialog &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/material/dialog&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;LoginComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/login/login.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;OrderService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/order.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProductService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/product.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;UserService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/user.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Subscription &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #000&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-products&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./products.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./products.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductsComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;productOrders&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductOrder&lt;/span&gt;[] = [];
  &lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;[] = [];
  &lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;User&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;User&lt;/span&gt;();
  &lt;span style=&quot;color: #000&quot;&gt;selectedProductOrder&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;ProductOrder&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;shoppingCartOrders&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;ProductOrders&lt;/span&gt;;  
  &lt;span style=&quot;color: #000&quot;&gt;sub&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;Subscription&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;productSelected&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;description&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;showBtn&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;-1&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;idCart&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;  

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;orderService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;OrderService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;router&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Router&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;MatDialog&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;UserService&lt;/span&gt;) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findByUsername&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;getUsername&lt;/span&gt;()).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt;;
      });
  }

&lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { 
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productOrders&lt;/span&gt; = [];
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;loadProducts&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;loadOrders&lt;/span&gt;();
}

  &lt;span style=&quot;color: #d35400;&quot;&gt;addToCart&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;order&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductOrder&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;idUser&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.SelectedProductOrder&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;order&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;selectedProductOrder&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.SelectedProductOrder&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productSelected&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;true&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;removeFromCart&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;productOrder&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductOrder&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;idUser&lt;/span&gt;) {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;index&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;getProductIndex&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;productOrder.product&lt;/span&gt;);
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;index&lt;/span&gt; &gt; -1) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;shoppingCartOrders.productOrders&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;splice&lt;/span&gt;(
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;getProductIndex&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;productOrder.product&lt;/span&gt;), 1);
    }
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.ProductOrders&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;shoppingCartOrders&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;shoppingCartOrders&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.ProductOrders&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productSelected&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;false&lt;/span&gt;;
  }

    &lt;span style=&quot;color: #d35400;&quot;&gt;getProductIndex&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;): &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.ProductOrders.productOrders&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findIndex&lt;/span&gt;(
      &lt;span style=&quot;color: #000&quot;&gt;value&lt;/span&gt; =&gt; &lt;span style=&quot;color: #000&quot;&gt;value.product&lt;/span&gt; === &lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;);
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;isProductSelected&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;): &lt;span style=&quot;color: #c0392b;&quot;&gt;boolean&lt;/span&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;getProductIndex&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;) &gt; -1;
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;loadProducts&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findAllProducts&lt;/span&gt;().&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(
      (&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;: &lt;span style=&quot;color: #000&quot;&gt;any&lt;/span&gt;[]) =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;forEach&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productOrders&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;push&lt;/span&gt;(&lt;span style=&quot;color: #8e44ad;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;ProductOrder&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;, 0));
        })
      }
    );
  }
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/ecommerce/products.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyProductsHtml(selectProductsHtml)&quot; id=&quot;idBtnProductsHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectProductsHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row card-deck&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-lg-4 col-md-6 mb-4&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let order of productOrders; let i = index&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card text-center&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-header&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;background-color: #bdc3c7&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h4&lt;/span&gt;&gt;{{ &lt;span style=&quot;color: #000&quot;&gt;order.product.name&lt;/span&gt; }}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h4&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;sngleProduct&lt;/span&gt;(order.product.id)&quot;&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-img-top img-thumbnail&quot;&lt;/span&gt;
            &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 230px; height: 300px; cursor: pointer&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;{{ &lt;span style=&quot;color: #000&quot;&gt;order.product.pictureUrl&lt;/span&gt; }}&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;alt&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;image&quot;&lt;/span&gt; /&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;price&quot;&lt;/span&gt;&gt;
          Price = {{ order.product.price }}&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-dollar-sign&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;Information&quot;&lt;/span&gt; id=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;(click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;showUndoBtn&lt;/span&gt;(i)&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #000&quot;&gt;productInfo&lt;/span&gt;(order.product.id)&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-info-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;View&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;sngleProduct&lt;/span&gt;(order.product.id)&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-eye-slash&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;modal&quot;&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;attr.id&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;undoBtn&#39;&lt;/span&gt; + i&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;showBtn&lt;/span&gt; === i &amp;&amp; &lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;editBtn&quot;&lt;/span&gt;
          &lt;span style=&quot;color: #3498db;&quot;&gt;md-raised-button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;primary&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;modal-content&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;{{ description }}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-top: 0px !important; margin-bottom: 10px !important&quot;&lt;/span&gt;/&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-5 padding-0&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;!isProductSelected&lt;/span&gt;(order.product)&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-left: 15px&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;number&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;min&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;max&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;10&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #000&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;order.quantity&quot;&lt;/span&gt;/&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-5 padding-0&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;!isProductSelected&lt;/span&gt;(order.product)&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-primary&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;addToCart(order)&quot;&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;order.quantity&lt;/span&gt; &amp;lt;= 0&quot;&gt;
              Puy Now
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-12&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;isProductSelected&lt;/span&gt;(order.product)&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-danger btn-block active&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;removeFromCart&lt;/span&gt;(order)&quot;&lt;/span&gt;&gt;
              Remove From Cart
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!user&quot;&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;Please login to buy product&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-link&quot;&lt;/span&gt;
                  (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;login&lt;/span&gt;()&quot;&gt;Login&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt; &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a sangle-product page. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- sangle-product.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- sangle-product.component.html &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- sangle-product.component.scss &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/ecommerce/sangle-product.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copySangleProductTs(selectSangleProductTs)&quot; id=&quot;idBtnSangleProductTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSangleProductTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Component, Input, OnInit, ViewChild&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProductOrder, Product, ProductOrders, UpdateProduct, Tag, User, Comment, Cart  &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Subscription &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;LoginComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/login/login.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;CartService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/cart.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;CommentService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/comment.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;OrderService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/order.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProductService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/product.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;TagService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/tag.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;UserService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;src/app/service/user.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;OrdersComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../orders/orders.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ShoppingCartComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../shopping-cart/shopping-cart.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #000&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-sangle-product&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./sangle-product.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./sangle-product.component.scss&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;HomeComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;productOrders&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductOrder&lt;/span&gt;[] = [];
  &lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;[] = []; 
  &lt;span style=&quot;color: #000&quot;&gt;tags&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Tag&lt;/span&gt;[] = []; 
  &lt;span style=&quot;color: #000&quot;&gt;comments&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Comment&lt;/span&gt;[] = [];  
  &lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;User&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;User&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;comment&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Comment&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Comment&lt;/span&gt;;  
  &lt;span style=&quot;color: #000&quot;&gt;cartExist&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Cart&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Cart&lt;/span&gt;;    
  &lt;span style=&quot;color: #000&quot;&gt;cart&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Cart&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Cart&lt;/span&gt;;    
  &lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;selectedProductOrder&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;ProductOrder&lt;/span&gt;;  
  &lt;span style=&quot;color: #000&quot;&gt;shoppingCartOrders&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;ProductOrders&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;sub&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;Subscription&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;productSelected&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;  
  &lt;span style=&quot;color: #000&quot;&gt;collapsed&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;  
  &lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;  
  &lt;span style=&quot;color: #000&quot;&gt;showBtn&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;-1&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;submitted&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;  
  &lt;span style=&quot;color: #000&quot;&gt;idProduct&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;UpdateProduct&lt;/span&gt;;  

  &lt;span style=&quot;color: #c0392b;&quot;&gt;@ViewChild&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;shoppingCartC&#39;&lt;/span&gt;)
  &lt;span style=&quot;color: #000&quot;&gt;shoppingCartC&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ShoppingCartComponent&lt;/span&gt;;

  &lt;span style=&quot;color: #c0392b;&quot;&gt;@ViewChild&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;ordersC&#39;&lt;/span&gt;)
  &lt;span style=&quot;color: #000&quot;&gt;ordersC&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;OrdersComponent&lt;/span&gt;;

  &lt;span style=&quot;color: #000&quot;&gt;description&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;string&lt;/span&gt; = &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;&#39;&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;

  &lt;span style=&quot;color: #000&quot;&gt;counter&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt; = 1;
  &lt;span style=&quot;color: #c0392b;&quot;&gt;@Input&lt;/span&gt;() &lt;span style=&quot;color: #000&quot;&gt;url&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;location.href&lt;/span&gt;;
  
 &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;tagService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;TagService&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;orderService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;OrderService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ActivatedRoute&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;userService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;UserService&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;commentService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;CommentService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;dialog&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;MatDialog&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;cartService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;CartService&lt;/span&gt;) {

  }

&lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { 
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;loadOrders&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;sangleProduct&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findByUsername&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;userService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;getUsername&lt;/span&gt;()).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;user&lt;/span&gt;;
    })
}

  &lt;span style=&quot;color: #d35400;&quot;&gt;addToCart&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;order&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductOrder&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;idUser&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.SelectedProductOrder&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;order&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;selectedProductOrder&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.SelectedProductOrder&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productSelected&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cart.name&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;order.product.name&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cart.price&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;order.product.price&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cart.quantity&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;order.quantity&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cart.pictureUrl&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;order.product.pictureUrl&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cartService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;addCartToUser&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cart&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;idUser&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;cart&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cart&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;cart&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cartService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;saveCartName&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cart.name&lt;/span&gt;);
    })
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;removeFromCart&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;productOrder&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductOrder&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;idUser&lt;/span&gt;) {
  &lt;span style=&quot;color: #3498db;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;index&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;getProductIndex&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;productOrder.product&lt;/span&gt;);
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;index&lt;/span&gt; &gt; -1) {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;shoppingCartOrders.productOrders&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;splice&lt;/span&gt;(
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;getProductIndex&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;productOrder.product&lt;/span&gt;), 1);
      &lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cartService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;getCartName&lt;/span&gt;();
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cartService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findCartsForUser&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;idUser&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;carts&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cartExist&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;carts&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;filter&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;item&lt;/span&gt; =&gt; &lt;span style=&quot;color: #000&quot;&gt;item.name&lt;/span&gt; === &lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt;)[0];
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cartService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;removeFromCart&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;cartExist.id&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;idUser&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
        })
      })
    }
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.ProductOrders&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;shoppingCartOrders&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;shoppingCartOrders&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.ProductOrders&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productSelected&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;getProductIndex&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;): &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.ProductOrders.productOrders&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findIndex&lt;/span&gt;(
      &lt;span style=&quot;color: #000&quot;&gt;value&lt;/span&gt; =&gt; &lt;span style=&quot;color: #000&quot;&gt;value.product&lt;/span&gt; === &lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;);
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;isProductSelected&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;): &lt;span style=&quot;color: #c0392b;&quot;&gt;boolean&lt;/span&gt; {
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;getProductIndex&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;) &gt; -1;
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;loadOrders&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;sub&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.OrdersChanged&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;shoppingCartOrders&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;ProductOrders&lt;/span&gt;;
    });
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;toggleCollapsed&lt;/span&gt;(): &lt;span style=&quot;color: #c0392b;&quot;&gt;void&lt;/span&gt; {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;collapsed&lt;/span&gt; = !&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;collapsed&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;finishOrder&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;boolean&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;reset&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productOrders&lt;/span&gt; = [];
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.ProductOrders.productOrders&lt;/span&gt; = [];
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;loadOrders&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productSelected&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;shoppingCartC&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reset&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;ordersC.paid&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  }
 
  &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;sangleProduct&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;UpdateProduct&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;idProduct&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;route.snapshot.params.idProduct&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;tagService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findTagsForProduct&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;idProduct&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;tags&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;tags&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;tags&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;commentService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findCommentsForProduct&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;idProduct&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;comments&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;comments&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;comments&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findProductById&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;idProduct&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;data&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;data.name&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findByName&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;[]) =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;forEach&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productOrders&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;push&lt;/span&gt;(&lt;span style=&quot;color: #8e44ad;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductOrder&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;, 0));
        });
      });
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;submitted&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    });
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;addComment&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;idProduct&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;username&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;comment&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;addedBy&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;username&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;commentService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;addCommentToProduct&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;comment&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;idProduct&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;comment&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;comment&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;comment&lt;/span&gt;;
      &lt;span style=&quot;color: #000&quot;&gt;window.location&lt;/span&gt;.&lt;span style=&quot;color: #c1bd2c;&quot;&gt;reload&lt;/span&gt;();
    })
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;login&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;dialog&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #c0392b;&quot;&gt;LoginComponent&lt;/span&gt;);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/ecommerce/sangle-product.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copySangleProductHtml(selectSangleProductHtml)&quot; id=&quot;idBtnSangleProductHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSangleProductHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;container&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let order of productOrders let i = index;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col&quot;&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;hidden&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;orderFinished&quot;&lt;/span&gt;&gt;

      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;pricing-table&quot;&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;pricing-item pricing-featured&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;selected&#39;&lt;/span&gt;&gt;Recomend&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;pricing-title&quot;&lt;/span&gt;&gt;
            Product
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;pricing-value&quot;&lt;/span&gt;&gt;R${{&lt;span style=&quot;color: #000&quot;&gt;order.product.price&lt;/span&gt;}}.&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;smallText&quot;&lt;/span&gt;&gt;90&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;pricing-features&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;keywords&quot;&lt;/span&gt;&gt;Name&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt; {{&lt;span style=&quot;color: #000&quot;&gt;order.product.name&lt;/span&gt;}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;Description &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;br&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
                {{&lt;span style=&quot;color: #000&quot;&gt;order.product.description&lt;/span&gt;}}
                Lorem ipsum, dolor sit amet consectetur adipisicing elit. Nisi hic fugit inventore saepe
                optio quidem sunt, molestiae voluptate doloribus accusantium corporis quisquam veritatis
                tempora, similique consequuntur distinctio dicta error esse?
              &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt;&gt;

          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!isProductSelected(order.product)&quot;&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;addToCartBtn&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn-block&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;addToCart&lt;/span&gt;(order,  user.id)&quot;&lt;/span&gt;&gt;Add To Cart
              &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;isProductSelected&lt;/span&gt;(order.product)&quot;&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-danger btn-block active&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;removeFromCart&lt;/span&gt;(order,  user.id)&quot;&lt;/span&gt;&gt;Remove From Cart
              &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!user&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;Please login to buy product&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-link&quot;&lt;/span&gt;
                (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;login&lt;/span&gt;()&quot;&lt;/span&gt;&gt;Login&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt; &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
     &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col&quot;&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;hidden&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;orderFinished&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-img-top img-thumbnail&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 100%; height: 570px&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;src&lt;/span&gt;={{&lt;span style=&quot;color: #000&quot;&gt;order.product.pictureUrl&lt;/span&gt;}}
        &lt;span style=&quot;color: #000&quot;&gt;alt&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;image&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;!isProductSelected&lt;/span&gt;(order.product)&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;hidden&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;tabindex&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;min&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;1&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;max&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;1&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #000&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;order.quantity&quot;&lt;/span&gt; /&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group list-group-horizontal-sm&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group-item&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let tag of tags&quot;&lt;/span&gt;
          &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-left: 5px; margin-left: 5px; margin-top: 10px; padding: 5px 10px;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;routerLink&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;[&#39;/display-tag/&#39;, tag.id]&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;cursor: pointer; color: blue;&quot;&lt;/span&gt;&gt;{{tag.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;padding-right: 34px;&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-top: 5px;&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;app-shopping-cart&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;onOrderFinished&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;finishOrder&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;$event&lt;/span&gt;) &lt;span style=&quot;color: #000&quot;&gt;#shoppingCartC&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;hidden&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;orderFinished&quot;&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;app-shopping-cart&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;app-orders&lt;/span&gt;&lt;span style=&quot;color: #000&quot;&gt; #ordersC&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;hidden&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!orderFinished&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;app-orders&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
   &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;border: 1px solid #ddd;&quot;&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;container&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-bottom: 50px;&quot;&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;hidden&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;orderFinished&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;info-comment&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;&amp;lt;strong&gt;Comments &amp;lt;/strong&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card col-md-8&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;user&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;Title&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;title&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #000&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;comment.title&quot;&lt;/span&gt;&gt;
       &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;mb-3&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;textarea&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;rows&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;3&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;Message&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;message&quot;&lt;/span&gt;
            [(&lt;span style=&quot;color: #000&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;comment.message&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;textarea&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;addComment&lt;/span&gt;(idProduct, user.username)&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-primary&quot;&lt;/span&gt;&gt;Add comment&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;form&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card col-md-8&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!user&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;info-comment&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;Please login to add Comment &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-link&quot;&lt;/span&gt;
            (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;login&lt;/span&gt;()&quot;&lt;/span&gt;&gt;Login&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt; &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;container-comment&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let item of comments&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;https://png.pngtree.com/png-vector/20190710/ourlarge/pngtree-user-vector-avatar-png-image_1541962.jpg&quot;&lt;/span&gt;
      &lt;span style=&quot;color: #000&quot;&gt;alt&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;Avatar&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width:90px&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;{{item.addedBy}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt; {{item.addedAt | date}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt;{{item.title}}: &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;strong&lt;/span&gt;&gt; {{item.message}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;p&lt;/span&gt;&gt;
 &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/ecommerce/sangle-product.component.scss&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copySangleProductScss(selectSangleProductScss)&quot; id=&quot;idBtnSangleProductScss&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectSangleProductScss&quot;&gt;
&lt;span style=&quot;color: #d35400;&quot;&gt;
*,
*:before,
*:after&lt;/span&gt;  {
  &lt;span style=&quot;color: #CEFFF5;&quot;&gt;-webkit-box-sizing&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;border-box&lt;/span&gt; ;
  &lt;span style=&quot;color: #CEFFF5;&quot;&gt;-moz-box-sizing&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;border-box&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;box-sizing&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;border-box&lt;/span&gt; ;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;
html,
body&lt;/span&gt;  {
  &lt;span style=&quot;color: #000&quot;&gt;height&lt;/span&gt; : 100%;
  &lt;span style=&quot;color: #000&quot;&gt;min-height&lt;/span&gt; : 100%;
  &lt;span style=&quot;color: #000&quot;&gt;margin&lt;/span&gt; : 0;
  &lt;span style=&quot;color: #000&quot;&gt;padding&lt;/span&gt; : 0;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;body&lt;/span&gt;  {
  &lt;span style=&quot;color: #000&quot;&gt;background-color&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;#fcfcfc&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;font-family&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;&quot;Montserrat&quot;, sans-serif&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;text-align&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;center&lt;/span&gt; ;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.pricing-table&lt;/span&gt;  {
  &lt;span style=&quot;color: #000&quot;&gt;text-align&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;center&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;margin-top&lt;/span&gt; : -16px;
}

&lt;span style=&quot;color: #d35400;&quot;&gt;.pricing-item&lt;/span&gt;  {
  &lt;span style=&quot;color: #000&quot;&gt;border-radius&lt;/span&gt; : 3px;
  &lt;span style=&quot;color: #000&quot;&gt;display&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;inline-block&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;width&lt;/span&gt; : 100%;
  &lt;span style=&quot;color: #000&quot;&gt;height&lt;/span&gt; : 100%;
  &lt;span style=&quot;color: #000&quot;&gt;background&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;#fff&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;margin&lt;/span&gt; : 20px;
  &lt;span style=&quot;color: #000&quot;&gt;vertical-align&lt;/span&gt; :&lt;span style=&quot;color: #f19066;&quot;&gt; top&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;position&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;relative&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;overflow&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;hidden&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;box-shadow&lt;/span&gt; : 0 1.5px 4px &lt;span style=&quot;color: #CEFFF5;&quot;&gt;rgba&lt;/span&gt; (0, 0, 0, 0.24), 0 1.5px 6px rgba(0, 0, 0, 0.12);
  &lt;span style=&quot;color: #CEFFF5;&quot;&gt;-webkit-transition&lt;/span&gt; : all 0.2s &lt;span style=&quot;color: #CEFFF5;&quot;&gt;cubic-bezier&lt;/span&gt; (0.3, 0.6, 0.2, 1.8);
  &lt;span style=&quot;color: #000&quot;&gt;transition&lt;/span&gt; : all 0.2s &lt;span style=&quot;color: #f19066;&quot;&gt;cubic-bezier&lt;/span&gt; (0.3, 0.6, 0.2, 1.8);
  &lt;span style=&quot;color: #d35400;&quot;&gt;&amp;:hove&lt;/span&gt; r {
    &lt;span style=&quot;color: #CEFFF5;&quot;&gt;-webkit-transform&lt;/span&gt; : &lt;span style=&quot;color: #CEFFF5;&quot;&gt;scale&lt;/span&gt; (1.04);
    &lt;span style=&quot;color: #CEFFF5;&quot;&gt;-ms-transform&lt;/span&gt; : &lt;span style=&quot;color: #CEFFF5;&quot;&gt;scale&lt;/span&gt; (1.04);
    &lt;span style=&quot;color: #000&quot;&gt;transform&lt;/span&gt; : &lt;span style=&quot;color: #CEFFF5;&quot;&gt;scale&lt;/span&gt; (1.04);
    &lt;span style=&quot;color: #000&quot;&gt;box-shadow&lt;/span&gt; : 0 3px &lt;span style=&quot;color: #f19066;&quot;&gt;12px rgba&lt;/span&gt; (0, 0, 0, 0.23), 0 3px 12px rgba(0, 0, 0, 0.16);
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;.pricing-title&lt;/span&gt;  {
   &lt;span style=&quot;color: #000&quot;&gt; width&lt;/span&gt; : 100%;
    &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;white&lt;/span&gt; ;
    &lt;span style=&quot;color: #000&quot;&gt;display&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;block&lt;/span&gt; ;
    &lt;span style=&quot;color: #000&quot;&gt;position&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;relative&lt;/span&gt; ;
    &lt;span style=&quot;color: #000&quot;&gt;background&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;#0074d9&lt;/span&gt; ;
    &lt;span style=&quot;color: #000&quot;&gt;padding&lt;/span&gt; : 7px;
    &lt;span style=&quot;color: #000&quot;&gt;font-weight&lt;/span&gt; : bold;
    &lt;span style=&quot;color: #000&quot;&gt;font-size&lt;/span&gt; : 20px;
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;&amp;.pricing-featured .pricing-title&lt;/span&gt;  {
    &lt;span style=&quot;color: #000&quot;&gt;background&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;#ff4136&lt;/span&gt; ;
  }
}

&lt;span style=&quot;color: #d35400;&quot;&gt;.pricing-value&lt;/span&gt;  {
  &lt;span style=&quot;color: #000&quot;&gt;width&lt;/span&gt; : 180px;
  &lt;span style=&quot;color: #000&quot;&gt;height&lt;/span&gt; : 180px;
  &lt;span style=&quot;color: #000&quot;&gt;padding-top&lt;/span&gt; : 46px;
  &lt;span style=&quot;color: #000&quot;&gt;border-radius&lt;/span&gt; : 50%;
  &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt; : #fff;
  &lt;span style=&quot;color: #000&quot;&gt;font-size&lt;/span&gt; : 46px;
  &lt;span style=&quot;color: #000&quot;&gt;font-weight&lt;/span&gt; : 300;
  &lt;span style=&quot;color: #000&quot;&gt;margin&lt;/span&gt; : 10px &lt;span style=&quot;color: #f19066;&quot;&gt;auto&lt;/span&gt; ;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.pricing-value .smallText&lt;/span&gt;  {
  &lt;span style=&quot;color: #000&quot;&gt;font-size&lt;/span&gt; : 14px;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.pricing-value .undertext&lt;/span&gt;  {
  &lt;span style=&quot;color: #000&quot;&gt;display&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;block&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;font-size&lt;/span&gt; : 16px;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.pricing-item .pricing-value&lt;/span&gt;  {
  &lt;span style=&quot;color: #000&quot;&gt;background&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;#0074d9&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;border&lt;/span&gt; : 2px solid &lt;span style=&quot;color: #f19066;&quot;&gt;#0074d9&lt;/span&gt; ;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.pricing-item.pricing-featured .pricing-value &lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;background&lt;/span&gt; : &lt;span style=&quot;color: #f19066;&quot;&gt;#ff4136&lt;/span&gt; ;
  &lt;span style=&quot;color: #000&quot;&gt;border&lt;/span&gt; : 2px solid &lt;span style=&quot;color: #f19066;&quot;&gt;#ff4136&lt;/span&gt; ;
}

&lt;span style=&quot;color: #d35400;&quot;&gt;.pricing-item .pricing-features&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;margin&lt;/span&gt;: 10px 0;
  &lt;span style=&quot;color: #000&quot;&gt;padding&lt;/span&gt;: 0;
  &lt;span style=&quot;color: #000&quot;&gt;list-style&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;none&lt;/span&gt;;
  &lt;span style=&quot;color: #d35400;&quot;&gt;&amp; li&lt;/span&gt; {
   &lt;span style=&quot;color: #000&quot;&gt; display&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;block&lt;/span&gt;;
   &lt;span style=&quot;color: #000&quot;&gt; width&lt;/span&gt;: 90%;
    &lt;span style=&quot;color: #000&quot;&gt;line-height&lt;/span&gt;: 40px;
    &lt;span style=&quot;color: #000&quot;&gt;font-size&lt;/span&gt;: 15px;
   &lt;span style=&quot;color: #000&quot;&gt; font-weight&lt;/span&gt;: 400;
   &lt;span style=&quot;color: #000&quot;&gt; border-bottom&lt;/span&gt;: 1px solid rgba(0, 0, 0, 0.2);
   &lt;span style=&quot;color: #000&quot;&gt; margin&lt;/span&gt;: 0 auto;
    &lt;span style=&quot;color: #d35400;&quot;&gt;.keywords&lt;/span&gt; {
     &lt;span style=&quot;color: #000&quot;&gt; font-weight&lt;/span&gt;: bold;
    }
  }
}

&lt;span style=&quot;color: #d35400;&quot;&gt;.button&lt;/span&gt; {
   &lt;span style=&quot;color: #f19066;&quot;&gt;width&lt;/span&gt;: 160px;
  &lt;span style=&quot;color: #f19066;&quot;&gt;height&lt;/span&gt;: 38px;
  &lt;span style=&quot;color: #000&quot;&gt; font-weight&lt;/span&gt;: 300;
  &lt;span style=&quot;color: #000&quot;&gt; font-size&lt;/span&gt;: 16px;
 &lt;span style=&quot;color: #000&quot;&gt;  line-height&lt;/span&gt;: 32px;
  &lt;span style=&quot;color: #000&quot;&gt; margin&lt;/span&gt;: 0 &lt;span style=&quot;color: #f19066;&quot;&gt;auto&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt; background&lt;/span&gt;: #fff;
 &lt;span style=&quot;color: #000&quot;&gt;  color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#0074d9&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  border&lt;/span&gt;: 2px solid &lt;span style=&quot;color: #f19066;&quot;&gt;#0074d9&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt; cursor&lt;/span&gt;: pointer;
  &lt;span style=&quot;color: #000&quot;&gt; margin-bottom&lt;/span&gt;: 10px;
 &lt;span style=&quot;color: #CEFFF5;&quot;&gt; -webkit-transition&lt;/span&gt;: 0.2s &lt;span style=&quot;color: #f19066;&quot;&gt;ease-out&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  -moz-transition&lt;/span&gt;: 0.2s &lt;span style=&quot;color: #f19066;&quot;&gt;ease-out&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  -o-transition&lt;/span&gt;: 0.2s &lt;span style=&quot;color: #f19066;&quot;&gt;ease-out&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  -ms-transition&lt;/span&gt;: 0.2s&lt;span style=&quot;color: #f19066;&quot;&gt; ease-out&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt; transition&lt;/span&gt;: 0.2s &lt;span style=&quot;color: #f19066;&quot;&gt;ease-out&lt;/span&gt;;
  &lt;span style=&quot;color: #d35400;&quot;&gt;&amp;:hover&lt;/span&gt; {
   &lt;span style=&quot;color: #000&quot;&gt;  background&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#0074d9&lt;/span&gt;;
   &lt;span style=&quot;color: #000&quot;&gt;  color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#fff&lt;/span&gt;;
   &lt;span style=&quot;color: #000&quot;&gt;  border&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;none&lt;/span&gt;;
    &lt;span style=&quot;color: #CEFFF5;&quot;&gt;-webkit-box-shadow&lt;/span&gt;: 0 5px 11px 0 &lt;span style=&quot;color: #f19066;&quot;&gt;rgba&lt;/span&gt;(0, 0, 0, 0.18),
      0 4px 15px 0 rgba(0, 0, 0, 0.15);
    &lt;span style=&quot;color: #000&quot;&gt; box-shadow&lt;/span&gt;: 0 5px 11px 0 rgba(0, 0, 0, 0.18),
      0 4px 15px 0 rgba(0, 0, 0, 0.15);
  }
}

&lt;span style=&quot;color: #d35400;&quot;&gt;.pricing-item.pricing-featured .button&lt;/span&gt; {
 &lt;span style=&quot;color: #000&quot;&gt;  color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#ff4136&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  border&lt;/span&gt;: 2px solid &lt;span style=&quot;color: #f19066;&quot;&gt;#ff4136&lt;/span&gt;;
  &lt;span style=&quot;color: #d35400;&quot;&gt;&amp;:hover&lt;/span&gt; {
   &lt;span style=&quot;color: #000&quot;&gt;  background&lt;/span&gt;:&lt;span style=&quot;color: #f19066;&quot;&gt; #ff4136&lt;/span&gt;;
    &lt;span style=&quot;color: #000&quot;&gt; color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#fff&lt;/span&gt;;
  }
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.selected&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt; z-index&lt;/span&gt;: 10;
  &lt;span style=&quot;color: #000&quot;&gt; width&lt;/span&gt;: 180px;
  &lt;span style=&quot;color: #000&quot;&gt; height&lt;/span&gt;: 32px;
  &lt;span style=&quot;color: #000&quot;&gt; padding&lt;/span&gt;: 0 20px;
  &lt;span style=&quot;color: #000&quot;&gt; font-size&lt;/span&gt;: 12px;
  &lt;span style=&quot;color: #000&quot;&gt; line-height&lt;/span&gt;: 25px;
 &lt;span style=&quot;color: #000&quot;&gt;  text-align&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;center&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  color&lt;/span&gt;: #fff;
  &lt;span style=&quot;color: #000&quot;&gt; font-weight&lt;/span&gt;: bold;
  &lt;span style=&quot;color: #000&quot;&gt; box-shadow&lt;/span&gt;: 0px 2px 5px &lt;span style=&quot;color: #f19066;&quot;&gt;#888888&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  background&lt;/span&gt;: gold;
  &lt;span style=&quot;color: #000&quot;&gt; border-top&lt;/span&gt;: 5px solid &lt;span style=&quot;color: #f19066;&quot;&gt;gold&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt; border-bottom&lt;/span&gt;: 5px solid &lt;span style=&quot;color: #f19066;&quot;&gt;gold&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt; transform&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;rotate&lt;/span&gt;(35deg);
  &lt;span style=&quot;color: #000&quot;&gt; position&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;absolute&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt; right&lt;/span&gt;: -47px;
  &lt;span style=&quot;color: #000&quot;&gt; top&lt;/span&gt;: 17px;
}

&lt;span style=&quot;color: #d35400;&quot;&gt;#addToCartBtn&lt;/span&gt; {
 &lt;span style=&quot;color: #000&quot;&gt;  background&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#fff&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt; border&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;none&lt;/span&gt;;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;#addToCartBtn:hover&lt;/span&gt; {
 &lt;span style=&quot;color: #000&quot;&gt;  background&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#0074d9&lt;/span&gt;;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.jumbotron span &lt;/span&gt;{
 &lt;span style=&quot;color: #000&quot;&gt;  margin-left&lt;/span&gt;: 5px;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.container&lt;/span&gt; {
 &lt;span style=&quot;color: #000&quot;&gt;  background&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;aliceblue&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  padding&lt;/span&gt;: 10px;
  &lt;span style=&quot;color: #000&quot;&gt; border-radius&lt;/span&gt;: 10px;
  &lt;span style=&quot;color: #000&quot;&gt; padding-bottom&lt;/span&gt;: 10px;
  &lt;span style=&quot;color: #000&quot;&gt; margin-top&lt;/span&gt;: 50px;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.info-comment&lt;/span&gt; {
 &lt;span style=&quot;color: #000&quot;&gt;  background-color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#ffdddd&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  border-left&lt;/span&gt;: 16px solid &lt;span style=&quot;color: #f19066;&quot;&gt;#f44336&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  border-right&lt;/span&gt;: 16px solid&lt;span style=&quot;color: #f19066;&quot;&gt; #f44336&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  margin-bottom&lt;/span&gt;: 15px;
 &lt;span style=&quot;color: #000&quot;&gt;  padding&lt;/span&gt;: 4px 12px;
 &lt;span style=&quot;color: #000&quot;&gt;  border-radius&lt;/span&gt;: 5px;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.container-comment&lt;/span&gt; {
 &lt;span style=&quot;color: #000&quot;&gt;  border&lt;/span&gt;: 2px solid &lt;span style=&quot;color: #f19066;&quot;&gt;#eee&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt; background-color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#fff&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt; border-radius&lt;/span&gt;: 5px;
  &lt;span style=&quot;color: #000&quot;&gt; padding&lt;/span&gt;: 16px;
  &lt;span style=&quot;color: #000&quot;&gt; margin&lt;/span&gt;: 16px 0;
}

&lt;span style=&quot;color: #d35400;&quot;&gt;.container-comment::after&lt;/span&gt; {
 &lt;span style=&quot;color: #000&quot;&gt;  content&lt;/span&gt;: &quot;&quot;;
  &lt;span style=&quot;color: #000&quot;&gt; clear&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;both&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt; display&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;table&lt;/span&gt;;
}

&lt;span style=&quot;color: #d35400;&quot;&gt;.container-comment img&lt;/span&gt; {
 &lt;span style=&quot;color: #000&quot;&gt;  float&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;left&lt;/span&gt;;
 &lt;span style=&quot;color: #000&quot;&gt;  margin-right&lt;/span&gt;: 20px;
  &lt;span style=&quot;color: #000&quot;&gt; border-radius&lt;/span&gt;: 50%;
}

&lt;span style=&quot;color: #d35400;&quot;&gt;.container-comment span&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt; font-size&lt;/span&gt;: 20px;
  &lt;span style=&quot;color: #000&quot;&gt; margin-right&lt;/span&gt;: 15px;
}

&lt;span style=&quot;color: #8e44ad;&quot;&gt;@media&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt; max-width&lt;/span&gt;: 500px) {
  &lt;span style=&quot;color: #d35400;&quot;&gt;.container-comment&lt;/span&gt; {
   &lt;span style=&quot;color: #000&quot;&gt;  text-align&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;center&lt;/span&gt;;
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;.container-comment img&lt;/span&gt; {
    &lt;span style=&quot;color: #000&quot;&gt; margin&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;auto&lt;/span&gt;;
    &lt;span style=&quot;color: #000&quot;&gt; float&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;none&lt;/span&gt;;
    &lt;span style=&quot;color: #000&quot;&gt; display&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;block&lt;/span&gt;;
  }
} 
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a shopping-cart page. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- shopping-cart.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- shopping-cart.component.html &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- shopping-cart.component.css &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/ecommerce/shopping-cart.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyShoppingCartTs(selectShoppingCartTs)&quot; id=&quot;idBtnShoppingCartTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectShoppingCartTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Component, EventEmitter, OnInit, Output&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Router &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProductOrders, ProductOrder, Item, ITEMS &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;OrderService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../service/order.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Subscription &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;rxjs&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #000&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-shopping-cart&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./shopping-cart.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./shopping-cart.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;ShoppingCartComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;itemsList&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Item&lt;/span&gt;[] = ITEMS;
  &lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;boolean&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;orders&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;ProductOrders&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;total&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;sub&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;Subscription&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;radioSel&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;any&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;priceDelivery&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;radioSelected&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;radioSelectedString&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;string&lt;/span&gt;;

  @&lt;span style=&quot;color: #c0392b;&quot;&gt;Output&lt;/span&gt;() &lt;span style=&quot;color: #c0392b;&quot;&gt;onOrderFinished&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;EventEmitter&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;boolean&lt;/span&gt;&gt;;
  
   &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;orderService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;OrderService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;router&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Router&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;total&lt;/span&gt; = 0;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;onOrderFinished&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;EventEmitte&lt;/span&gt;r&amp;lt;&lt;span style=&quot;color: #c0392b;&quot;&gt;boolean&lt;/span&gt;&gt;();

    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;itemsList&lt;/span&gt; = &lt;span style=&quot;color: #c0392b;&quot;&gt;ITEMS&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;radioSelected&lt;/span&gt; = &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;item_1&#39;&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;getSelecteditem&lt;/span&gt;();
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnIni&lt;/span&gt;t() {
    this.&lt;span style=&quot;color: #000&quot;&gt;orders&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;ProductOrders&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;loadCart&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;loadTotal&lt;/span&gt;();

    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;itemsList&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;forEach&lt;/span&gt;((&lt;span style=&quot;color: #000&quot;&gt;item&lt;/span&gt;) =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;onItemChange&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;item&lt;/span&gt;);
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;priceDelivery&lt;/span&gt; = 1.99;
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;calculateTotal&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductOrder&lt;/span&gt;[]): &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt; {
    &lt;span style=&quot;color: #3498db;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;sum&lt;/span&gt; = 0;
    &lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;forEach&lt;/span&gt;((&lt;span style=&quot;color: #000&quot;&gt;value&lt;/span&gt;) =&gt; {
      &lt;span style=&quot;color: #000&quot;&gt;sum&lt;/span&gt; += &lt;span style=&quot;color: #000&quot;&gt;value.product.price&lt;/span&gt; * &lt;span style=&quot;color: #000&quot;&gt;value.quantity&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #8e44ad;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;sum&lt;/span&gt; + &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;priceDelivery&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnDestroy&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;sub&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;unsubscribe&lt;/span&gt;();
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;finishOrder&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.Total&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;total&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;onOrderFinished&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;emit&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt;);
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;loadTotal&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;sub&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.OrdersChanged&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;total&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;calculateTotal&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orders.productOrders&lt;/span&gt;);
    });
  }
 
 &lt;span style=&quot;color: #d35400;&quot;&gt;loadCart&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt; sub&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.ProductOrderChanged&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(() =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;productOrder&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt; orderService.SelectedProductOrder&lt;/span&gt;;
      &lt;span style=&quot;color: #8e44ad;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;productOrder&lt;/span&gt;) {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orders.productOrders&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;push&lt;/span&gt;(
          &lt;span style=&quot;color: #8e44ad;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt; ProductOrder&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt; productOrder.product&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt; productOrder.quantity&lt;/span&gt;)
        );
      }
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderService.ProductOrders&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt; orders&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orders&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt; orderService.ProductOrders&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;total&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt; calculateTotal(this.orders.productOrders&lt;/span&gt;);
    });
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;reset&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orders&lt;/span&gt; = &lt;span style=&quot;color: #8e44ad;&quot;&gt; new&lt;/span&gt; &lt;span style=&quot;color: #d35400;&quot;&gt;ProductOrders&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orders&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt; productOrders&lt;/span&gt; = [];
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;loadTotal&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt; total&lt;/span&gt; = 0;
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;getSelecteditem&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt; radioSel&lt;/span&gt; = ITEMS.&lt;span style=&quot;color: #d35400;&quot;&gt;find&lt;/span&gt;((&lt;span style=&quot;color: #000&quot;&gt; Item&lt;/span&gt;) =&gt; &lt;span style=&quot;color: #000&quot;&gt;Item.value&lt;/span&gt; === &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt; radioSelected&lt;/span&gt;);
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt; radioSelectedString&lt;/span&gt; = &lt;span style=&quot;color: #d35400;&quot;&gt;JSON.stringify&lt;/span&gt;(this.&lt;span style=&quot;color: #000&quot;&gt;radioSel&lt;/span&gt;);
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;onItemChange&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt; item&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;any&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;getSelecteditem&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;priceDelivery&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt; item.price&lt;/span&gt;;
  }

}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/ecommerce/shopping-cart.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyShoppingCartHtml(selectShoppingCartHtml)&quot; id=&quot;idBtnShoppingCartHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectShoppingCartHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;background: aliceblue; padding: 10px; border-radius: 5px;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card text-white bg-danger mb-3&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;max-width: 19rem;&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-header text-center&quot;&lt;/span&gt;&gt;Shopping Cart&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt;&gt;Total: ${{total}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h6&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt;&gt;Items bought&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h6&lt;/span&gt;&gt;

      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let order of orders.productOrders&quot;&lt;/span&gt;&gt;
          {{ order.product.name }} - {{ order.quantity}} pcs.
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt;&gt;

      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-light btn-block&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;finishOrder&lt;/span&gt;()&quot;
        [&lt;span style=&quot;color: #000&quot;&gt;disabled&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;orders.productOrders.length == 0&quot;&lt;/span&gt;&gt;Checkout
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card text-white bg-warning mb-3&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;max-width: 19rem;&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-header text-center&quot;&lt;/span&gt;&gt;Delivry&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;padding: 0px !important; margin-top: -30px;&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text-center mt-5&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text-align: left !important; padding: 0&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;color: black&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list-group-item&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let item of itemsList&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;background: #ffc107 !important;&quot;&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;radio&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #000&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;radioSelected&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;list_name&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;{{item.value}}&quot;&lt;/span&gt;
             (&lt;span style=&quot;color: #000&quot;&gt;change&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;onItemChange&lt;/span&gt;(item)&quot;&lt;/span&gt;/&gt;
              {{item.name}}{{item.price}}
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;li&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;ul&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyShoppingCartCss(selectShoppingCartCss)&quot; id=&quot;idBtnShoppingCartCss&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectShoppingCartCss&quot;&gt;

&lt;span style=&quot;color: #d35400;&quot;&gt;.list-group-item&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;background&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#007bff&lt;/span&gt; !important;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.list-group-item a&lt;/span&gt; {
 &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;gold&lt;/span&gt;;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.fa-comment-dots&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;font-size&lt;/span&gt;: 100px;
  &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#bdc3c7&lt;/span&gt;;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;.fa-comment-dots:hover&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#039be6&lt;/span&gt;;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;#social-media-icon&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;margin-top&lt;/span&gt;: 20px;
  &lt;span style=&quot;color: #000&quot;&gt;width&lt;/span&gt;: 120px;
  &lt;span style=&quot;color: #000&quot;&gt;text-align&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;center&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;margin-left&lt;/span&gt;: 20px;
  &lt;span style=&quot;color: #000&quot;&gt;border-radius&lt;/span&gt;: 10px;
}
&lt;span style=&quot;color: #d35400;&quot;&gt;#social-media-icon .fa&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;padding&lt;/span&gt;: 14px;
  &lt;span style=&quot;color: #000&quot;&gt;font-size&lt;/span&gt;: 18px;
  &lt;span style=&quot;color: #000&quot;&gt;text-align&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;center&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;text-decoration&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;none&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;margin&lt;/span&gt;: 5px 2px;
  &lt;span style=&quot;color: #000&quot;&gt;border-radius&lt;/span&gt;: 50%;
}

&lt;span style=&quot;color: #d35400;&quot;&gt;#social-media-icon .fa:hover &lt;/span&gt;{
  &lt;span style=&quot;color: #000&quot;&gt;opacity&lt;/span&gt;: 0.7;
}

&lt;span style=&quot;color: #d35400;&quot;&gt;#social-media-icon .fa-facebook&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;background&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#3b5998&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;white&lt;/span&gt;;
}

&lt;span style=&quot;color: #d35400;&quot;&gt;#social-media-icon .fa-twitter&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;background&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#55acee&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;white&lt;/span&gt;;
}

&lt;span style=&quot;color: #d35400;&quot;&gt;#social-media-icon .fa-google&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;background&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#dd4b39&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;white&lt;/span&gt;;
}

&lt;span style=&quot;color: #d35400;&quot;&gt;#social-media-icon .fa-instagram&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;background&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;#125688&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;color&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;white&lt;/span&gt;;
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a ecommerce page. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- ecommerce.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- ecommerce.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/ecommerce.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyEcommerceTs(selectEcommerceTs)&quot; id=&quot;idBtnEcommerceTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEcommerceTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Component, OnInit, ViewChild&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Router &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Product &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProductService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../service/product.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;OrdersComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./orders/orders.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProductsComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./products/products.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ShoppingCartComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./shopping-cart/shopping-cart.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #000&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-ecommerce&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./ecommerce.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./ecommerce.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;EcommerceComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;[];
  &lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;any&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;showSearch&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;showBtn&lt;/span&gt; = -1;
  &lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;

  @&lt;span style=&quot;color: #c0392b;&quot;&gt;ViewChild&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;productsC&#39;&lt;/span&gt;)
  &lt;span style=&quot;color: #000&quot;&gt;productsC&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductsComponent&lt;/span&gt;;

  @&lt;span style=&quot;color: #c0392b;&quot;&gt;ViewChild&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;shoppingCartC&#39;&lt;/span&gt;)
  &lt;span style=&quot;color: #000&quot;&gt;shoppingCartC&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ShoppingCartComponent&lt;/span&gt;;

  @&lt;span style=&quot;color: #c0392b;&quot;&gt;ViewChild&lt;/span&gt;(&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;ordersC&#39;&lt;/span&gt;)
  &lt;span style=&quot;color: #000&quot;&gt;ordersC&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;OrdersComponent&lt;/span&gt;;
  
&lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductService&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;router&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Router&lt;/span&gt;) { }

  &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }

  &lt;span style=&quot;color: #d35400;&quot;&gt;finishOrder&lt;/span&gt;(&lt;span style=&quot;color: #000;&quot;&gt;orderFinished&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;boolean&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;reset&lt;/span&gt;() {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productsC&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reset&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;shoppingCartC&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;reset&lt;/span&gt;();
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;ordersC.paid&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;search&lt;/span&gt;() {
    this.&lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findByName&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;) =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;;
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;showSearch&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;true&lt;/span&gt;;
    });
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;showUndoBtn&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;index&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;showBtn&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;index&lt;/span&gt;;
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;productInfo&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findProductById&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;((&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;) =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&lt;/span&gt; = !&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&lt;/span&gt;;
  }
  &lt;span style=&quot;color: #d35400;&quot;&gt;sngleProduct&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;navigate&lt;/span&gt;([&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;sangle/product&#39;&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;]);
  }
}
  
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;p&gt;src/app/ecommerce.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyEcommerceHtml(selectEcommerceHtml)&quot; id=&quot;idBtnEcommerceHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectEcommerceHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;container&quot;&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;hidden&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;orderFinished&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-lg-4&quot;&lt;/span&gt;&gt;
    &amp;lt; &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;title-page&quot;&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fab fa-dropbox&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt; Products &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fab fa-dropbox&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-lg-8&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;input-group mb-3&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;margin-top: 15px;&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;input&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;text&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;form-control&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;Search product&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;name&quot;&lt;/span&gt; [(&lt;span style=&quot;color: #000&quot;&gt;ngModel&lt;/span&gt;)]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;name&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn btn-danger&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;button&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;search&lt;/span&gt;()&quot;&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-search&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;padding-bottom: 40px;&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!showSearch&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-md-9&quot;&lt;/span&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;app-products&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;#productsC&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;hidden&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;orderFinished&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;app-products&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  élt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-md-3&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;app-shopping-cart&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;onOrderFinished&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;finishOrder&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;$event&lt;/span&gt;) &lt;span style=&quot;color: #000&quot;&gt;#shoppingCartC&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;hidden&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;orderFinished&quot;&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;vapp-shopping-cart&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-md-6 offset-3&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;app-orders&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;#ordersC&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;hidden&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;!orderFinished&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;app-orders&lt;/span&gt;&gt;
 &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;showSearch&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-deck&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;padding-bottom: 40px;&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-lg-4 col-md-6 mb-4&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let product of products let i = index;&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card text-center&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-header&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;background-color: #bdc3c7;&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h4&lt;/span&gt;&gt;{{product.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h4&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;sngleProduct(product.id)&quot;&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-img-top img-thumbnail&quot;&lt;/span&gt;
              &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 230px; height: 300px; cursor: pointer;&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;src&lt;/span&gt;={{product.pictureUrl}} &lt;span style=&quot;color: #000&quot;&gt;alt&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;image&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;price&quot;&lt;/span&gt;&gt;Price = {{product.price}}&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-dollar-sign&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;Information&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;showUndoBtn&lt;/span&gt;(i) (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;productInfo&lt;/span&gt;(product.id)&quot;&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-info-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;View&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;sngleProduct&lt;/span&gt;(product.id)&quot;&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-eye-slash&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;modal&quot;&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;attr.id&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&#39;undoBtn&#39;+i&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;showBtn===i &amp;&amp; showMyContainerInfo&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;editBtn&quot;&lt;/span&gt;
            &lt;span style=&quot;color: #000&quot;&gt;md-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;primary&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;modal-content&quot;&lt;/span&gt;&gt;
              &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;{{product.description}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
            &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a dashboard page. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- dashboard.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/dashboard.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDashboard(selectDashboard)&quot; id=&quot;idBtnDashboard&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDashboard&quot;&gt;

  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;app-ecommerce&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;app-ecommerce&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;p&gt;We are going to create a display-category page. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- display-category.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- display-category.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/display-category.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayCategoryTs(selectDisplayCategoryTs)&quot; id=&quot;idBtnDisplayCategoryTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayCategoryTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Router, ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Product &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProductService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../service/product.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #000&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-display-category&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./display-category.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./display-category.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;DisplayCategoryComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;[];
  &lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;idCategory&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;showBtn&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;-1&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;  

 &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ActivatedRoute&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductService&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;router&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Router&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(
      &lt;span style=&quot;color: #000&quot;&gt;params&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;idCategory&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;route.snapshot.params.idCategory&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findProductsForCategory&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;idCategory&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;;
        }
        );
      }
    )
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }

  &lt;span style=&quot;color: #d35400;&quot;&gt;showUndoBtn&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;index&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;showBtn&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;index&lt;/span&gt;;
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;productInfo&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findProductById&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&lt;/span&gt; = !&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&lt;/span&gt;;
  }
  
  &lt;span style=&quot;color: #d35400;&quot;&gt;sngleProduct&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;navigate&lt;/span&gt;([&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;sangle/product&#39;&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;]);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;


&lt;p&gt;src/app/display-category.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayCategoryHtml(selectDisplayCategoryHtml)&quot; id=&quot;idBtnDisplayCategoryHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayCategoryHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;container&quot;&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;hidden&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;orderFinished&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-lg-4&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;title-page&quot;&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fab fa-dropbox&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt; Products &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fab fa-dropbox&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-deck&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;padding-bottom: 40px;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-lg-4 col-md-6 mb-4&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let product of products let i = index;&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card text-center&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-header&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;background-color: #bdc3c7;&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h4&lt;/span&gt;&gt;{{product.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h4&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;sngleProduct&lt;/span&gt;(product.id)&quot;&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-img-top img-thumbnail&quot;&lt;/span&gt;
            &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 230px; height: 300px; cursor: pointer;&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;src&lt;/span&gt;={{product.pictureUrl}} &lt;span style=&quot;color: #000&quot;&gt;alt&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;image&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;price&quot;&lt;/span&gt;&gt;Price = {{product.price}}&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-dollar-sign&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;Information&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;showUndoBtn&lt;/span&gt;(i) (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;productInfo&lt;/span&gt;(product.id)&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-info-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;View&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;sngleProduct(product.id)&quot;&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-eye-slash&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;modal&quot;&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;attr.id&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&#39;undoBtn&#39;+i&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;showBtn===i &amp;&amp; showMyContainerInfo&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;editBtn&quot;&lt;/span&gt;
          &lt;span style=&quot;color: #000&quot;&gt;md-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;primary&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;modal-content&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;{{product.description}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;We are going to create a display-tag page. &lt;/p&gt;&lt;br/&gt;
&lt;b&gt;- display-tag.component.ts &lt;/b&gt;&lt;br&gt;
&lt;b&gt;- display-tag.component.html &lt;/b&gt;&lt;br&gt;&lt;br&gt;

&lt;p&gt;src/app/display-tag.component.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayTagTs(selectDisplayTagTs)&quot; id=&quot;idBtnDisplayTagTs&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayTagTs&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Component, OnInit&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Router, ActivatedRoute &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Product &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../model/Model&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProductService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../service/product.service&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;TagService &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;../service/tag.service&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;Component&lt;/span&gt;({
  &lt;span style=&quot;color: #000&quot;&gt;selector&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;app-display-tag&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;templateUrl&lt;/span&gt;: &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./display-tag.component.html&#39;&lt;/span&gt;,
  &lt;span style=&quot;color: #000&quot;&gt;styleUrls&lt;/span&gt;: [&lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./display-tag.component.css&#39;&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;DisplayTagComponent&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;implements&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;OnInit&lt;/span&gt; {
  &lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;[];
  &lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt; = {} &lt;span style=&quot;color: #8e44ad;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;Product&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;idTag&lt;/span&gt;: &lt;span style=&quot;color: #3498db;&quot;&gt;number&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;orderFinished&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;showBtn&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;-1&lt;/span&gt;;
  &lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;false&lt;/span&gt;;  

  &lt;span style=&quot;color: #3498db;&quot;&gt;constructor&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;route&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ActivatedRoute&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProductService&lt;/span&gt;,
    &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;router&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Router&lt;/span&gt;, &lt;span style=&quot;color: #3498db;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;tagService&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;TagService&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;route.params&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(
      &lt;span style=&quot;color: #000&quot;&gt;params&lt;/span&gt; =&gt; {
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;idTag&lt;/span&gt; = &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;route.snapshot.params.idTag&lt;/span&gt;;
        &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;tagService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findProductsForTag&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;idTag&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt; =&gt; {
          &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;products&lt;/span&gt;;
        }
        );
      }
    )
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;ngOnInit&lt;/span&gt;(): &lt;span style=&quot;color: #3498db;&quot;&gt;void&lt;/span&gt; { }

  &lt;span style=&quot;color: #d35400;&quot;&gt;showUndoBtn&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;index&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;showBtn&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;index&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;productInfo&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;productService&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;findProductById&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;).&lt;span style=&quot;color: #d35400;&quot;&gt;subscribe&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt; =&gt; {
      &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt; = &lt;span style=&quot;color: #000&quot;&gt;product&lt;/span&gt;;
    });
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&lt;/span&gt; = !&lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;showMyContainerInfo&lt;/span&gt;;
  }

  &lt;span style=&quot;color: #d35400;&quot;&gt;sngleProduct&lt;/span&gt;(&lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;number&lt;/span&gt;) {
    &lt;span style=&quot;color: #3498db;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #000&quot;&gt;router&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;navigate&lt;/span&gt;([&lt;span style=&quot;color: #f19066;&quot;&gt;&#39;sangle/product&#39;&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;]);
  }
}
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;p&gt;src/app/display-tag.component.html&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyDisplayTagHtml(selectDisplayTagHtml)&quot; id=&quot;idBtnDisplayTagHtml&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectDisplayTagHtml&quot;&gt;

&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;container&quot;&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;hidden&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;orderFinished&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;row&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-lg-4&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;title-page&quot;&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fab fa-dropbox&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt; Products &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fab fa-dropbox&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h2&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;hr&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-deck&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;padding-bottom: 40px;&quot;&lt;/span&gt;&gt;
  &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;col-lg-4 col-md-6 mb-4&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngFor&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;let product of products let i = index;&quot;&lt;/span&gt;&gt;
    &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card text-center&quot;&lt;/span&gt;&gt;
      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-header&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;background-color: #bdc3c7;&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h4&lt;/span&gt;&gt;{{product.name}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h4&lt;/span&gt;&gt;
      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

      &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-body&quot;&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;sngleProduct(product.id)&quot;&lt;/span&gt;&gt;&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;img&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-img-top img-thumbnail&quot;&lt;/span&gt;
            &lt;span style=&quot;color: #000&quot;&gt;style&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;width: 230px; height: 300px; cursor: pointer;&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;src&lt;/span&gt;={{product.pictureUrl}} &lt;span style=&quot;color: #000&quot;&gt;alt&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;image&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;a&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;card-title&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;price&quot;&lt;/span&gt;&gt;Price = {{product.price}}&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-dollar-sign&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;Information&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #d35400;&quot;&gt;showUndoBtn&lt;/span&gt;(i) (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;productInfo&lt;/span&gt;(product.id)&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-info-circle&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
&amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;title&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;View&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;btn&quot;&lt;/span&gt; (&lt;span style=&quot;color: #000&quot;&gt;click&lt;/span&gt;)=&quot;&lt;span style=&quot;color: #d35400;&quot;&gt;sngleProduct(product.id)&quot;&lt;/span&gt;&gt; &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;fas fa-eye-slash&quot;&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;i&lt;/span&gt;&gt;&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;button&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;h5&lt;/span&gt;&gt;
        &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;modal&quot;&lt;/span&gt; [&lt;span style=&quot;color: #000&quot;&gt;attr.id&lt;/span&gt;]=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;&#39;undoBtn&#39;+i&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;*ngIf&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;showBtn===i &amp;&amp; showMyContainerInfo&quot;&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;editBtn&quot;&lt;/span&gt;
          &lt;span style=&quot;color: #000&quot;&gt;md-raised-button color&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;primary&quot;&lt;/span&gt;&gt;
          &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #f19066;&quot;&gt;&quot;modal-content&quot;&lt;/span&gt;&gt;
            &amp;lt;&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;{{product.description}}&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;span&lt;/span&gt;&gt;
          &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
        &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;

      &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
    &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
  &amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
&amp;lt;/&lt;span style=&quot;color: #3498db;&quot;&gt;div&lt;/span&gt;&gt;
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;Add the AppRoutingModule&lt;/h2&gt;
&lt;p&gt;In Angular, the best practice is to load and configure the router in a separate, top-level module that is dedicated to routing and imported by the root AppModule.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;By convention, the module class name is AppRoutingModule and it belongs in the app-routing.module.ts in the src/app folder.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;app-routing-module.ts&lt;/p&gt;

&lt;p&gt;src/app/app-routing.module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppRouting(selectAppRouting)&quot; id=&quot;idBtnAppRouting&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppRouting&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProfileComponent&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./profile/profile.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;DashboardComponent&lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./dashboard/dashboard.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;NgModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;CommonModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/common&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;Routes, RouterModule &lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/router&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;CategoriesComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./admin/categories/categories.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;SangleProductComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./ecommerce/sangle-product/sangle-product.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;DisplayCategoryComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./display-category/display-category.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;DisplayTagComponent&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./display-tag/display-tag.component&#39;&lt;/span&gt;;

&lt;span style=&quot;color: #3498db;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #000&quot;&gt;routes&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;Routes&lt;/span&gt; = [
  { &lt;span style=&quot;color: #000&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;&#39;&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;redirectTo&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;/dashboard&#39;&lt;/span&gt;, &lt;span style=&quot;color: #000&quot;&gt;pathMatch&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;full&#39;&lt;/span&gt; },
  {
    &lt;span style=&quot;color: #000&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;dashboard&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #000&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;DashboardComponent&lt;/span&gt;,
  },
  {
    &lt;span style=&quot;color: #000&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;sangle/product/:idProduct&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #000&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;SangleProductComponent&lt;/span&gt;
  },
  {
    &lt;span style=&quot;color: #000&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;puy/product/:name&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #000&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;SangleProductComponent&lt;/span&gt;
  },
  {
    &lt;span style=&quot;color: #000&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;dsiplay-category/:idCategory&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #000&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;DisplayCategoryComponent&lt;/span&gt;
  },
  {
    &lt;span style=&quot;color: #000&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;display-tag/:idTag&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #000&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;DisplayTagComponent&lt;/span&gt;
  },
  {
    &lt;span style=&quot;color: #000&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;profile/:id&#39;&lt;/span&gt;,
    &lt;span style=&quot;color: #000&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;ProfileComponent&lt;/span&gt;,
    &lt;span style=&quot;color: #000&quot;&gt;children&lt;/span&gt;: [
      {
        &lt;span style=&quot;color: #000&quot;&gt;path&lt;/span&gt;: &lt;span style=&quot;color: #f19066;&quot;&gt;&#39;categories/:idCategory&#39;&lt;/span&gt;,
        &lt;span style=&quot;color: #000&quot;&gt;component&lt;/span&gt;: &lt;span style=&quot;color: #c0392b;&quot;&gt;CategoriesComponent&lt;/span&gt;
      }
    ]
  }
];

@&lt;span style=&quot;color: #c0392b;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #000&quot;&gt;declarations&lt;/span&gt;: [],
  &lt;span style=&quot;color: #000&quot;&gt;imports&lt;/span&gt;: [&lt;span style=&quot;color: #c0392b;&quot;&gt;CommonModule&lt;/span&gt;, &lt;span style=&quot;color: #c0392b;&quot;&gt;RouterModule&lt;/span&gt;.&lt;span style=&quot;color: #d35400;&quot;&gt;forRoot&lt;/span&gt;(&lt;span style=&quot;color: #3498db;&quot;&gt;routes&lt;/span&gt;)],
  &lt;span style=&quot;color: #000&quot;&gt;exports&lt;/span&gt;: [&lt;span style=&quot;color: #c0392b;&quot;&gt;RouterModule&lt;/span&gt;]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;AppRoutingModule&lt;/span&gt; { }
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2 class=&quot;h2-title&quot;&gt;NgModules and JavaScript modules&lt;/h2&gt;
&lt;p&gt;The NgModule system is different from and unrelated to the JavaScript (ES2015) module system for managing collections of JavaScript objects. These are complementary module systems that you can use together to write your apps.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;In JavaScript each file is a module and all objects defined in the file belong to that module. The module declares some objects to be public by marking them with the export key word. Other JavaScript modules use import statements to access public objects from other modules.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;app-module.ts&lt;/p&gt;&lt;br&gt;

&lt;p&gt;src/app/app-module.ts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&lt;button type=&quot;button&quot; onclick=&quot;copyAppModule(selectAppModule)&quot; id=&quot;idBtnAppModule&quot; class=&quot;btnCopy&quot; title=&quot;Copy this code&quot;&gt;copy&lt;/button&gt;&lt;div id=&quot;selectAppModule&quot;&gt;

&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;BrowserModule&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/platform-browser&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/core&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;HttpClientModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/common/http&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;AppComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./app.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;LoginComponent&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./login/login.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;FormsModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/forms&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;NoopAnimationsModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/platform-browser/animations&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;MaterialModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./material-module&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProfileComponent&lt;/span&gt; } &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./profile/profile.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;AppRoutingModule &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./app-routing.module&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;DashboardComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./dashboard/dashboard.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;CategoriesComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./admin/categories/categories.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;AddCategoryComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./admin/add-category/add-category.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;AddProductComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./admin/add-product/add-product.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;AddTagComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./admin/add-tag/add-tag.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;AddTagToProductComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./admin/add-tag-to-product/add-tag-to-product.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;EcommerceComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./ecommerce/ecommerce.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;OrdersComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./ecommerce/orders/orders.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ProductsComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./ecommerce/products/products.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;ShoppingCartComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./ecommerce/shopping-cart/shopping-cart.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;DatePipe &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;@angular/common&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;SangleProductComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./ecommerce/sangle-product/sangle-product.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;UpdateProfileComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./update-profile/update-profile.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;DisplayCategoryComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./display-category/display-category.component&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #8e44ad;&quot;&gt; import &lt;/span&gt; { &lt;span style=&quot;color: #000&quot;&gt;DisplayTagComponent &lt;/span&gt;} &lt;span style=&quot;color: #8e44ad;&quot;&gt; from &lt;/span&gt; &lt;span style=&quot;color: #ca851e;&quot;&gt;&#39;./display-tag/display-tag.component&#39;&lt;/span&gt;;

@&lt;span style=&quot;color: #c0392b;&quot;&gt;NgModule&lt;/span&gt;({
  &lt;span style=&quot;color: #000&quot;&gt;declarations&lt;/span&gt;: [
    &lt;span style=&quot;color: #c0392b;&quot;&gt;AppComponent,
    LoginComponent,
    ProfileComponent,
    DashboardComponent,
    CategoriesComponent,
    AddCategoryComponent,
    AddProductComponent,
    AddTagComponent,
    AddTagToProductComponent,
    EcommerceComponent,
    OrdersComponent,
    ProductsComponent,
    ShoppingCartComponent,
    SangleProductComponent,
    UpdateProfileComponent,
    DisplayCategoryComponent,
    DisplayTagComponent&lt;/span&gt;
  ],
  &lt;span style=&quot;color: #000&quot;&gt;imports&lt;/span&gt;: [
    &lt;span style=&quot;color: #c0392b;&quot;&gt;BrowserModule,
    HttpClientModule,
    FormsModule,
    NoopAnimationsModule,
    MaterialModule,
    AppRoutingModule&lt;/span&gt;
  ],
  &lt;span style=&quot;color: #000&quot;&gt;providers&lt;/span&gt;: [&lt;span style=&quot;color: #c0392b;&quot;&gt;DatePipe&lt;/span&gt;],
  &lt;span style=&quot;color: #000&quot;&gt;bootstrap&lt;/span&gt;: [&lt;span style=&quot;color: #c0392b;&quot;&gt;AppComponent&lt;/span&gt;],
  &lt;span style=&quot;color: #000&quot;&gt;schemas&lt;/span&gt;: [ &lt;span style=&quot;color: #000;&quot;&gt;CUSTOM_ELEMENTS_SCHEMA&lt;/span&gt;, &lt;span style=&quot;color: #000;&quot;&gt;NO_ERRORS_SCHEMA&lt;/span&gt; ]
})
&lt;span style=&quot;color: #8e44ad;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #3498db;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #c0392b;&quot;&gt;AppModule&lt;/span&gt; { }
 
&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Now we have an overview of Angular 10 + Spring Boot App.&lt;/p&gt;
&lt;p&gt;We also take a look at client-server architecture for REST API using Spring Web MVC &amp;#38; Spring Data JPA, as well as Angular 10 project structure for building a front-end app to make HTTP requests and consume responses.&lt;/p&gt;&lt;br&gt;&lt;br&gt;

&lt;hr/&gt;
&lt;div style=&quot;background: #fff; border-radius: 10px; cursor: pointer; display: flex; font-size: 22px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;http://programming-with-drmas.blogspot.com/2022/01/build-application-ecommerce-with-spring.html&quot;&gt;Build an application Ecommerce with Spring boot and Angular part 1&lt;/a&gt; 
&lt;/div&gt;

  &lt;div style=&quot;background: none 0% 0% repeat scroll rgb(0, 137, 255); border-radius: 10px; color: white; cursor: pointer; display: flex; font-size: 22px; margin-top: 15px; padding: 10px;&quot;&gt; 
  &lt;a href=&quot;https://github.com/asmail11/ecommerce-angular&quot; style=&quot;color: #ecf0f1;&quot; target=&quot;_blank&quot;&gt; Download Ecommerce Application From Github &lt;/a&gt; 
&lt;/div&gt;&lt;br /&gt;

&lt;br /&gt;
&lt;style&gt; 
 pre:before {
   content: none;
  }
  pre {
   background-color: #fff;
   border-radius: 7px;
   line-height: 20px; 
   position: relative;
   overflow: auto;
   width: 100%;
  }
  
  code {
  color: #000;
  font-size: 13px;
  background-color: #1e1e1f;
  padding: 3px 10px 20px;
  }
 div::-moz-selection,
 b::-moz-selection,
 strong::-moz-selection,
 code::-moz-selection,
 span::-moz-selection {
  color: #000;
  background-color: #fff;
}
div::selection,
strong::selection,
b::selection,
code::selection,
span::selection {
  color: #000;
  background-color: #fff;
}
 .btnCopy {
  background-color: white; 
  color: black; 
  border: 1px solid #f44336;
  text-align: center;
  padding: 2px 16px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  float: right;
}
.btnCopy:hover {
  background-color: #fb4834;
  color: white;
  border-radius: 3px;
}
  .h2-title {
    background: #f9ca24; 
    border-left: 10px solid; 
    padding: 10px !important;
  }
&lt;/style&gt;

&lt;script&gt;  
  function copyOrdersTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnOrdersTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyOrdersHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnOrdersHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyOrdersCss(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnOrdersCss&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProductsTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProductsTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyProductsHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnProductsHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySangleProductTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSangleProductTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySangleProductHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSangleProductHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copySangleProductScss(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnSangleProductScss&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyShoppingCartTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnShoppingCartTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyShoppingCartHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnShoppingCartHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyShoppingCartCss(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnShoppingCartCss&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEcommerceTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEcommerceTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyEcommerceHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnEcommerceHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
  function copyDashboard(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDashboard&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
   function copyDisplayCategoryTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayCategoryTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
   function copyDisplayCategoryHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayCategoryHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
   function copyDisplayTagTs(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayTagTs&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyDisplayTagHtml(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnDisplayTagHtml&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyAppRouting(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppRouting&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copyAppModule(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtnAppModule&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copy(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtn&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copy(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtn&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copy(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtn&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copy(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtn&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copy(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtn&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copy(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtn&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
    function copy(containerid) {
  var range = document.createRange();
  range.selectNode(containerid); //changed here
  window.getSelection().removeAllRanges(); 
  window.getSelection().addRange(range); 
  document.execCommand(&quot;copy&quot;);
  window.getSelection().removeAllRanges();
  var idBtn = document.getElementById(&quot;idBtn&quot;);
  idBtn.style.backgroundColor = &quot;#fb4834&quot;;
  idBtn.style.color = &quot;#fff&quot;;
  idBtn.innerHTML = &quot;copied&quot;;
  idBtn.style.borderRadius = &quot;3px&quot;;
}
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='https://programming-with-drmas.blogspot.com/feeds/9009349415476049089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/build-application-ecommerce-with-spring_52.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/9009349415476049089'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1477003560702602309/posts/default/9009349415476049089'/><link rel='alternate' type='text/html' href='https://programming-with-drmas.blogspot.com/2022/01/build-application-ecommerce-with-spring_52.html' title='Build an application Ecommerce with Spring boot and Angular part 3'/><author><name>issamdrmas</name><uri>http://www.blogger.com/profile/05354700449605481984</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhuDfdKeu3dpaFILPESGtT8ydD0J93L0HpEAwU8faXGcJoIGBY5CBf-gZ6bVFYasRjlrgGOodUMFf1tcwQ68VLisIrgFw9l7dCYuAPi25TmL-6eyTck3jl_cu6YpYT30/s220/photo.jfif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/lJh35C56zII/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>