title: Currently angular 5 is giving me different problems in firefox and chrome
body: <p>I've been trying to resolve since few days but still I'm getting errors. Updated angular cli, nodejs to latest but still getting following errors. And again I'm confused with errors that is different in firefox and chrome. Please help me I have just started angular to learn for my job. I'm still confused whether there is an error in my code or the browsers are confused like me.</p>
  
  <p><strong>In Chrome</strong></p>
  
  <pre><code>  'ERROR TypeError: Cannot read property 'UserName' of undefined
  </code></pre>
  
  <p><strong>In firefox</strong></p>
  
  <pre><code>  TypeError: _co.user is undefined
  </code></pre>
  
  <p><strong>Code snippets</strong></p>
  
  <pre><code>  &lt;input type="text" name="UserName" #UserName ="ngModel" [(ngModel)]="user.UserName"&gt;
  </code></pre>
  
  <p><strong>sign-up-components.ts</strong></p>
  
  <pre><code>  import { Component, OnInit } from '@angular/core';
    import { User } from '../shared/user.model';
    import { NgForm } from '@angular/forms';
    import { UserService } from '../shared/user.service';
  
    @Component({
         selector: 'app-sign-up',
         templateUrl: './sign-up.component.html',
         styleUrls: ['./sign-up.component.css']
    })
    export class SignUpComponent implements OnInit {
  
    user : User;
  
    constructor( private userService : UserService) { }
  
    ngOnInit() { 
    }
  
    OnSubmit(form : NgForm){
  
        this.userService.addUser(form.value).subscribe((data : any)=&gt; {
  
              if(data.Succeeded ==true){
              console.log("transferred successfull");
          }
       });
      }   
  
    }
  </code></pre>
  
  <p><strong>user.model</strong></p>
  
  <pre><code>   export class User {
  
       UserName: string;
       Password: string;
       Email: string;
       FirstName: string;
       LastName: string;
  
    }
  </code></pre>
  
  <p>Please if anyone has gone through this then update me with the solutions.
  since i have started the angular I have updated cli twice i guess. At the beginning there was no such error. But since I have updated the error is coming. </p>