2015-07-27 22:12:30 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								p.location-badge.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  exported from <a href='../annotations'>angular2/annotations</a>
							 
						 
					
						
							
								
									
										
										
										
											2015-08-06 23:25:42 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/core/annotations/decorators.ts#L104-L174">angular2/src/core/annotations/decorators.ts (line 104)</a>
							 
						 
					
						
							
								
									
										
										
										
											2015-07-27 22:12:30 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								:markdown
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  <a href='ComponentAnnotation-class.html'><code>ComponentAnnotation</code></a> factory for creating annotations, decorators or DSL.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ## Example as TypeScript Decorator
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  import {Component, View} from "angular2/angular2";
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  @Component({...})
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  @View({...})
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  class MyComponent {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    constructor() {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ...
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ## Example as ES5 DSL
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  var MyComponent = ng
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    .Component({...})
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    .View({...})
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    .Class({
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      constructor: function() {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ...
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    })
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ## Example as ES5 annotation
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  var MyComponent = function() {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ...
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  };
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  MyComponent.annotations = [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    new ng.Component({...})
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    new ng.View({...})
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ```