Class StateManager

Hierarchy

Index

Properties

Methods

Properties

public addObserver: ModifyObserver

public concatenatedProperties: Array<any>

Defines the properties that will be concatenated from the superclass (instead of overridden).

public currentPath: string

public currentState: State

public enter: Function

public errorOnUnhandledEvents: boolean

public exit: Function

public hasContext: boolean

public static isClass: boolean

public isDestroyed: boolean

Destroyed object property flag. If this property is true the observers and bindings were already removed by the effect of calling the destroy() method.

public isDestroying: boolean

Destruction scheduled flag. The destroy() method has been called. The object stays intact until the end of the run loop at which point the isDestroyed flag is set.

public isLeaf: boolean

public static isMethod: boolean

public name: string

public parentState: State

public path: string

public setup: Function

public transitionEvent: string

Methods

public beginPropertyChanges(): Observable

Returns

Observable

public cacheFor(keyName: string): any

Parameters

  • keyName: string

Returns

any

public contextFreeTransition(currentState: State, path: string): TransitionsHash

Parameters

  • currentState: State
  • path: string

Returns

TransitionsHash

public decrementProperty(keyName: string, decrement?: number): number

Parameters

  • keyName: string
  • decrement?: number optional

Returns

number

public destroy(): CoreObject

Destroys an object by setting the isDestroyed flag and removing its metadata, which effectively destroys observers and bindings. If you try to set a property on a destroyed object, an exception will be raised. Note that destruction is scheduled for the end of the run loop and does not happen immediately. It will set an isDestroying flag immediately.

Returns

CoreObject

public static detect(obj: any): boolean

Parameters

  • obj: any

Returns

boolean

public static detectInstance(obj: any): boolean

Parameters

  • obj: any

Returns

boolean

public static eachComputedProperty(callback: Function, binding: {})

Iterate over each computed property for the class, passing its name and any associated metadata (see metaForProperty) to the callback.

Parameters

  • callback: Function
  • binding: {}

public endPropertyChanges(): Observable

Returns

Observable

public enterState(transition: TransitionsHash)

Parameters

public get(keyName: string): any

Parameters

  • keyName: string

Returns

any

public getPathsCache(stateManager: {}, path: string): {}

Parameters

  • stateManager: {}
  • path: string

Returns

{}

public getProperties(string?: Array<any>): {}

Parameters

  • string?: Array<any> optional

Returns

{}

public getProperties(keys: Array<string>): {}

Parameters

  • keys: Array<string>

Returns

{}

public getState(name: string): State

Parameters

  • name: string

Returns

State

public getStateByPath(root: State, path: string): State

Parameters

  • root: State
  • path: string

Returns

State

public getStateMeta(state: State, key: string): any

Parameters

  • state: State
  • key: string

Returns

any

public getStatesInPath(root: State, path: string): State[]

Parameters

  • root: State
  • path: string

Returns

State[]

public getWithDefault(keyName: string, defaultValue: any): any

Parameters

  • keyName: string
  • defaultValue: any

Returns

any

public goToState(path: string, context: any)

Parameters

  • path: string
  • context: any

public has(name: string): boolean

Parameters

  • name: string

Returns

boolean

public hasObserverFor(key: string): boolean

Parameters

  • key: string

Returns

boolean

public incrementProperty(keyName: string, increment?: number): number

Parameters

  • keyName: string
  • increment?: number optional

Returns

number

public init()

public static metaForProperty(key: string): {}

Returns the original hash that was passed to meta().

Parameters

  • key: string

    property name

Returns

{}

public notifyPropertyChange(keyName: string): Observable

Parameters

  • keyName: string

Returns

Observable

public off(name: string, target: any, method: Function): State

Parameters

  • name: string
  • target: any
  • method: Function

Returns

State

public on(name: string, target: any, method: Function): State

Parameters

  • name: string
  • target: any
  • method: Function

Returns

State

public one(name: string, target: any, method: Function): State

Parameters

  • name: string
  • target: any
  • method: Function

Returns

State

public propertyDidChange(keyName: string): Observable

Parameters

  • keyName: string

Returns

Observable

public propertyWillChange(keyName: string): Observable

Parameters

  • keyName: string

Returns

Observable

public removeObserver(key: string, target: any, method: string): Observable

Parameters

  • key: string
  • target: any
  • method: string

Returns

Observable

public removeObserver(key: string, target: any, method: Function): Observable

Parameters

  • key: string
  • target: any
  • method: Function

Returns

Observable

public send(event: string)

Parameters

  • event: string

public set(keyName: string, value: any): Observable

Parameters

  • keyName: string
  • value: any

Returns

Observable

public setPathsCache(stateManager: {}, path: string, transitions: any)

Parameters

  • stateManager: {}
  • path: string
  • transitions: any

public setProperties(hash: {}): Observable

Parameters

  • hash: {}

Returns

Observable

public setStateMeta(state: State, key: string, value: any): any

Parameters

  • state: State
  • key: string
  • value: any

Returns

any

public stateMetaFor(state: State): {}

Parameters

Returns

{}

public toString(): string

Returns a string representation which attempts to provide more information than Javascript's toString typically does, in a generic way for all Ember objects (e.g., "").

Returns

string

public toggleProperty(keyName: string): any

Parameters

  • keyName: string

Returns

any

public transitionTo(path: string, context: any)

Parameters

  • path: string
  • context: any

public trigger(name: string, string?: Array<any>)

Parameters

  • name: string
  • string?: Array<any> optional

public triggerSetupContext(transitions: TransitionsHash)

Parameters

public unhandledEvent(manager: StateManager, event: string): any

Parameters

Returns

any

public willDestroy()