我单击按钮,将数据一页以角度js传递给另一页。 这是检索数据
这是first_page.jsp
<div data-ng-repeat="user in usernames">
<p data-ng-bind="user.location">
<p data-ng-bind=”user.description”>
<button type=”submit” data-ng-click=”nextpage(user.eventid)” value=”Register”/>
这是将数据作为事件ID传递的second_page.jsp
<form name="myforms">
<div>
<input type="email" id="email" data-ng-value="myforms.eventid " placeholder="Enter your email" required />
</div>
<button class="button" type="submit" id="submiit" data-ng-click="creates()">Submit</button>
var app = angular.module('myApp', ['ngResource']);
app.controller('UserController', ['$scope', '$resource', '$http', '$location', '$window',function($scope,$resource,$http,$location,$window,Session)
{
$scope.nextpage= function(eventid)
{
$window.location = '/register.jsp/'+eventid;
};
}]);