| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  | // #docregion
 | 
					
						
							|  |  |  | export const heroDetail = { | 
					
						
							|  |  |  |   bindings: { | 
					
						
							| 
									
										
										
										
											2016-04-25 12:09:37 +03:00
										 |  |  |     hero: '<', | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  |     deleted: '&' | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   template: `
 | 
					
						
							|  |  |  |     <h2>{{$ctrl.hero.name}} details!</h2> | 
					
						
							|  |  |  |     <div><label>id: </label>{{$ctrl.hero.id}}</div> | 
					
						
							|  |  |  |     <button ng-click="$ctrl.onDelete()">Delete</button> | 
					
						
							|  |  |  |   `,
 | 
					
						
							|  |  |  |   controller: function() { | 
					
						
							|  |  |  |     this.onDelete = () => { | 
					
						
							|  |  |  |       this.deleted(this.hero); | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | }; |