1
我有两个问题:呼叫功能和填充表angularjs
我不知道如何调用使用angularJS在HTML页面的Java类的功能。
我需要使用按钮后禁用它。
我的地址是:http://localhost:8080/CreditCardWEB/rest/cc/init
我在我的课有这样:
CardBean.java
@GET
@Path("/init")
public void init() {
Student s = new Student(1, "Pera", "Peric");
em.persist(s);
s = new Student(2, "Pera2", "Peric2");
em.persist(s);
s = new Student(3, "Pera3", "Peric3");
em.persist(s);
}
在我indexStud.html页,我有一个按钮:
<button ng-click="initStud()">Init Student</button>
在我controllers.js我有问题,但我不知道如何做到这一点:
$scope.initStud = function() {
//call the function from Cardbean.java
//disable the button after he is used
}