AngularJS Batarang - What are interceptedExpressions?
Asked Answered
D

1

28

I'm currently using the AngularJS 1.3.0 stable build and the Batarang Chrome extension. In the watch tree I notice that under many of my scopes there's something called "interceptedExpression". What is that or what scenarios create an interceptedExpression?

Delorenzo answered 14/10, 2014 at 14:25 Comment(0)
O
32
  • What is interceptedExpression?

    interceptedExpression is a function returned by $parse.

  • Why its called interceptedExpression in Batarang?

    Because the function declared inside angular source code is a named function called interceptedExpression.

  • What scenarios create an interceptedExpression?

    One of the scenarios I know is when you declare a local scope property using = in a directive. This will create a interceptedExpression record in batarang. See angular src here.

Ogee answered 23/10, 2014 at 13:23 Comment(4)
what about regularInterceptedExpression?Quintilla
is there a way to reduce this is the case of the directives using =?Locust
or a oneTimeInterceptedExpressionProlongation
I think the only way to reduce it is by reducing the number of properties nested within $scope in your controller.Township

© 2022 - 2024 — McMap. All rights reserved.