Interface DurandalActivator

Hierarchy

Index

Call signatures

Properties

Methods

Call signatures

(): T in KnockoutObservable<T>

Returns

T in KnockoutObservable<T>

(value: T in KnockoutObservable<T>)

Parameters

  • value: T in KnockoutObservable<T>

Properties

public isActivating: KnockoutObservable

An observable which indicates whether or not the activator is currently in the process of activating an instance.

returns

public settings: DurandalActivatorSettings

The settings for this activator.

optional public valueHasMutated?: () => void

()

optional public valueWillMutate?: () => void

()

Methods

public activate(): JQueryPromise

Activates the activator, in its current state.

Returns

JQueryPromise

public activateItem(newItem: T in DurandalActivator<T>, activationData?: any): JQueryPromise

Activates the specified item.

Parameters

  • newItem: T in DurandalActivator<T>

    The item to activate.

  • activationData?: any optional

Returns

JQueryPromise

public canActivate(): JQueryPromise

Determines whether or not the activator, in its current state, can be activated.

Returns

JQueryPromise

public canActivateItem(newItem: T in DurandalActivator<T>, activationData?: any): JQueryPromise

Determines whether or not the specified item can be activated.

Parameters

  • newItem: T in DurandalActivator<T>
  • activationData?: any optional

    Data associated with the activation.

Returns

JQueryPromise

public canDeactivate(close: boolean): JQueryPromise

Determines whether or not the activator, in its current state, can be deactivated.

Parameters

  • close: boolean

Returns

JQueryPromise

public canDeactivateItem(item: T in DurandalActivator<T>, close: boolean): JQueryPromise

Determines whether or not the specified item can be deactivated.

Parameters

  • item: T in DurandalActivator<T>

    The item to check.

  • close: boolean

    Whether or not to check if close is possible.

Returns

JQueryPromise

public deactivate(close: boolean): JQueryPromise

Deactivates the activator, in its current state.

Parameters

  • close: boolean

Returns

JQueryPromise

public deactivateItem(item: T in DurandalActivator<T>, close: boolean): JQueryPromise

Deactivates the specified item.

Parameters

  • item: T in DurandalActivator<T>

    The item to deactivate.

  • close: boolean

    Whether or not to close the item.

Returns

JQueryPromise

public dispose()

public equalityComparer(a: any, b: any): boolean

Parameters

  • a: any
  • b: any

Returns

boolean

public extend(requestedExtenders: { [key: string]: any; }): KnockoutComputed

Parameters

  • requestedExtenders: { [key: string]: any; }

Returns

KnockoutComputed

public forItems(items: any): DurandalActivator

Sets up a collection representing a pool of objects which the activator will activate. See below for details. Activators without an item bool always close their values on deactivate. Activators with an items pool only deactivate, but do not close them.

Parameters

  • items: any

Returns

DurandalActivator

public getDependenciesCount(): number

Returns

number

public getSubscriptionsCount(): number

Returns

number

public includeIn(includeIn: any)

Adds canActivate, activate, canDeactivate and deactivate functions to the provided model which pass through to the corresponding functions on the activator.

Parameters

  • includeIn: any

public isActive(): boolean

Returns

boolean

public notifySubscribers(valueToWrite?: T in KnockoutSubscribableFunctions<T>, event?: string)

Parameters

  • valueToWrite?: T in KnockoutSubscribableFunctions<T> optional
  • event?: string optional

public peek(): T in KnockoutObservable<T>

Returns

T in KnockoutObservable<T>

public subscribe(callback: (newValue: T) => void, target?: any, event?: string): KnockoutSubscription

Parameters

  • callback: (newValue: T) => void
  • target?: any optional
  • event?: string optional

Returns

KnockoutSubscription

public subscribe(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription

Parameters

  • callback: (newValue: TEvent) => void
  • target: any
  • event: string

Returns

KnockoutSubscription