| 
									
										
										
										
											2016-03-16 18:01:33 +02:00
										 |  |  | (function(app) { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // #docregion
 | 
					
						
							|  |  |  |   var HeroesComponent = ng.core.Component({ | 
					
						
							|  |  |  |     selector: 'heroes-bindings', | 
					
						
							|  |  |  |     template: '<h1 [class.active]="active">' + | 
					
						
							|  |  |  |       'Tour of Heroes' + | 
					
						
							|  |  |  |     '</h1>', | 
					
						
							|  |  |  |     host: { | 
					
						
							|  |  |  |       '[title]': 'title', | 
					
						
							|  |  |  |       '[class.heading]': 'hClass', | 
					
						
							|  |  |  |       '(click)': 'clicked()', | 
					
						
							|  |  |  |       '(dblclick)': 'doubleClicked($event)' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   }).Class({ | 
					
						
							|  |  |  |     constructor: function() { | 
					
						
							|  |  |  |       this.title = 'Tooltip content'; | 
					
						
							|  |  |  |       this.hClass = true; | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     clicked: function() { | 
					
						
							|  |  |  |       this.active = !this.active; | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     doubleClicked: function(evt) { | 
					
						
							|  |  |  |       this.active = true; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  |   // #enddocregion
 | 
					
						
							| 
									
										
										
										
											2016-08-09 17:38:25 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |   app.HeroesHostBindingsModule = | 
					
						
							|  |  |  |     ng.core.NgModule({ | 
					
						
							|  |  |  |       imports: [ ng.platformBrowser.BrowserModule ], | 
					
						
							|  |  |  |       declarations: [ HeroesComponent ], | 
					
						
							|  |  |  |       bootstrap: [ HeroesComponent ] | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  |     .Class({ | 
					
						
							|  |  |  |       constructor: function() {} | 
					
						
							|  |  |  |     }); | 
					
						
							| 
									
										
										
										
											2016-03-16 18:01:33 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | })(window.app = window.app || {}); |