Angular 1 $ scope and Controller how, when did $ scope die?

Since when does “Controller Like” exist, does it not exist with angular 1.2? released at the end of 2013? why did people, books, blogs, and tutorials write code with $ scope back in 2015?

I saw people with 1 or 2 years of experience using the angular 1.1 or angular 1.2 programming style in 2015 and 2016, they were lost with angular 1.5, for example, without using components.

Jobs ask angular to just ask for an "angular programmer", do they know that there are big differences between people who use each angular differently, for example, using $ scope or just directives rather than components, or they don't use ES2015 with babel?

I never understood that. When did $ scope really die? If this question is not for stackoverflow, where can I post it?

+4
source share
1 answer

The realm is not dead and probably never will. It is generally accepted that a function has controllerAsreplaced scope, but it is not. In fact, controllerAsit concludes that the value is scopeignored when before all viewmodel members of each template were declared in the component area, now they are declared in the component class this, and in the end, it becomes a member of the area that isolates all the features of your view model in one object area inside.

controllerAs - , scope , , scope . , , .. controllerAs viewmodel scope . , , .

, , . ​​, , . , angularjs, , controllerAs components - , .

+2

Source: https://habr.com/ru/post/1664897/


All Articles