Hi ,

I am trying to implement one way binding dynamically. how can we do it. 
please look into ternary condition. please help to fix this.

<!DOCTYPE html>
<html lang="en-US">
<head>
 <title>Welcome in the Angular JS</title>
 <script 
src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-rc.1/angular.min.js";></script>
 </head>
<body ng-app="sampleApplication">
  <div ng-controller="sampleController" >
      <div ng-init="sampletext='demo'">
      <input type="checkbox" ng-init="checkbox=true"  ng-model="checkbox">
      <input type="textbox"  ng-model="sampletext">
      <div ng-bind="((checkbox==true) ? ::sampletext:sampletext)"></div>
  <div ng-if="((checkbox==true) ? 
::sampletext=='tes':sampletext=='test')">ssdsd</div>
    </div>
  </div>
<script> 
  var app = angular.module("sampleApplication", ['ngSanitize']); 
  app.controller("sampleController", function($scope) { 
    $scope.title="Welcome In The <b>Angular JS</b>"; 
  }); 
</script>
</body>
</html>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to