angular/angular.js — pull request #3460 by lgalfaso (2013-08-02 17:04:13+00:00)
Title: refactor(parse): set values on highest possible parent

This is one of those PRs that I am torn about, but after seeing a lot of developers have so many WTF moments, I thought it was about time to change this

When assigning a value on a scope, the expression is visible but not defined at the current scope then assign the value on the highest possible scope that would make the expression visible on the child scope. If the value is not defined at any scope, then the value is defined at the child scope

BREAKING CHANGE: assign of values is done at the scope that has the expression definition when there is no dot notation

To force that a property is set on the current scope, prepend the expression with `this.` like the example below:

Before:

After