mgechev / codelyzer

Static analysis for Angular projects.
http://codelyzer.com/
MIT License
2.45k stars 235 forks source link

Feature request: template-no-duplicate-directives #635

Closed rafaelss95 closed 6 years ago

rafaelss95 commented 6 years ago

@Component({
  templateUrl: `
    <form>
      <input type="text" name="anyname" [(ngModel)]="bind1" [(ngModel)]="bind2">
      <!-- should report failure here -->
    </form>
  `
})
export class AppComponent  {
  bind1: string;
  bind2: string;
}
lazarljubenovic commented 6 years ago

I wonder if this should be Anguar compile-time error. In what cases does this even make sense?