Closed kuxiongxiong closed 7 years ago
in my legacy angular 1.X project ,in some directives it has some logic like $scope.$apply() how to handle this,any way to access $scope in component level?
Yes, you can use the @Inject parameter decorator in the constructor. consructor(@Inject('$scope') $scope) {...}
@Inject
consructor(@Inject('$scope') $scope) {...}
in my legacy angular 1.X project ,in some directives it has some logic like $scope.$apply() how to handle this,any way to access $scope in component level?