ComponentFactory

Stable Class Class Overview class ComponentFactory { constructor(selector: string, _viewFactory: Function, _componentType: Type<any>) C selector : string componentType : Type<any> create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string|any) : ComponentRef<C> } Class Description Constructor constructor(selector: string, _viewFactory: Function, _componentType: Type<any>) Class Details C selector : string componentType :

Component-relative Paths

Use relative URLs for component templates and styles. Write Component-Relative URLs to component templates and style files Our components often refer to external template and style files. We identify those files with a URL in the templateUrl and styleUrls properties of the @Component metadata as seen here: @Component({ selector: 'absolute-path', templateUrl: 'app/some.component.html', styleUrls: ['app/some.component.css'] }) By default, we must specify the full path back to the applicat

ComponentFactoryResolver

Stable Class Class Overview class ComponentFactoryResolver { staticNULL : ComponentFactoryResolver resolveComponentFactory(component: Type<T>) : ComponentFactory<T> } Class Description Static Members NULL : ComponentFactoryResolver Class Details resolveComponentFactory(component: Type<T>) : ComponentFactory<T> exported from @angular/core/index, defined in @angular/core/src/linker/component_factory_resolver.ts

Connection

Experimental Class Class Overview class Connection { readyState : ReadyState request : Request response : any } Class Description Abstract class from which real connections are derived. Class Details readyState : ReadyState request : Request response : any exported from @angular/http/index, defined in @angular/http/src/interfaces.ts

CompilerFactory

Experimental Class Class Overview class CompilerFactory { createCompiler(options?: CompilerOptions[]) : Compiler } Class Description A factory for creating a Compiler Class Details createCompiler(options?: CompilerOptions[]) : Compiler exported from @angular/core/index, defined in @angular/core/src/linker/compiler.ts

Component Interaction

Share information between different directives and components This cookbook contains recipes for common component communication scenarios in which two or more components share information. Table of contents Pass data from parent to child with input binding Intercept input property changes with a setter Intercept input property changes with ngOnChanges Parent listens for child event Parent interacts with child via a local variable Parent calls a ViewChild Parent and children communicate via a se

Component Styles

Learn how to apply CSS styles to components. Angular 2 applications are styled with regular CSS. That means we can apply everything we know about CSS stylesheets, selectors, rules, and media queries to our Angular applications directly. On top of this, Angular has the ability to bundle component styles with our components enabling a more modular design than regular stylesheets. In this chapter we learn how to load and apply these component styles. Table Of Contents Using Component Styles Specia

CompilerOptions

Experimental Type-alias Interface Overview interface CompilerOptions { } Interface Description Options for creating a compiler exported from @angular/core/index, defined in @angular/core/src/linker/compiler.ts

COMPILER_OPTIONS

Experimental Const Variable Export export COMPILER_OPTIONS Token to provide CompilerOptions in the platform injector. exported from @angular/core/index defined in @angular/core/src/linker/compiler.ts

Compiler

Stable Class Class Overview class Compiler { compileModuleSync(moduleType: Type<T>) : NgModuleFactory<T> compileModuleAsync(moduleType: Type<T>) : Promise<NgModuleFactory<T>> compileModuleAndAllComponentsSync(moduleType: Type<T>) : ModuleWithComponentFactories<T> compileModuleAndAllComponentsAsync(moduleType: Type<T>) : Promise<ModuleWithComponentFactories<T>> clearCache() : void clearCacheFor(type: Type<any>) }