title: Type 'string | undefined' is not assignable to type 'string' in Angular 12 template
body: <p>I have an interface with few optional properties</p>
  <pre><code>export interface NavigationItem {
    id: string;
    title: string;
    classes?: string;
    badge?: {
      title?: string;
      translate?: string;
      bg?: string;
      fg?: string;
    };
  }
  
  </code></pre>
  <p>In the template, when passing value to input properties</p>
  <pre><code>&lt;span *ngIf=&quot;item?.badge&quot; [ngStyle]=&quot;{'background-color': item?.badge?.bg,'color': item?.badge?.fg}&quot;
            [translate]=&quot;item?.badge?.translate&quot;
            class=&quot;nav-link-badge&quot;&gt;
              {{item?.badge?.title}}
          &lt;/span&gt;
  </code></pre>
  <p>It is giving error</p>
  <pre><code>Type 'string | undefined' is not assignable to type 'string'
  </code></pre>