ui-mask
ui-mask copied to clipboard
Object given as ui-options shouldn't get assigned to
I decided to store an object that is common to some of my masked fields on a module. Module gets imported to the controller module and the object is assigned onto the controller. Then the object is passed to ui-options via template expression.
It happened that I defined the original module using Object.freeze. I got an error saying that It's not possible to extend the object. It seems like when expression in ui-options attribute gets evaluated defaults are assigned onto it. Correct behaviour would be to assign first defaults, then local overrides onto a fresh object each time.