Alternative to $scope in Angular 2.0 -
in angular 2.0, there no $scope
.
what alternative that? how able share data between components? scope
option available in directives? more practically, is there current alternative that can acquainted with?
i aware of controller as
read controllers eliminated too.
confused on such revolution angular team has started.
angular 2.0 using this
instead of $scope
.
one of major changes coming in 2.0 death of controller, , new emphasis on components. big advantage of moving towards component-based apps it's easier define interfaces; plus, html elements have mappable interface in events, attributes, , properties.
see migration of angularjs 1.3 2.0 here. see complete documentation of angular 2.0 here
Comments
Post a Comment