-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(all): restructure files/utilities
- Loading branch information
Showing
16 changed files
with
438 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* An optional interface describing the available activation strategies. | ||
* @internal Used internally. | ||
*/ | ||
export const enum InternalActivationStrategy { | ||
/** | ||
* Reuse the existing view model, without invoking Router lifecycle hooks. | ||
*/ | ||
NoChange = 'no-change', | ||
/** | ||
* Reuse the existing view model, invoking Router lifecycle hooks. | ||
*/ | ||
InvokeLifecycle = 'invoke-lifecycle', | ||
/** | ||
* Replace the existing view model, invoking Router lifecycle hooks. | ||
*/ | ||
Replace = 'replace' | ||
} | ||
|
||
/** | ||
* The strategy to use when activating modules during navigation. | ||
*/ | ||
// kept for compat reason | ||
export const activationStrategy: ActivationStrategy = { | ||
noChange: InternalActivationStrategy.NoChange, | ||
invokeLifecycle: InternalActivationStrategy.InvokeLifecycle, | ||
replace: InternalActivationStrategy.Replace | ||
}; | ||
|
||
/** | ||
* An optional interface describing the available activation strategies. | ||
*/ | ||
export interface ActivationStrategy { | ||
/** | ||
* Reuse the existing view model, without invoking Router lifecycle hooks. | ||
*/ | ||
noChange: 'no-change'; | ||
/** | ||
* Reuse the existing view model, invoking Router lifecycle hooks. | ||
*/ | ||
invokeLifecycle: 'invoke-lifecycle'; | ||
/** | ||
* Replace the existing view model, invoking Router lifecycle hooks. | ||
*/ | ||
replace: 'replace'; | ||
} | ||
|
||
/** | ||
* Enum like type for activation strategy built-in values | ||
*/ | ||
export type ActivationStrategyType = ActivationStrategy[keyof ActivationStrategy]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.