| 
									
										
										
										
											2019-09-12 15:20:54 -07:00
										 |  |  | /** | 
					
						
							|  |  |  |  * @license | 
					
						
							|  |  |  |  * Copyright Google Inc. All Rights Reserved. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Use of this source code is governed by an MIT-style license that can be | 
					
						
							|  |  |  |  * found in the LICENSE file at https://angular.io/license
 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import {Component} from '@angular/core'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export interface Person { | 
					
						
							|  |  |  |   name: string; | 
					
						
							|  |  |  |   age: number; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @Component({ | 
					
						
							|  |  |  |   template: '{{~{foo}foo~{foo-end}}}', | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | export class WrongFieldReference { | 
					
						
							|  |  |  |   bar = 'bar'; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @Component({ | 
					
						
							|  |  |  |   template: '{{~{nam}person.nam~{nam-end}}}', | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | export class WrongSubFieldReference { | 
					
						
							|  |  |  |   person: Person = {name: 'Bob', age: 23}; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @Component({ | 
					
						
							|  |  |  |   template: '{{~{myField}myField~{myField-end}}}', | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | export class PrivateReference { | 
					
						
							|  |  |  |   private myField = 'My Field'; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @Component({ | 
					
						
							|  |  |  |   template: '{{~{mod}"a" ~{mod-end}% 2}}', | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | export class ExpectNumericType { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @Component({ | 
					
						
							|  |  |  |   template: '{{ (name | lowercase).~{string-pipe}substring }}', | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | export class LowercasePipe { | 
					
						
							| 
									
										
										
										
											2019-09-19 17:04:02 -07:00
										 |  |  |   name: string = 'name'; | 
					
						
							| 
									
										
										
										
											2019-09-12 15:20:54 -07:00
										 |  |  | } |