<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ben</title>
    <description>The latest articles on Forem by Ben (@imben1109).</description>
    <link>https://forem.com/imben1109</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F94884%2Fb40f2c83-1a1b-4f92-80cf-07fc4af0dcf2.jpeg</url>
      <title>Forem: Ben</title>
      <link>https://forem.com/imben1109</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/imben1109"/>
    <language>en</language>
    <item>
      <title>Single Sign On of Micro-Service Architecture (Authentication and Authorization)</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Thu, 24 Oct 2019 12:41:31 +0000</pubDate>
      <link>https://forem.com/imben1109/single-sign-on-of-micro-service-architecture-1p04</link>
      <guid>https://forem.com/imben1109/single-sign-on-of-micro-service-architecture-1p04</guid>
      <description>&lt;p&gt;How do you implement Single Sign On of Micro-Service Architecture?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OAUTH with JWT&lt;/li&gt;
&lt;li&gt;Shared Session by Memory Database (Redis/Spring Session)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>sso</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Date Handling in Angular Application (Part 2 - Angular Http Client and Ngx Datepicker)</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Tue, 02 Jul 2019 16:26:29 +0000</pubDate>
      <link>https://forem.com/imben1109/date-handling-in-angular-application-part-2-angular-http-client-and-ngx-datepicker-3fna</link>
      <guid>https://forem.com/imben1109/date-handling-in-angular-application-part-2-angular-http-client-and-ngx-datepicker-3fna</guid>
      <description>&lt;p&gt;&lt;strong&gt;Original Post&lt;/strong&gt;: &lt;a href="https://medium.com/self-learning/date-handling-in-angular-application-part-2-angular-http-client-interceptor-and-ngx-datepicker-bf32231010f8"&gt;https://medium.com/self-learning/date-handling-in-angular-application-part-2-angular-http-client-interceptor-and-ngx-datepicker-bf32231010f8&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;The below is a summary of previous &lt;a href="https://dev.to/imben1109/date-handling-in-angular-application-part-1-json-and-javascript-date-object-study-2p54"&gt;post&lt;/a&gt; about JavaScript Date Object and JSON Date.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSON is common communication format between server side and client side&lt;/li&gt;
&lt;li&gt;JavaScript Date Object is Time zone and Locale Dependent&lt;/li&gt;
&lt;li&gt;ISO 8601 Date Format is a general agreement for JSON Date representation&lt;/li&gt;
&lt;li&gt;JavaScript do not know JSON date type. Conversion between JSON Date String and JavaScript Date Object is required.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Seamless Integration Approaches
&lt;/h1&gt;

&lt;p&gt;In Angular Application, what could be done in order to make the seamless integration of JavaScript Date Object, JSON and UI Components?&lt;/p&gt;

&lt;p&gt;There would be two important parts for the seamless integration.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Communication between Client Side and Server Side&lt;/li&gt;
&lt;li&gt;Datepicker Handling&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Communication between Client Side and Server Side
&lt;/h1&gt;

&lt;p&gt;In Angular Application, it would provide HttpClientModule for simplifying HTTP Communication between client side and server side.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;this.httpClient.get&amp;lt;DataModel&amp;gt;("/api/getData").subscribe(
  (data: DataModel) =&amp;gt; {
    console.log(data);
  }
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Although, the data model (Interface) is defined above, JSON does not have date object. The date object would be presented as Data String in ISO format. &lt;strong&gt;The Data String would simply assign to date even though it is defined as Date in Interface in TypeScript. Note that the interface would be compiled to nothing and it is only for tying checking in typescript context.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;interface DataModel {
  data1: string; 
  data2: string; 
  data3: string
  date1: Date; 
  date2: Date; 
  date3: Date
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There would be two approaches to convert&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Http Client Pipe&lt;/li&gt;
&lt;li&gt;Angular Http Interceptor&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Http Client Pipe
&lt;/h2&gt;

&lt;p&gt;Http Client would return Observable for various provided method. The map operator in pipe could be used to convert date string to date object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;this.httpClient.get&amp;lt;DataModel&amp;gt;("/api/getData")
  .pipe(
    map((data)=&amp;gt;{
      data.date1 = new Date(data.date1);
      data.date2 = new Date(data.date2);
      data.date3 = new Date(data.date3);
      return data;
    })
  ).subscribe(
    (data: DataModel) =&amp;gt; {
      console.log(data);
    }
  );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Angular Http Interceptor
&lt;/h2&gt;

&lt;p&gt;As the date string is in ISO 8601, we want to have a generic way to do all the conversion. A custom HttpInterceptor would be added to Angular Application for intercepting request and response.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
export class JsonDateInterceptor implements HttpInterceptor {


  private _isoDateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d*)?Z$/;

  intercept(req: HttpRequest&amp;lt;any&amp;gt;, next: HttpHandler): Observable&amp;lt;HttpEvent&amp;lt;any&amp;gt;&amp;gt; {
    return next.handle(req).pipe(map( (val: HttpEvent&amp;lt;any&amp;gt;) =&amp;gt; {
      if (val instanceof HttpResponse){
        const body = val.body;
        this.convert(body);
      }
      return val;
    }));
  }


  isIsoDateString(value: any): boolean {
    if (value === null || value === undefined) {
      return false;
    }
    if (typeof value === 'string'){
      return this._isoDateFormat.test(value);
    }    return false;
  }
  convert(body: any){
    if (body === null || body === undefined ) {
      return body;
    }
    if (typeof body !== 'object' ){
      return body;
    }
    for (const key of Object.keys(body)) {
      const value = body[key];
      if (this.isIsoDateString(value)) {
        body[key] = new Date(value);
      } else if (typeof value === 'object') {
        this.convert(value);
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;this._httpClient.post&amp;lt;Value&amp;gt;("/api/posts", this.value)
  .subscribe((val: Value) =&amp;gt; {
    console.log(val.date1);
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Angular UI Datepicker
&lt;/h1&gt;

&lt;p&gt;The Date Object in Browser is timezone and locale dependent. Sometimes, we would like to have custom presentation of date which in defined in the web application. We do not want to care about the browser setting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TO BE CONTINUED&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/self-learning/ngx-datepicker-utc-datepicker-design-77e33789e9d7"&gt;https://medium.com/self-learning/ngx-datepicker-utc-datepicker-design-77e33789e9d7&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Reference
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://angular.io/guide/http"&gt;https://angular.io/guide/http&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://angular.io/guide/http#intercepting-requests-and-responses"&gt;https://angular.io/guide/http#intercepting-requests-and-responses&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>angular</category>
      <category>datepicker</category>
      <category>javascript</category>
      <category>date</category>
    </item>
    <item>
      <title>Date Handling in Angular Application (Part 1 — JSON and JavaScript Date Object Study)</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Sun, 30 Jun 2019 17:41:11 +0000</pubDate>
      <link>https://forem.com/imben1109/date-handling-in-angular-application-part-1-json-and-javascript-date-object-study-2p54</link>
      <guid>https://forem.com/imben1109/date-handling-in-angular-application-part-1-json-and-javascript-date-object-study-2p54</guid>
      <description>&lt;p&gt;&lt;a href="https://medium.com/self-learning/date-handling-in-angular-application-part-1-json-and-javascript-date-object-s-8f77a69734c7"&gt;https://medium.com/self-learning/date-handling-in-angular-application-part-1-json-and-javascript-date-object-s-8f77a69734c7&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;In modern web application, JSON is widely used as communication format between server side and client side. However, JSON do not specify the format of date object.&lt;/p&gt;

&lt;h1&gt;
  
  
  General Agreement
&lt;/h1&gt;

&lt;p&gt;ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) is a general agreement for exchange format of date object.&lt;/p&gt;

&lt;h1&gt;
  
  
  JavaScript Date Object
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var now = new Date()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above is a way to create a date object in browser environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Time zone and locale dependent
&lt;/h2&gt;

&lt;p&gt;By Default, browser would use the time zone and locale to display date in browser. i.e.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var now = new Date();
console.log(now.toString());
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; Sun Jun 30 2019 23:18:34 GMT+0800 (China Standard Time)&lt;/p&gt;

&lt;p&gt;The some method in the date object in browser are timezone and locate dependent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var now = new Date();
now.getHours()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;result:&lt;/strong&gt; 23&lt;/p&gt;

&lt;h2&gt;
  
  
  ISO Format (Time zone and locale independent)
&lt;/h2&gt;

&lt;p&gt;As mention above, ISO Date String Format is a general agreement format in JSON format.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var now = new Date()
console.log(now.toISOString());
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;result:&lt;/strong&gt; 2019-06-30T15:55:46.936Z&lt;/p&gt;

&lt;h1&gt;
  
  
  JSON Conversion
&lt;/h1&gt;

&lt;p&gt;Convert Date Object to JSON&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var jsonData = {date1: new Date()};
console.log(JSON.stringify(jsonData));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;result:&lt;/strong&gt; {"date1":"2019-06-30T16:26:18.460Z"}&lt;/p&gt;

&lt;h2&gt;
  
  
  Revert JSON to JavaScript Object
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var jsonData = {date1: new Date()};
var jsonDataStr = JSON.stringify(jsonData)
var revertedJsonData = JSON.parse(jsonDataStr);
console.log(revertedJsonData);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;result:&lt;/strong&gt; {date1: "2019-06-30T16:30:19.096Z"}&lt;/p&gt;

&lt;p&gt;It is found the JSON reversion (JSON.parse) do not know the type of Date. It cannot convert the date string to Date object.&lt;/p&gt;

&lt;p&gt;The ISO 8601 is a agreed format for the date object json string. We could use the reviver function in JSON.parse to help the conversion.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var isoDateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d*)?Z$/;
function parseIsoDateStrToDate(key, value){
  if (typeof value === "string" &amp;amp;&amp;amp; isoDateFormat.test(value)){
    return new Date(value);
}
  return value
}
var jsonData = {date1: new Date()};
var jsonDataStr = JSON.stringify(jsonData)
var revertedJsonData = JSON.parse(jsonDataStr, parseIsoDateStrToDate);
console.log(revertedJsonData);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;result:&lt;/strong&gt; {date1: Mon Jul 01 2019 01:00:04 GMT+0800 (China Standard Time)}&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary of JSON Date And JavaScript Date Object
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript Date Object is Time zone and Locale Dependent&lt;/li&gt;
&lt;li&gt;ISO 8601 Date Format is a general agreement for JSON Date representation&lt;/li&gt;
&lt;li&gt;JavaScript do not know JSON date type&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Reference
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://json.org/"&gt;http://json.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://es5.github.io/#x15.9.2"&gt;http://es5.github.io/#x15.9.2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Part2:&lt;/strong&gt; &lt;a href="https://dev.to/imben1109/date-handling-in-angular-application-part-2-angular-http-client-and-ngx-datepicker-3fna"&gt;https://dev.to/imben1109/date-handling-in-angular-application-part-2-angular-http-client-and-ngx-datepicker-3fna&lt;/a&gt; &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>json</category>
      <category>angular</category>
      <category>date</category>
    </item>
    <item>
      <title>Complex and Dynamic Form Design in Angular (Part 1 - Form Group)</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Sat, 29 Jun 2019 12:15:12 +0000</pubDate>
      <link>https://forem.com/imben1109/nested-custom-component-and-form-group-part-1-1f97</link>
      <guid>https://forem.com/imben1109/nested-custom-component-and-form-group-part-1-1f97</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;In Modern Web Application, a from could be very very very complicated. It would require a fancy layout, dynamic, validated, functional and also performance.&lt;/p&gt;

&lt;p&gt;All make the Web Application Development difficult and cost so much resource. All the developed framework tried to make it easier but still very very very difficult.&lt;/p&gt;

&lt;p&gt;Here, I would like to share some approaches to handle it in Angular.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Form Group as Parameter (FormGroup Approach)&lt;/li&gt;
&lt;li&gt;Self Register Form (FormGroup Approach)&lt;/li&gt;
&lt;li&gt;Context Service (RxJs Approach)&lt;/li&gt;
&lt;li&gt;Angular Input Output Handling (Input Out Approach)&lt;/li&gt;
&lt;li&gt;Angular Two Way binding Approach (Input Out Approach)&lt;/li&gt;
&lt;li&gt;NgRx Store Approach (Redux Approach)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Form Group as Parameter
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbbgbmjqx436tede8hrac.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbbgbmjqx436tede8hrac.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Self Register Form Group
&lt;/h2&gt;

&lt;p&gt;The mother form is required to provide the addControl mechanism to the form when the child form is initialized and destroyed. For example, the ngFor and ngIf situation should be catered.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fg3asre7c8nk46ecg2trt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fg3asre7c8nk46ecg2trt.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mother Form&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;abstract class MotherForm {
  form: FormGroup;
  constructor(){
    this.from = this.initializeForm();
  }

  initializeForm(): FormGroup {
    return new FormGroup({})
  }
  addControlGroup(name: string, formGroup: AbstractControl): void {
    this.form.addControl(name, formGroup);
  }
  removeControl(name: string){
    this.form.removeControl(name);
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Children Form&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;abstract class ChildrenForm implements OnInit, OnDestroy {
  @Input()
  intialValue: any
  form: FormGroup
  constructor(@Host private _motherForm: MotherForm){
    this.form = this.initializeForm();
  }
  initializeForm() : FormGroup{
    return new FormGroup({});
  }
  getFormName(): string {
    return 'emptyForm'
  }
  ngOnInit(){
    if (this.intialValue){
      this.form.setValue(this.initialValue)
    }
    this._motherForm.addControlGroup(this.getFormName(), this.form);
  }
  ngOnDestroy(){
    this._motherForm.removeControlGroup(this.getFormName());
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, The implementation class would leverage these abstract class for self registration.&lt;/p&gt;

&lt;p&gt;app-self-register.component.ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Component, OnInit } from '@angular/core';
import MotherForm from './mother-form';
import { FormGroup, FormControl } from '@angular/forms';
@Component({
  selector: 'app-self-register',
  templateUrl: './self-register.component.html',
  styleUrls: ['./self-register.component.css']
})
export class SelfRegisterComponent extends MotherForm {
  constructor() {
   super();
  }
  initializeForm(){
    return new FormGroup({
      name: new FormControl('')
    })
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;app-self-register.component.html&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form [formGroup]="form"&amp;gt;
  &amp;lt;input formControlName="name"/&amp;gt;
  &amp;lt;app-self-register-children1&amp;gt;&amp;lt;/app-self-register-children1&amp;gt;
&amp;lt;/form&amp;gt;
{{form.value | json}}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;self-register-children1.component.ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { FormGroup, FormControl } from '@angular/forms';
import { Component, OnInit, Host } from '@angular/core';
import ChildrenForm from '../children-form';
import { SelfRegisterComponent } from '../self-register.component';
@Component({
  selector: 'app-self-register-children1',
  templateUrl: './self-register-children1.component.html',
  styleUrls: ['./self-register-children1.component.css']
})
export class SelfRegisterChildren1Component extends ChildrenForm  {
  constructor(@Host() _motherForm: SelfRegisterComponent) {
    super(_motherForm);
  }
  initializeForm(): FormGroup{
    return new FormGroup({
      name: new FormControl('')
    })
  }
  getFormName(): string {
    return "selfRegisterChildren1";
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;self-register-children1.component.html&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form [formGroup]="form"&amp;gt;
  &amp;lt;input formControlName="name"/&amp;gt;
&amp;lt;/form&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fc0pwcarw8p90wmcpi9um.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fc0pwcarw8p90wmcpi9um.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/self-learning/nested-custom-component-and-form-group-53806a2cd0f5" rel="noopener noreferrer"&gt;https://medium.com/self-learning/nested-custom-component-and-form-group-53806a2cd0f5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>angular</category>
      <category>design</category>
      <category>form</category>
    </item>
    <item>
      <title>How do you develop angular application with with different back-end technologies</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Mon, 08 Oct 2018 10:38:55 +0000</pubDate>
      <link>https://forem.com/imben1109/how-do-you-develop-angular-application-with-with-different-back-end-technologies-1ah4</link>
      <guid>https://forem.com/imben1109/how-do-you-develop-angular-application-with-with-different-back-end-technologies-1ah4</guid>
      <description>&lt;p&gt;I am trying to develop angular application with J2EE.&lt;/p&gt;

&lt;p&gt;Server-side: Java, J2EE, Spring, Spring MVC, MyBatis, Maven&lt;br&gt;
Client-side: TypeScript, Angular, Yarn, Webpack&lt;/p&gt;

&lt;p&gt;In development environment, I would like to use webpack dev server to route angular application to spring application. I would use different ide to develop front end application and backend application which is eclipse and visual studio code.&lt;/p&gt;

&lt;p&gt;In integration environment, they would be packaged as a single war. &lt;/p&gt;

&lt;p&gt;What is your way to develop angular application with different back-end technologies&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>How would you manage a system which the original author have left your team?</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Thu, 27 Sep 2018 07:47:14 +0000</pubDate>
      <link>https://forem.com/imben1109/how-would-you-manage-a-system-which-the-original-author-have-left-your-team-2dlp</link>
      <guid>https://forem.com/imben1109/how-would-you-manage-a-system-which-the-original-author-have-left-your-team-2dlp</guid>
      <description>&lt;p&gt;You may be assigned to manage a system. Unfortunately, the original author of your system have left your team. &lt;/p&gt;

&lt;p&gt;How could you manage your system such enhancement, bug fixing, etc? &lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>How do you think of angularjs application</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Fri, 21 Sep 2018 10:53:33 +0000</pubDate>
      <link>https://forem.com/imben1109/how-do-you-think-of-angularjs-application-2pel</link>
      <guid>https://forem.com/imben1109/how-do-you-think-of-angularjs-application-2pel</guid>
      <description>&lt;p&gt;As you know angular 2x is nearly completely different js framework, what do you think of application which is just actively developing in angularjs?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>How would you define your deliverables quality</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Fri, 21 Sep 2018 05:26:56 +0000</pubDate>
      <link>https://forem.com/imben1109/how-would-you-define-your-deliverables-quality-1f54</link>
      <guid>https://forem.com/imben1109/how-would-you-define-your-deliverables-quality-1f54</guid>
      <description></description>
      <category>discuss</category>
    </item>
    <item>
      <title>How would you write a guideline for junior developer</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Thu, 20 Sep 2018 12:19:07 +0000</pubDate>
      <link>https://forem.com/imben1109/how-would-you-write-a-guideline-for-junior-developer-h1i</link>
      <guid>https://forem.com/imben1109/how-would-you-write-a-guideline-for-junior-developer-h1i</guid>
      <description>&lt;p&gt;As there are many way for implementation, it would be chaos if no standard for implementation. &lt;/p&gt;

&lt;p&gt;How would you guide the junior devloper to follow the same way?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>How do limit the application behaviour for change</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Wed, 19 Sep 2018 12:03:48 +0000</pubDate>
      <link>https://forem.com/imben1109/how-do-limit-the-application-behaviour-for-change-1da4</link>
      <guid>https://forem.com/imben1109/how-do-limit-the-application-behaviour-for-change-1da4</guid>
      <description>&lt;p&gt;As chanage is inevitable, how would you prevent change in a specific period in order to make project completed.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>What is difference among enterprise architect, solution architect, software architect, system architect and cloud architect?</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Wed, 19 Sep 2018 08:20:16 +0000</pubDate>
      <link>https://forem.com/imben1109/what-is-difference-among-enterprise-architect-solution-architect-software-architect-and-cloud-architect-5boo</link>
      <guid>https://forem.com/imben1109/what-is-difference-among-enterprise-architect-solution-architect-software-architect-and-cloud-architect-5boo</guid>
      <description></description>
      <category>discuss</category>
    </item>
    <item>
      <title>What is difference of In-house Development Team and Vendor?</title>
      <dc:creator>Ben</dc:creator>
      <pubDate>Mon, 17 Sep 2018 06:32:13 +0000</pubDate>
      <link>https://forem.com/imben1109/what-is-difference-of-in-house-development-team-and-vendor-4k37</link>
      <guid>https://forem.com/imben1109/what-is-difference-of-in-house-development-team-and-vendor-4k37</guid>
      <description>&lt;p&gt;What do you think of In-house Development Team and Vendor?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is the difference?&lt;/li&gt;
&lt;li&gt;What is the advantage and disadvantage?&lt;/li&gt;
&lt;li&gt;Any other feeling on them?&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>healthydebate</category>
      <category>discuss</category>
      <category>career</category>
    </item>
  </channel>
</rss>
