File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ export abstract class Instruction {
160160 // default instructions override these
161161 toLinkUrl ( ) : string {
162162 return this . urlPath + this . _stringifyAux ( ) +
163- ( isPresent ( this . child ) ? this . child . _toLinkUrl ( ) : '' ) ;
163+ ( isPresent ( this . child ) ? this . child . _toLinkUrl ( ) : '' ) + this . toUrlQuery ( ) ;
164164 }
165165
166166 // this is the non-root version (called recursively)
Original file line number Diff line number Diff line change @@ -91,6 +91,15 @@ export function main() {
9191 expect ( instruction . component . params ) . toEqual ( { } ) ;
9292 } ) ;
9393
94+ it ( 'should generate URLs with extra params in the query' , ( ) => {
95+ registry . config ( RootHostCmp ,
96+ new Route ( { path : '/first/second' , component : DummyCmpA , name : 'FirstCmp' } ) ) ;
97+
98+ var instruction = registry . generate ( [ 'FirstCmp' , { a : 'one' } ] , [ ] ) ;
99+ expect ( instruction . toLinkUrl ( ) ) . toEqual ( 'first/second?a=one' ) ;
100+ } ) ;
101+
102+
94103 it ( 'should generate URLs of loaded components after they are loaded' ,
95104 inject ( [ AsyncTestCompleter ] , ( async ) => {
96105 registry . config (
You can’t perform that action at this time.
0 commit comments