Why ng-transclude's scope is not a child of its directive's scope - if the directive has an isolated scope?

前端 未结 3 1494
醉酒成梦
醉酒成梦 2020-11-30 05:38

Given a directive (container1) with transclude and an isolated scope, when the directive is linked then I have these scopes:

Scope 004                   


        
3条回答
  •  青春惊慌失措
    2020-11-30 06:13

    The top answer is only correct for Angular up to v1.2.

    Since Angular v1.3 the behaviour has changed, and it now behaves exactly as described in the "I expected" part of the question, making this question obsolete for Angular v1.3+.

    Source: https://github.com/angular/angular.js/commit/fb0c77f0b66ed757a56af13f81b943419fdcbd7f

提交回复
热议问题