Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <! DOCTYPE html> <html lang = "en-US" > <head> <meta charset = "UTF-8" /> <title> Spring MVC 4 REST + AngularJS </ title> </ head> <body ng- app = "myApp" > <div ng-controller = "PersonController as personCtrl" > <h1> Spring MVC 4 REST + AngularJS </ h1> <form name = "personForm" method = "POST" > <table><tr> <td colspan = "2" >
- <div ng-if = "personCtrl.flag! = 'modifica'" > <h3> Aggiungi nuova persona </ h3> </ div> <div ng-if = "personCtrl.flag == 'modifica'" > <h3 > Aggiorna persona per ID: {{personCtrl.person.pid}} </ h3> </ div> </ td> </ tr> <tr> <td> Nome: </ td> <td> < tipo di input = "text" name = "name" ng-model = "personCtrl.person.name" richiesto /><span ng-show = "personForm.name. $ error.required"
- class = "msg-val" > Nome richiesto. </ span> </ td> </ tr> <tr> <td> Posizione: </ td> <td> <input type = "text" name = "location" ng-model = "personCtrl.person.location" required /> <span ng-show = "personForm.location. $ error.required" class = "msg-val" > La posizione è richiesta. </ span> </ td> </ tr> <tr>
- ng-if = "personCtrl.flag == 'created'" class = "msg-success" > Persona aggiunta con successo. </ span> <span ng-if = "personCtrl.flag == 'failed'" class = "msg-val" > La persona esiste già. </ span> </ td> </ tr> <tr> <td colspan = "2" > <div ng-if = "personCtrl.flag! = 'modifica'" > <input type = "submit"
- <input type = "button" ng-click = "personCtrl.reset ()" value = "Reset" /> </ div> <div ng-if = "personCtrl.flag == 'edit'" > <input type = "submit" ng-click = "personCtrl.updatePersonDetail ()" value = "Aggiorna persona" /> <input type = "button" ng-click = "personCtrl.cancelUpdate ()" value = "Annulla" /></ div> </ td> </ tr> <tr> <td
- colspan = "2" > <span ng-if = "personCtrl.flag == 'deleted'" class = "msg-success" > Persona cancellata con successo. </ span> </ tr> </ table> </ form> <table> <tr> <th> ID </ th> <th> Nome </ th> <th> Location </ th> </ tr> <tr ng-repeat = "row in personCtrl.persons" > <td> <span ng-bind = "row.pid" > </ span>
- > Persona aggiornata con successo. </ span> </ td> </ tr>
- </ table> </ div> <script src = "$ {pageContext.request.contextPath} /app-resources/js/lib/angular.min.js" > </ script> <script src = "$ {pageContext. request.contextPath} /app-resources/js/lib/angular-resource.min.js " > </ script> <script src = " $ {pageContext.request.contextPath} /app-resources/js/app.js " > </ script> <link rel = "stylesheet" type = "text / css" href = "$ {pageContext.request.contextPath} /app-resources/css/style.css" /> </ body></ html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement