title: angularjs scope variable change onclick for conditional div
body: <p>i have two divs i want to show them conditionally with onclick event .</p>
  
  <p>my-angular-app.js</p>
  
  <pre><code>$(document).on('click', '#showless', function(el) {
   var appElement = document.querySelector('[ng-app=myapp]');
   var $scope = angular.element(appElement).scope();
    $scope.$apply(function() {
        $scope.value = false;
      });
  
  });
  
  $(document).on('click', '#showmore', function(el) {
    var appElement = document.querySelector('[ng-app=myapp]');
    var $scope = angular.element(appElement).scope();
    $scope.$apply(function() {
         $scope.value = true;
   });
  
  });
  </code></pre>
  
  <p>and my div of myapp (myapp.html)</p>
  
  <pre><code>    &lt;div ng-show="desc" id="description" class="text-muted" style="padding-top:5px;padding-left:10px;padding-right:10px;color:#2E2E2E;font-size:11px;"&gt;{{myapp.value|truncate}}&lt;span&gt;&lt;a id="showmore" href=""&gt;more&lt;/a&gt;&lt;/span&gt;
      &lt;/div&gt;
      &lt;div ng-show="!desc" id="description" class="text-muted" style="padding-top:5px;padding-left:10px;padding-right:10px;color:#2E2E2E;font-size:11px;"&gt;{{myapp.value}}&lt;span&gt;&lt;a id="showless" href=""&gt;less&lt;/a&gt;&lt;/span&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>(truncate is a filter i wrote which works fine .)</p>