Trindaz
Trindaz

Reputation: 17849

Why doesn't ng-repeat detect parent scope function?

Why do I have to use

e in $parent.parentScopeFunc()

instead of

e in parentScopeFunc()

when

{{ parentScopeValue }}

works fine for displaying parent scope members in a template?

Upvotes: 1

Views: 52

Answers (1)

Vadim
Vadim

Reputation: 17957

You're either overriding that function in whichever directive it's failing in or the function is not initialized in the parent scope until after the child scope is created.

Upvotes: 3

Related Questions