Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.96 KB | None | 0 0
  1. <! 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" >
  2.  
  3.  
  4.        
  5.    
  6.  
  7.    
  8.    
  9.        
  10.      
  11.        
  12.          
  13.           <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"
  14.              
  15.          
  16.            
  17.              
  18.            
  19.        
  20.        
  21.                    
  22.                     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>
  23.        
  24.        
  25.                      
  26.                      
  27.        
  28.        
  29.                 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"
  30.                
  31.        
  32.              
  33.                  
  34.                    
  35.                <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  
  36.            
  37.              
  38.                        
  39.                                    
  40.              
  41.        
  42.        
  43.               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>  
  44.        
  45.              
  46.    
  47.        
  48.            
  49.            
  50.              
  51.              
  52.              > Persona aggiornata con successo. </ span> </ td> </ tr>
  53.              
  54.                
  55.                
  56.                
  57.            
  58.     </ 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