title: String contains an invalid character?
body: <p>I am trying to create a simple user login and password page not with a back-end service for now.</p>
  <p>Once I enter my password I want to route my page to dashboard. I am using core UI framework and Angular 4. Now I have a uncaught error. How can I solve the following errors?</p>
  <p><strong>login.component.ts</strong></p>
  <pre><code>import { Component } from '@angular/core';
  import { Router } from '@angular/router';
  import { DashboardComponent } from '../dashboard/dashboard.component';
  
  declare var Dashboard:any;
  
  @Component({
      templateUrl: 'login.component.html',
  })
  export class LoginComponent {
      data: any = {};
      constructor(private router: Router){}
      formSubmit(){
        if(this.data.username == &quot;admin&quot; &amp;&amp; this.data.password == &quot;admin&quot;){
          this.router.navigate([Dashboard]);
        }
      } 
  }
  </code></pre>
  <p><strong>login.component.html</strong></p>
  <pre><code>&lt;div class=&quot;app flex-row align-items-center&quot; (ngSubmit)=&quot;formSubmit()&quot;&gt;
  &lt;div class=&quot;container&quot;&gt;
  &lt;div class=&quot;row justify-content-center&quot;&gt;
  &lt;div class=&quot;col-md-8&quot;&gt;
  &lt;div class=&quot;card-group mb-0&quot;&gt;
  &lt;div class=&quot;card p-2&quot;&gt;
     &lt;div class=&quot;card-block&quot;&gt;
        &lt;h1&gt;Login&lt;/h1&gt;
        &lt;p class=&quot;text-muted&quot;&gt;Sign In to your account&lt;/p&gt;
        &lt;div class=&quot;input-group mb-1&quot;&gt;
           &lt;span class=&quot;input-group-addon&quot;&gt;&lt;i class=&quot;icon-user&quot;&gt;&lt;/i&gt;&lt;/span&gt;
           &lt;input type=&quot;text&quot; class=&quot;form-control&quot; placeholder=&quot;Username&quot; [(ngModel)=&quot;data.username&quot;]&gt;
        &lt;/div&gt;
        &lt;div class=&quot;input-group mb-2&quot;&gt;
           &lt;span class=&quot;input-group-addon&quot;&gt;&lt;i class=&quot;icon-lock&quot;&gt;&lt;/i&gt;&lt;/span&gt;
           &lt;input type=&quot;password&quot; class=&quot;form-control&quot; placeholder=&quot;Password&quot; [(ngModel)=&quot;data.password&quot; &gt;
        &lt;/div&gt;
        &lt;div class=&quot;row&quot;&gt;
           &lt;div class=&quot;col-6&quot;&gt;
              &lt;button type=&quot;button&quot; class=&quot;btn btn-primary px-2&quot;&gt;Login&lt;/button&gt;
           &lt;/div&gt;
        &lt;/div&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>