This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Angular does not throw exception for un-assigned bi-directional scope property #6060
Closed
Description
please see demo - notice that foo
is not assigned yet there is no exception in console. Per $compile
docs exception should be raised, since foo
is non-optional:
If the parent scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You can avoid this behavior using =? or =?attr in order to flag the property as optional.
nice to have: IMO attributes should be treated in the same way: required unless ?
is used