I recently had an issue where is set an input equal to "the-hero". The @Component macro lets this through, but angular throws at runtime since that's not a valid JavaScript identifier. I think it would be fairly simple to validate inputs at compile time inside the macro. You would have to account for the "a:b" syntax of inputs as well. I don't know off the top of my head what the js identifier regex is, but it should be fairly simple. For performance, you could create a pretty simple manual parser as well but for simplicity's sake a simple regex is probably fine.
I recently had an issue where is set an input equal to "the-hero". The
@Component
macro lets this through, but angular throws at runtime since that's not a valid JavaScript identifier. I think it would be fairly simple to validate inputs at compile time inside the macro. You would have to account for the "a:b" syntax of inputs as well. I don't know off the top of my head what the js identifier regex is, but it should be fairly simple. For performance, you could create a pretty simple manual parser as well but for simplicity's sake a simple regex is probably fine.