angular.js - How does angularjs get the return value of struts2's RequestAware?
某草草
某草草 2017-05-15 17:01:37
0
1
538
As shown in the picture: I am a beginner in Angular, how to use this?
public class StudentsAction implements RequestAware {


    @Autowired
    private StudentService studentService;

    private Map<String, Object> request;


    @Override
    public void setRequest(Map<String, Object> map) {


        this.request = map;
    }

    public String list() {

        request.put("stu", studentService.getAllStudents());

        return "list";
    }
Then how to get the value of stu in ng-repeat? ? I can’t get it like this
    <tr ng-repeat="d in #request.stu | orderBy:predicate:reverse">
        <td>{{d.id}}</td>
        <td>{{d.name}}</td>
        <td>{{d.age}}</td>
        <td>{{d.address}}</td>
某草草
某草草

reply all(1)
迷茫

RequestAware没用过,不过你的问题应该不在这,而在于structs2中怎么返回jsonData is given to the front end, look here

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template