Dropdown values should be selected using AngularJs ng-option

127 Views Asked by At

on click i am creating row similar to the one added in the image. every time i would be having same row with same modal.

enter image description here How can i select the selected values from a row

1

There are 1 best solutions below

0
On
Its just a sample to get to your need.

.js file..

angular.module('nonStringSelect', [])
.run(function($rootScope) {
  $rootScope.model = { id: 2 };
})
.directive('convertToNumber', function() {
  return {
    require: 'ngModel',
    link: function(scope, element, attrs, ngModel) {
      ngModel.$parsers.push(function(val) {
        return parseInt(val, 10);
      });
      ngModel.$formatters.push(function(val) {
        return '' + val;
      });
    }
  };
});