title: What is the correct way to check for String equality in Typescript (for Angular 4)
body: <p>In Angular 4, I want to check for the current url and if it is equal to "/login" I need to submit a specific form. Here is the code:</p>
  
  <pre><code> let responseString=this.router.url;
   console.log(responseString);
   if (responseString.match("/login")==null)
     this.submitForm();
  </code></pre>
  
  <p>The above code does not submit the form in all cases. There is something wrong with the if condition I guess.
  Any clues?</p>