Skip to content

Commit 661e833

Browse files
refactor(ParamTypeDefinition): Add dynamic flag to interface. Make interface fields optional.
1 parent 659af73 commit 661e833

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/params/interface.ts

+15-3
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ export interface ParamTypeDefinition {
558558
* - No pattern modifiers like case insensitive
559559
* - No start-of-string or end-of-string: `/^foo$/`
560560
*/
561-
pattern: RegExp;
561+
pattern?: RegExp;
562562

563563

564564
/**
@@ -572,7 +572,7 @@ export interface ParamTypeDefinition {
572572
* The decoding behavior of raw parameters is not defined.
573573
* See: [[ParamDeclaration.raw]] for details
574574
*/
575-
raw: boolean;
575+
raw?: boolean;
576576

577577
/**
578578
* Enables/disables inheriting of parameter values (of this type)
@@ -593,6 +593,18 @@ export interface ParamTypeDefinition {
593593
* $state.go('home.nest');
594594
* ```
595595
*/
596-
inherit: boolean;
596+
inherit?: boolean;
597+
598+
/**
599+
* Dynamic flag
600+
*
601+
* When `dynamic` is `true`, changes to the parameter value will not cause the state to be entered/exited.
602+
*
603+
* Normally, if a parameter value changes, the state which declared that the parameter will be reloaded (entered/exited).
604+
* When a parameter is `dynamic`, a transition still occurs, but it does not cause the state to exit/enter.
605+
*
606+
* Default: `false`
607+
*/
608+
dynamic?: boolean;
597609
}
598610

0 commit comments

Comments
 (0)