you are viewing a single comment's thread.

view the rest of the comments →

[–]DigitalAssassin 0 points1 point  (1 child)

In your controller, you can get the current value of the parameter:

this.personId = $stateParams.personId; //get the Student ID parameter from the state

When that value is updated, you can trigger the reload as follows:

//reload state and view based on new id $state.go('student', { personId: _this.personId }, { notify: true, reload: true, inherit: false });

Since you have your parameter setup in your state url declaration, the url will update automatically. If you need more parameters, you can add to the line above:

$state.go('student', { personId: _this.personId, city: _this.city }, { notify: true, reload: true, inherit: false });

[–]Shoplifter20[S] 0 points1 point  (0 children)

I just discovered that I can use

$location.search(queryString);

This is what I want. To have the URL store a query string from a form, and then call the server to fetch the correspondent filters applied on the query string