search

Home  >  Q&A  >  body text

angular.js - angularjs如何获取struts2的RequestAware的返回值呢?

如图:
初学angular,这个怎么用?

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";
    }

然后在ng-repeat中如何获取stu的值呢??
我这样获取不到呢

    <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>
某草草某草草2740 days ago505

reply all(1)I'll reply

  • 迷茫

    迷茫2017-05-15 17:03:37

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

    reply
    0
  • Cancelreply