2015-02-10 31 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

祝你好運!