javascript - How to render UI using php and angular for display and in place update -


<?php      $ach_json = json_decode ( $ach, true );      for($i = 0; $i < count ( $ach_json ); $i ++) {         echo "<ng:switch on='edit'>";          echo "<div ng:switch-when='true'>";          $title = $ach_json [$i] ['title'];         echo "<h3>title $title</h3><br>";         echo "<input type='image' src='http:'..'  name='edit' value='$i' ng-click='editclick()'>";            echo "</div>";         echo "<div ng:switch-when='false'>";         echo "title: <input type='text' ng-model='title' value=$title> <br>";         echo "<button ng-click='updaterequest()'>update</button>";         echo "</ng:switch>";     } ?> </form> 

here display title, when clicks on edit button, change textbox , give user update . once clicks on update , make rest call , need show updated title.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -