build-your-own-angularjs
build-your-own-angularjs copied to clipboard
p14: "triggers chained watchers in the same digest" throws error
the unit test "triggers chained watchers in the same digest" thows the error "TypeError: undefined is not an object (evaluating 'newValue.subString')". this is expected because, we are calling .substring(0,1), even before it is assigned a value in the second watch's listener function, but in the text the expected behaviour is written otherwise.
Please can you clarify.