ta42014-07-31 15:44:20
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>
    <div class="panel-collapse" collapse="!isOpen">
       <div class="panel-body" ng-transclude>

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)
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