| 
									
										
										
										
											2016-03-16 18:01:33 +02:00
										 |  |  | // #docplaster
 | 
					
						
							| 
									
										
										
										
											2016-11-13 14:09:28 -08:00
										 |  |  | (function(app) { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // #docregion
 | 
					
						
							| 
									
										
										
										
											2016-03-16 18:01:33 +02:00
										 |  |  | // #docregion appexport
 | 
					
						
							| 
									
										
										
										
											2016-11-13 14:09:28 -08:00
										 |  |  | // #docregion metadata
 | 
					
						
							|  |  |  | app.HeroComponent = HeroComponent; // "export"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | HeroComponent.annotations = [ | 
					
						
							|  |  |  |   new ng.core.Component({ | 
					
						
							|  |  |  |     selector: 'hero-view', | 
					
						
							|  |  |  |     template: '<h1>{{title}}: {{getName()}}</h1>' | 
					
						
							|  |  |  |   }) | 
					
						
							|  |  |  | ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // #docregion constructorproto
 | 
					
						
							|  |  |  | function HeroComponent() { | 
					
						
							|  |  |  |   this.title = "Hero Detail"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | HeroComponent.prototype.getName = function() { return 'Windstorm'; }; | 
					
						
							|  |  |  | // #enddocregion constructorproto
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // #enddocregion metadata
 | 
					
						
							|  |  |  | // #enddocregion appexport
 | 
					
						
							|  |  |  | // #enddocregion
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | })(window.app = window.app || {}); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | //////////// DSL version ///////////
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-16 18:01:33 +02:00
										 |  |  | (function(app) { | 
					
						
							| 
									
										
										
										
											2016-11-13 14:09:28 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // #docregion dsl
 | 
					
						
							|  |  |  | app.HeroDslComponent = ng.core.Component({ | 
					
						
							|  |  |  |     selector: 'hero-view-dsl', | 
					
						
							|  |  |  |     template: '<h1>{{title}}: {{getName()}}</h1>', | 
					
						
							|  |  |  |   }) | 
					
						
							|  |  |  |   .Class({ | 
					
						
							|  |  |  |     constructor: function HeroDslComponent() { | 
					
						
							|  |  |  |       this.title = "Hero Detail"; | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     getName: function() { return 'Windstorm'; } | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | // #enddocregion dsl
 | 
					
						
							| 
									
										
										
										
											2016-03-16 18:01:33 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | })(window.app = window.app || {}); |