Interface DurandalActivatorSettings

Index

Properties

Methods

Properties

public affirmations: Array<string>

Lower-cased words which represent a truthy value.

default

['yes', 'ok', 'true']

public closeOnDeactivate: boolean

The default value passed to an object's deactivate function as its close parameter.

default

true

Methods

public afterDeactivate(oldItem: any, close: boolean, setter: Function)

Called immediately after the old item is deactivated.

Parameters

  • oldItem: any

    The previous item.

  • close: boolean

    Whether or not the previous item was closed.

  • setter: Function

    The activate item setter function.

public areSameItem(currentItem: any, newItem: any, currentActivationData: any, newActivationData: any): boolean

Determines whether or not the current item and the new item are the same.

Parameters

  • currentItem: any
  • newItem: any
  • currentActivationData: any
  • newActivationData: any

Returns

boolean

public beforeActivate(newItem: any): any

Called immediately before the new item is activated.

Parameters

  • newItem: any

Returns

any

public interpretResponse(value: any): boolean

Interprets the response of a canActivate or canDeactivate call using the known affirmative values in the affirmations array.

Parameters

  • value: any

Returns

boolean