2015-11-06 12:26:24 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								@cheatsheetSection
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Dependency injection configuration
							 | 
						
					
						
							
								
									
										
										
										
											2016-08-08 17:18:50 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@cheatsheetIndex 10
							 | 
						
					
						
							
								
									
										
										
										
											2015-11-06 12:26:24 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								@description
							 | 
						
					
						
							
								
									
										
										
										
											2016-04-01 13:03:10 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{@target dart}`import 'package:angular2/core.dart';`{@endtarget}
							 | 
						
					
						
							
								
									
										
										
										
											2015-11-06 12:26:24 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								@cheatsheetItem
							 | 
						
					
						
							
								
									
										
										
										
											2015-12-12 21:17:26 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								syntax(ts dart):
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-16 00:11:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								`{ provide: MyService, useClass: MyMockService }`|`provide`|`useClass`
							 | 
						
					
						
							
								
									
										
										
										
											2015-12-12 21:17:26 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								syntax(js):
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-16 00:11:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								`{ provide: MyService, useClass: MyMockService }`|`provide`|`useClass`
							 | 
						
					
						
							
								
									
										
										
										
											2015-12-09 12:33:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								description:
							 | 
						
					
						
							
								
									
										
										
										
											2015-11-06 12:26:24 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Sets or overrides the provider for MyService to the MyMockService class.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								@cheatsheetItem
							 | 
						
					
						
							
								
									
										
										
										
											2015-12-12 21:17:26 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								syntax(ts dart):
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-16 00:11:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								`{ provide: MyService, useFactory: myFactory }`|`provide`|`useFactory`
							 | 
						
					
						
							
								
									
										
										
										
											2015-12-12 21:17:26 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								syntax(js):
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-16 00:11:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								`{ provide: MyService, useFactory: myFactory }`|`provide`|`useFactory`
							 | 
						
					
						
							
								
									
										
										
										
											2015-12-09 12:33:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								description:
							 | 
						
					
						
							
								
									
										
										
										
											2015-11-06 12:26:24 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Sets or overrides the provider for MyService to the myFactory factory function.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								@cheatsheetItem
							 | 
						
					
						
							
								
									
										
										
										
											2015-12-12 21:17:26 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								syntax(ts dart):
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-16 00:11:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								`{ provide: MyValue, useValue: 41 }`|`provide`|`useValue`
							 | 
						
					
						
							
								
									
										
										
										
											2015-12-12 21:17:26 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								syntax(js):
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-16 00:11:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								`{ provide: MyValue, useValue: 41 }`|`provide`|`useValue`
							 | 
						
					
						
							
								
									
										
										
										
											2015-12-09 12:33:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								description:
							 | 
						
					
						
							
								
									
										
										
										
											2015-11-06 12:26:24 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Sets or overrides the provider for MyValue to the value 41.
							 |