2015-02-10 106 views
0

我不熟悉angular或jquery等。我正在玩JSF更长的时间。有没有方法partial submit/process并容易写?我想知道partial page processing角度部分提交/处理

示例 - angularjs中有一些功能吗?

<div id="div1"> 
    here some input 

    <button type="button" ng-update="div1" id ="btn1"/> 
</div> 

<div id="div2"> 
    here some input 

    <button type="button" ng-update="div2" id ="btn2"/> 
</div> 

<button type="button" ng-update="div1 div2" id ="btn3"/> 

我的期望是

Click `bnt1` -> only `div1` will be process. 
Click `bnt2` -> only `div2` will be process. 
Click `bnt3` -> Both of `div1` and `div2` will be process. 

回答

3

不,这不是需要的角度,它总是刷新整个页面。如果您希望div 1中的某些值发生变化,只需更新控制器中的变量,屏幕就会自动反映这些变化。

+0

投票:)我会先去测试它。我会回到这里。谢谢! – CycDemo 2015-02-10 07:26:24

0

Angular的建立是为了解决这个问题。如果您只需要控制部分页面,请考虑构建指令。那会晚一点。现在,看看这篇文章,介绍角:

http://tinyurl.com/m4mvf6z

祝你好运!