How i send value when i click button to server and popup directive
问题 When i click the button i want to send the val of label number to the func getUserDetails in controller and loop the data that returnd in result on the directive and popup to the screen the directive <div ng-controller="IndexController"> <label id="number" >5</label> <input type="button" ng-click="getUserDetails()" > </div> app.controller('IndexController', ['$scope', function ($scope) { $scope.getUserDetails = function() { var result = $http.get("/getUserDetails?id=" + number) } }]);