AngularJS ngBindHtml with filter.

by khushboo097

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.1/angular-sanitize.min.js"></script>
<div ng-app="myApp" ng-controller="MainCtrl">
  <div class="mb-20" ng-repeat="row in rows" ng-mouseenter="rowid=$index+1">
    <span>{{$index+1}}</span>
    <span>{{row.value}}</span>
    <span><button ng-disabled="rowid!=$index+1" ng-mouseout="rowid=0">
        edit
      </button></span>
  </div>
</div>

CSS

.mb-20{
  margin-bottom:60px;
  width: 35%;
}

JavaScript

var app = angular.module('myApp', ['ngSanitize']);

app.controller('MainCtrl', function($scope) {
  $scope.text = "Test text.";
  /* $scope.editOption = true;*/

  $scope.rows = [
  { value: "Text line one" },
  { value: "Text line two" },
  { value: "Text line three" }
  ];
});