Skip to content

Commit

Permalink
refactor(ParamTypeDefinition): Add dynamic flag to interface. Make …
Browse files Browse the repository at this point in the history
…interface fields optional.
  • Loading branch information
christopherthielen committed Jan 10, 2017
1 parent 659af73 commit 661e833
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/params/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ export interface ParamTypeDefinition {
* - No pattern modifiers like case insensitive
* - No start-of-string or end-of-string: `/^foo$/`
*/
pattern: RegExp;
pattern?: RegExp;


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

/**
* Enables/disables inheriting of parameter values (of this type)
Expand All @@ -593,6 +593,18 @@ export interface ParamTypeDefinition {
* $state.go('home.nest');
* ```
*/
inherit: boolean;
inherit?: boolean;

/**
* Dynamic flag
*
* When `dynamic` is `true`, changes to the parameter value will not cause the state to be entered/exited.
*
* Normally, if a parameter value changes, the state which declared that the parameter will be reloaded (entered/exited).
* When a parameter is `dynamic`, a transition still occurs, but it does not cause the state to exit/enter.
*
* Default: `false`
*/
dynamic?: boolean;
}

0 comments on commit 661e833

Please sign in to comment.