File

src/core/services/smart-navigation.service.ts

Description

A service that handles navigation within the context of a SmartComponent Library app.

Index

Properties
Methods

Constructor

constructor(router: Router, serviceAdapter: SmartServiceAdapter, mdiRegistry: SmartMdiRegistryService, smartWindowService: SmartWindowService, smartConfig: SmartConfig, errorHandler: SmartErrorHandlerService, formOptionsCacheService: SmartFormOptionsCacheService, formLaunchContextService: SmartFormLaunchContextService, formLaunchDataSourceResolverService: SmartFormLaunchDataSourceResolverService, formLayoutService: SmartFormLayoutService, windowOptionsService: SmartNavigationWindowOptionsProviderService)
Parameters :
Name Type Optional
router Router No
serviceAdapter SmartServiceAdapter No
mdiRegistry SmartMdiRegistryService No
smartWindowService SmartWindowService No
smartConfig SmartConfig No
errorHandler SmartErrorHandlerService No
formOptionsCacheService SmartFormOptionsCacheService No
formLaunchContextService SmartFormLaunchContextService No
formLaunchDataSourceResolverService SmartFormLaunchDataSourceResolverService No
formLayoutService SmartFormLayoutService No
windowOptionsService SmartNavigationWindowOptionsProviderService No

Methods

Public Async clearWindowForms
clearWindowForms()

Closes all forms that are open in a window and waits for their cleanup navigations to complete

Returns : Promise<boolean>

Resolves true when all window close navigations have completed

Public launchModalRepositoryForm
launchModalRepositoryForm(formName: string, options: SmartFormLaunchOptions)

Launches a repository Smart Form as a modal and resolves with the close result.

Parameters :
Name Type Optional Default value Description
formName string No

The repository form name

options SmartFormLaunchOptions No {}

The launch options

Returns : Promise<IProvidesDialogResult | SmartFormWindowRef | void>

The modal result

Public Async launchRepositoryForm
launchRepositoryForm(formName: string, options: SmartFormLaunchOptions)

Launches a repository Smart Form using the server-driven launch contract.

Parameters :
Name Type Optional Default value Description
formName string No

The repository form name

options SmartFormLaunchOptions No {}

The launch options

Returns : Promise<SmartFormWindowRef | IProvidesDialogResult | void>

The window ref, modal result, or void

Async navigate
navigate(url: string, options: NavigationOptions)

Navigates within the context of the SmartComponent Library app. If a MDI interface is used, it will pass on navigation instructions to the SmartMDIComponent. If not, it will trigger Router navigation.

Parameters :
Name Type Optional Default value
url string No
options NavigationOptions No {}

Properties

navigationEnd
Use navigationEndSignal instead
Type : EventEmitter<SmartNavigationEvent>
Default value : new EventEmitter<SmartNavigationEvent>()

Fired after a successful navigation

Public Readonly navigationEndSignal
Type : Signal<SmartNavigationEvent | undefined>
Default value : this._navigationEndSignal.asReadonly()

Signal counterpart of navigationEnd.

navigationStart
Use navigationStartSignal instead
Type : EventEmitter<SmartNavigationEvent>
Default value : new EventEmitter<SmartNavigationEvent>()

Fired before navigation is attempted.

Public Readonly navigationStartSignal
Type : Signal<SmartNavigationEvent | undefined>
Default value : this._navigationStartSignal.asReadonly()

Signal counterpart of navigationStart.

results matching ""

    No results matching ""