title: why angular pattern regex not working in html by work well in typescript
body: <p><em>Hi, Anyone can explain to me why regex expression in pattern property is not working</em> </p>
  
  <pre><code>  &lt;input type="password" pattern="(?=.*[a-zA-Z])(?=.*[0-9])" minlength="6" [class.is-invalid]="passwordForm.errors &amp;&amp; passwordForm.touched" #passwordForm="ngModel" name="password"  required class="form-control" [(ngModel)]="password"&gt;
  
   but i run in typescript it work well
   var mediumRegex = new RegExp("(?=.*[a-zA-Z])(?=.*[0-9])");
      console.log(
        mediumRegex.test("123asA")
    );
  
  ---&gt;true
    console.log(
      mediumRegex.test("")
  );
  ---&gt;false
    console.log(
      mediumRegex.test("aaaa")
  ---&gt;false
  
  ); console.log(
    mediumRegex.test("1z")
  );
  ---&gt;true
  </code></pre>