Commit 19d946fa652b528d385f151ecaa8765acc79ffe2

Authored by Michel Felipe
1 parent a31408fa

Added 'per_page' param into @StateConfig environment router definition

src/app/environment/environment.component.ts
... ... @@ -32,7 +32,7 @@ import {SearchComponent} from "../search/search.component";
32 32 }
33 33 },
34 34 {
35   - url: '^/search?query',
  35 + url: '^/search?query&per_page',
36 36 component: SearchComponent,
37 37 name: 'main.environment.search',
38 38 views: {
... ...
src/app/search/search.component.ts
... ... @@ -20,6 +20,7 @@ export class SearchComponent {
20 20 constructor(private articleService: ArticleService, private $stateParams: ng.ui.IStateParamsService, private $state: ng.ui.IStateService) {
21 21 this.query = this.$stateParams['query'];
22 22 this.perPage = this.$stateParams['per_page'] || this.perPage;
  23 + debugger;
23 24 this.loadPage();
24 25 }
25 26  
... ...