T
T
ta42014-07-31 15:44:20
Angular
ta4, 2014-07-31 15:44:20

AngularJS. Why can't he see the variable?

I am using the accordion component. angular-ui.github.io/bootstrap
There is a template

<div class="panel panel-default">
    <div class="panel-heading">
        <h4 class="panel-title">
            <a class="accordion-toggle" ng-click="isOpen =!isOpen" accordion-transclude="heading">{{heading}}</a>
        </h4>
    </div>
    <div class="panel-collapse" collapse="!isOpen">
        {{isOpen}}
       <div class="panel-body" ng-transclude>
           {{isOpen}}
       </div>
    </div>
</div>

In the first case, prints {{isOpen}} as true. In the second {{isOpen}} - it doesn't output anything. Who can explain why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-07-31
Protko @Fesor

habrahabr.ru/post/230761 - point 3.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question