Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ServerModule

ServerModule Class.

example

export default class AppModule extends Module {}

AppModule.meta = { imports: [ CoreModule, ServerModule ], declarations: [ ErrorsComponent ], bootstrap: AppComponent, };

Hierarchy

  • Module
    • ServerModule

Index

Properties

Optional instances

instances: Factory[]

meta

meta: IModuleParsedMeta

unsubscribe$

unsubscribe$: Subject<void>

Static Optional forRoot

forRoot: undefined | ((...args: any[]) => typeof Module)

Methods

compile

  • compile(node: IElement, parentInstance?: Factory | Window): Factory[]
  • Parameters

    • node: IElement
    • Optional parentInstance: Factory | Window

    Returns Factory[]

destroy

  • destroy(): void
  • Returns void

Protected getInstance

  • getInstance(node: HTMLElement | Document): Factory | Window | undefined
  • Parameters

    Returns Factory | Window | undefined

Protected getParentInstance

  • getParentInstance(node: Node | null): Factory | Window
  • Parameters

    • node: Node | null

    Returns Factory | Window

Protected makeContext

  • makeContext(instance: Factory, parentInstance: Factory | Window, node: IElement, selector: string): IContext
  • Parameters

    • instance: Factory
    • parentInstance: Factory | Window
    • node: IElement
    • selector: string

    Returns IContext

makeFunction

  • makeFunction(expression: string, params?: string[]): ExpressionFunction
  • Parameters

    • expression: string
    • Optional params: string[]

    Returns ExpressionFunction

Protected makeHosts

  • makeHosts(meta: IFactoryMeta, instance: Factory, node: IElement): void
  • Parameters

    • meta: IFactoryMeta
    • instance: Factory
    • node: IElement

    Returns void

Protected makeInputs

  • makeInputs(meta: IFactoryMeta, instance: Factory, node: IElement, factory: typeof Factory): {}
  • Parameters

    • meta: IFactoryMeta
    • instance: Factory
    • node: IElement
    • factory: typeof Factory

    Returns {}

    • [key: string]: ExpressionFunction

makeInstance

  • makeInstance(node: IElement, factory: typeof Factory, selector: string, parentInstance?: Factory | Window, args?: any[], inject?: undefined | {}, skipSubscription?: undefined | false | true): Factory | undefined
  • Parameters

    • node: IElement
    • factory: typeof Factory
    • selector: string
    • Optional parentInstance: Factory | Window
    • Optional args: any[]
    • Optional inject: undefined | {}
    • Optional skipSubscription: undefined | false | true

    Returns Factory | undefined

makeInstanceSubscription

  • makeInstanceSubscription(instance: Factory, parentInstance?: Factory | Window): void
  • Parameters

    • instance: Factory
    • Optional parentInstance: Factory | Window

    Returns void

Protected makeOutput

  • makeOutput(instance: Factory, key: string): Observable<any>
  • Parameters

    • instance: Factory
    • key: string

    Returns Observable<any>

Protected makeOutputs

  • makeOutputs(meta: IFactoryMeta, instance: Factory): {}
  • Parameters

    • meta: IFactoryMeta
    • instance: Factory

    Returns {}

    • [key: string]: Observable<any>

nextError

  • nextError(error: Error, instance: Factory, expression: string, params: any[]): void
  • Parameters

    • error: Error
    • instance: Factory
    • expression: string
    • params: any[]

    Returns void

parse

  • parse(node: HTMLElement, instance: Factory): void
  • Parameters

    • node: HTMLElement
    • instance: Factory

    Returns void

Protected parseTextNode

  • parseTextNode(node: IText, instance: Factory): void
  • Parameters

    • node: IText
    • instance: Factory

    Returns void

Protected parseTextNodeExpression

  • parseTextNodeExpression(nodeValue: string): (ExpressionFunction | string)[]
  • Parameters

    • nodeValue: string

    Returns (ExpressionFunction | string)[]

Protected pushFragment

  • pushFragment(nodeValue: string, from: number, to: number, expressions: (ExpressionFunction | string)[]): void
  • Parameters

    • nodeValue: string
    • from: number
    • to: number
    • expressions: (ExpressionFunction | string)[]

    Returns void

remove

  • remove(node: Node, keepInstance?: Factory): Node
  • Parameters

    • node: Node
    • Optional keepInstance: Factory

    Returns Node

resolve

  • resolve(expression: ExpressionFunction, parentInstance: Factory | Window, payload: any): any
  • Parameters

    • expression: ExpressionFunction
    • parentInstance: Factory | Window
    • payload: any

    Returns any

resolveAttribute

  • resolveAttribute(key: string, node: IElement): string | null
  • Parameters

    • key: string
    • node: IElement

    Returns string | null

resolveInputsOutputs

  • resolveInputsOutputs(instance: Factory, changes: Factory | Window): void
  • Parameters

    • instance: Factory
    • changes: Factory | Window

    Returns void

Static Protected deleteContext

  • deleteContext(id: number, keepContext: IContext | undefined): IContext[]
  • Parameters

    • id: number
    • keepContext: IContext | undefined

    Returns IContext[]

Static Protected makeContext

  • makeContext(module: Module, instance: Factory, parentInstance: Factory | Window, node: IElement, factory: typeof Factory, selector: string): IContext
  • Parameters

    • module: Module
    • instance: Factory
    • parentInstance: Factory | Window
    • node: IElement
    • factory: typeof Factory
    • selector: string

    Returns IContext

Static Protected matchSelectors

  • matchSelectors(node: HTMLElement, selectors: SelectorFunction[], results: ISelectorResult[]): ISelectorResult[]
  • Parameters

    • node: HTMLElement
    • selectors: SelectorFunction[]
    • results: ISelectorResult[]

    Returns ISelectorResult[]

Static Protected parseExpression

  • parseExpression(expression: string): string
  • Parameters

    • expression: string

    Returns string

Static Protected parseOptionalChaining

  • parseOptionalChaining(expression: string): string

Static Protected parsePipeParams

  • parsePipeParams(expression: string): string[]
  • Parameters

    • expression: string

    Returns string[]

Static Protected parsePipes

  • parsePipes(expression: string): string
  • Parameters

    • expression: string

    Returns string

Static Protected querySelectorsAll

  • querySelectorsAll(node: Node, selectors: SelectorFunction[], results: ISelectorResult[]): ISelectorResult[]
  • Parameters

    • node: Node
    • selectors: SelectorFunction[]
    • results: ISelectorResult[]

    Returns ISelectorResult[]

Static Protected traverseDown

  • traverseDown(node: Node | null, callback: (node: Node, i: number) => any, i?: undefined | number): any
  • Parameters

    • node: Node | null
    • callback: (node: Node, i: number) => any
        • (node: Node, i: number): any
        • Parameters

          • node: Node
          • i: number

          Returns any

    • Optional i: undefined | number

    Returns any

Static Protected traverseNext

  • traverseNext(node: Node | null, callback: (node: Node, i: number) => any, i?: undefined | number): any
  • Parameters

    • node: Node | null
    • callback: (node: Node, i: number) => any
        • (node: Node, i: number): any
        • Parameters

          • node: Node
          • i: number

          Returns any

    • Optional i: undefined | number

    Returns any

Static Protected traversePrevious

  • traversePrevious(node: Node | null, callback: (node: Node, i: number) => any, i?: undefined | number): any
  • Parameters

    • node: Node | null
    • callback: (node: Node, i: number) => any
        • (node: Node, i: number): any
        • Parameters

          • node: Node
          • i: number

          Returns any

    • Optional i: undefined | number

    Returns any

Static Protected traverseUp

  • traverseUp(node: Node | null, callback: (node: Node, i: number) => any, i?: undefined | number): any
  • Parameters

    • node: Node | null
    • callback: (node: Node, i: number) => any
        • (node: Node, i: number): any
        • Parameters

          • node: Node
          • i: number

          Returns any

    • Optional i: undefined | number

    Returns any

Object literals

Static meta

meta: object

declarations

declarations: (Factory | Pipe)[] = [...factories,...pipes,]

exports

exports: (Factory | Pipe)[] = [...factories,...pipes,]