How to get selected value from ng-repeat

后端 未结 2 1228
有刺的猬
有刺的猬 2021-01-07 13:10

This is my code.

I m getting data through ng-repeat and showing it as shown in below code.

What I want is if I click on either of the name then it should ale

2条回答
  •  执笔经年
    2021-01-07 13:23

    You need to modify html and add selectInfo function in controller file.

    html

    {{x.id}} {{x.firstname}} {{x.middlename}} {{x.lastname}}

    code

    $scope.selectInfo=function(name){
    alert(name);
    }
    

提交回复
热议问题