News for hackers. Stuff that matters.
Re:Angular 11 by davedx on Thursday November 12, 2020 @10:26AM (#25070848)
Thanks for commenting!

It still seems strange to me, if you start a new Angular project then you know you're writing TypeScript, no ifs or buts - and that means if you write some code that doesn't compile, you'll have to fix it before it runs. I don't understand why that's seen as different in the template layer?

Great that it's there at all though, last time I developed with Angular templates didn't have type checking at all, and it kind of hurt.

Re:Angular 11 by mgechev on Thursday November 12, 2020 @10:56AM (#25071156)
Sorry for the miscommunication. I meant type checking in general, not in Angular templates in particular.

To get the same strictness as in TypeScript, you can enable `strictTemplates` in tsconfig.json. Here's our guide which goes into more details https://angular.io/guide/template-typecheck.