All Questions
Tagged with state angular-ui-router
257
questions
0
votes
1
answer
44
views
How do I extend ui-router states in Angular 11?
I have declared a state using ui-router in an Angular 2+ project using Ng2StateDeclaration.
export const myState:Ng2StateDeclaration{
name:"myState",
url:"mystate"
component: ...
0
votes
1
answer
21
views
Accept any proceeding characters after specified state URL
I'm using ui-router and one of my states URL can be appended with a dynamic key. So the state looks like this:
.state('reset-password', {
url: '/reset-password/{.*}',
template: require('html-...
7
votes
2
answers
16k
views
How can I save the state of a component after navigating to another component in Angular 8
I have 2 components: HomeComponent and CityComponent. They do not have any relationship.
After navigating back to the HomeComponent, the state of the CityComponent is lost when I navigate to it again. ...
0
votes
1
answer
179
views
Use UI-router to navigate to fromState
AngularJS UI-router has a useful parameter "fromState" which allows me to store where the user came from when they change state. I am trying to implement a system which takes the user back where they ...
2
votes
0
answers
135
views
How to change route on angular ui-router without ngOnInit being called?
I have an angular 7 application using a angular [email protected] where I need to switch between views while maintaining the state of the views all the while.
I dont want ngOnInit to be called upon ...
3
votes
1
answer
2k
views
UI Router RedirectTo after Promise from ResolveFn
I am using the Angular 2+ (targeting Angular 5) version of UI Router, but if anyone has resources for this same problem using the Angular 1 version, I would be happy to see--but I know that the ...
1
vote
0
answers
73
views
Angularjs UI-Router state change changes functionality of Google-API directive
I am using a google places autocomplete directive: vs-google-autocomplete
which works fine. The problem is, if we change the $state (by back / forward button, or just ui-sref="testroute", or $state....
1
vote
2
answers
56
views
$state.go ui-routing function ignores custom parameters
I have created a 'go' back option that takes user back to the advSrch screen/state. I pass loadSearchQuery as true if going back.
$scope.back = function() {
$state.go('advSrch', { isDeleted: ...
0
votes
1
answer
345
views
Lazyload to multiple views in ui-router
A few months ago I've be created the topic: Try to render two templates in same View (Ui-Router), where I asked about how to render multiple views in the same page. My objective with this was created ...
2
votes
1
answer
375
views
How to change pageTitle dynamically on state change angularjs inside state routing
I want to change the pageTitle inside data in state Provider.
$stateProvider.state(test, {
url: '/test',
views: {
main: {
controller: 'TestCtrl',
templateUrl: 'admin/test.tpl.html'...
1
vote
1
answer
220
views
ui-router child state not reloading parent with page refresh with $locationProvider.html5Mode(true);
This should be rather straightforward.
The goal is to remove the # in the url. To achieve this, I use $locationProvider.html5Mode(true);. But that breaks reloading when on a child state.
I'm using ...
1
vote
1
answer
45
views
AngularJS UI-router - how to distinguish between part of url and url parametr?
I have these states defined:
1)
url: "/Home/:organization"
2)
url: "/Home/administration"
In the browser, if I go to "/Home/" or to "/Home/5", then it is OK, state 1) is recognized.
But if I go to "...
0
votes
0
answers
117
views
Angular ui router shared param object between states with components
I am writing an angular app where a parent controller manages the global state, and it transitions between states to display information to users.
I followed this answer and used params to send ...
5
votes
2
answers
12k
views
what is the purpose of $state.includes in angularjs?
I'm new in angularjs, I've little confuse between ng-include and $state.includes. Can anyone please suggest me why we using the $state.includes instead of ng-include directive?
1
vote
2
answers
149
views
Verify login on state change in AngularJS doesn't work well
I want to verify if the user can access a state before he gets there, if he doesn't have permissions will be redirected to another page.
The problem is that I'm doing a SPA and it verifies the ...