CompileView class

Represents data to generate a host, component or embedded AppView.

Members and method builders are populated by ViewBuilder.

Constructors

CompileView(CompileDirectiveMetadata component, CompilerFlags genConfig, List<CompileTypedMetadata> directiveTypes, List<CompilePipeMetadata?> pipeMetas, Expression styles, int viewIndex, CompileElement declarationElement, List<VariableAst> templateVariables, bool enableDataDebugSource)

Properties

afterContentLifecycleCallbacksMethod → CompileMethod
final
afterViewLifecycleCallbacksMethod → CompileMethod
final
className ↔ String
getter/setter pair
classStatements ↔ List<Statement>
getter/setter pair
classType ↔ OutputType
getter/setter pair
component → CompileDirectiveMetadata
final
componentView ↔ CompileView
getter/setter pair
declarationElement ↔ CompileElement
getter/setter pair
destroyMethod → CompileMethod
final
detectChangesInInputsMethod → CompileMethod
final
detectChangesRenderPropertiesMethod → CompileMethod
final
detectHostChangesMethod ↔ CompileMethod?
getter/setter pair
directiveTypes → List<CompileTypedMetadata>
Defines type arguments for generic directives in this view.
final
dirtyParentQueriesMethod → CompileMethod
final
docVarName ↔ String?
Local variable name used to refer to document. null if not created yet.
getter/setter pair
enableDataDebugSource → bool
final
genConfig → CompilerFlags
final
getters ↔ List<ClassGetter>
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
methods ↔ List<ClassMethod>
Methods generated during view compilation.
getter/setter pair
nameResolver ↔ ViewNameResolver
getter/setter pair
nodes ↔ List<CompileNode?>
Flat list of all nodes inside the template including text nodes.
getter/setter pair
pipeCount ↔ int
getter/setter pair
pipeMetas → List<CompilePipeMetadata?>
final
pipes ↔ List<CompilePipe>
getter/setter pair
providers ↔ ProviderForest?
A representation of this view's dependency injection hierarchy.
getter/setter pair
purePipes ↔ Map<String, CompilePipe>
getter/setter pair
rootNodesOrViewContainers ↔ List<Expression>
List of references to top level nodes in view.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
storage ↔ CompileViewStorage
getter/setter pair
styles → Expression
final
subscribesToMockLike ↔ bool
getter/setter pair
subscriptions ↔ List<Expression>
getter/setter pair
templateVariables ↔ List<VariableAst>
getter/setter pair
viewChildren → List<CompileElement>
no setter
viewContainers ↔ List<Expression>
List of references to view containers used by embedded templates and child components.
getter/setter pair
viewFactory ↔ Expression
getter/setter pair
viewFactoryName ↔ String
getter/setter pair
viewIndex ↔ int
getter/setter pair
viewQueries ↔ CompileTokenMap<List<CompileQuery>>
getter/setter pair
viewType ↔ ViewType
getter/setter pair

Methods

addEventListener(NodeReference node, Binding binding, Expression handler, [Expression? directiveInstance]) → void
addViewChild(CompileElement viewChild) → void
afterNodes() → void
createAttributeStatements(Binding binding, String elementName, NodeReference renderNode, {required bool isHtmlElement}) → List<Statement>
createComponentNodeAndAppend(CompileDirectiveMetadata parentComponent, CompileDirectiveMetadata component, CompileElement parent, NodeReference elementRef, int nodeIndex, ElementAst ast) → Expression
createComponentView(Expression componentViewExpr, Expression componentExpr, Expression projectedNodes) → void
createElement(CompileElement parent, NodeReference elementRef, String tagName, TemplateAst ast) → void
Create an html node and appends to parent element.
createElementNs(CompileElement parent, NodeReference elementRef, int nodeIndex, String? ns, String tagName, TemplateAst ast) → void
Creates an html node with a namespace and appends to parent element.
createEventHandler(List<Statement> stmts, {List<Statement> localDeclarations = const []}) → Expression
createHtml(BindingSource html, CompileElement parent, int nodeIndex) → NodeReference
createI18nMessage(I18nMessage message) → Expression
Generates code to internationalize message.
createNgContentRefProvider(int nodeIndex) → CompileProviderMetadata
createPipeInstance(String name, CompilePipeMetadata pipeMeta) → void
createProvider(String propName, CompileDirectiveMetadata? directiveMetadata, ProviderAst provider, List<Expression> providerValueExpressions, bool isMulti, bool isEager, CompileElement compileElement) → Expression
Creates a class field and assigns the resolvedProviderValueExpr.
createPureProxy(Expression fn, int argCount, ReadClassMemberExpr pureProxyProp, {OutputType? pureProxyType}) → void
createSubscription({bool isMockLike = false}) → NodeReference
createTextBinding(BindingSource text, CompileElement parent, int nodeIndex) → NodeReference
createViewContainer(NodeReference nodeReference, int nodeIndex, bool isPrivate, [int? parentNodeIndex]) → ReadClassMemberExpr
createViewContainerAnchor(CompileElement parent, int nodeIndex, TemplateAst ast) → NodeReference
Creates a node 'anchor' to mark the insertion point for dynamically created elements.
isRootNodeOfHost(int nodeIndex) → bool
lookupTypeArgumentsOf(CompileTypeMetadata rawDirectiveType, TemplateAst? hostAst) → List<OutputType>
Returns any type arguments specified for rawDirectiveType on hostAst.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
projectNodesIntoElement(CompileElement target, int sourceAstIndex, int? ngContentIndex) → void
registerDirectives(CompileElement element, List<Expression> directives) → void
Registers any directives on element with the Inspector.
shimCssForNode(NodeReference nodeReference, int nodeIndex, CompileIdentifierMetadata nodeType) → void
toString() → String
A string representation of this object.
inherited
updateContentQuery(CompileQuery query) → void
updateQueryAtStartup(CompileQuery query) → void
writeBuildStatements(List<Statement> targetStatements) → void
writeChangeDetectionStatements() → List<Statement>
writeCheckAlwaysChangeDetectionStatements() → List<Statement>
writeInjectorGetMethod() → ClassMethod
writeLiteralAttributeValues(String elementName, NodeReference nodeReference, List<Binding> bindings, {required bool isHtmlElement}) → void

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

defaultDocVarName → String
final