Tagged Questions
0
votes
1answer
21 views
Controller on nested state not getting executed
I have nested states, with the parent and child state having a separate controller. But only the parent state is getting executed.
I have the url structure: #/restaurant/2/our-food
So, I want it to ...
0
votes
0answers
45 views
Define the onEnter and onExit callbacks in another file with Angular UI Router
I have a simple application using Angular UI Router with some states.
Actually I have this kind of code in my router :
$stateProvider.state('map.layers', {
url: '/layers',
templateUrl: ...
0
votes
0answers
98 views
How to navigate to a child state using parameters from a factory using Angular.js and ui-router?
I'm trying to get angular ui-router to navigate to a child state using a parameter supplied by a factory which has a default parameter at the start in order to preserve the parameters across the app.
...
0
votes
1answer
61 views
How do I set child state with stateParam in ui-router
I have been struggling for sometime for following scenario to work right.
I am using ui-router with angularjs and I need something like:
Parent state : .state('parent', { url: '/parent/:someUserId' ...
1
vote
1answer
42 views
One segment route for two different operations
i need to resolve a route of one segment to different behaviors with angular-ui router.
For example im doing this by:
$stateProvider
.state('parent', {
url: '/:route'
template: ...
3
votes
3answers
228 views
UI Router conditional ui views?
I can't figure out a reasonable way, which doesn't feel like a hack, to solve this rather trivial problem.
I want a guest to see a splash page when they access the index of the website and a logged ...
0
votes
1answer
203 views
AngularJS change route by ng-click using ui-router
How can I change the route.state using ng-click instead of a link applying ui-sref.
I've tried this:
<button ng-click="selectDir(file.fullPath)">set</button>
with
$scope.selectDir = ...
0
votes
1answer
64 views
Nested views not rendered
Very basic example, but doesn't work. What i do wrong?
<body ng-app="App"></body>
<div ui-view="navbar"></div>
<div ui-view="sidebar"></div>
<div ...
1
vote
1answer
261 views
Angular UI Router - nested routes, not work templates in nested state
Here is my code:
.state('profile',{
url : '/profile',
templateUrl: 'views/user.html',
controller: 'UserCtrl'
})
.state('profile.forgot',{
url : ...
1
vote
1answer
273 views
How to handle long dynamic urls with angular ui-router?
I am building the front-end app for a REST service, and most of the resources are located at long urls where most of the segments are dynamic based on records created in the app by users. Obviously I ...
0
votes
2answers
424 views
How to extract query parameters with ui-router for AngularJS?
How do I extract query parameters using ui-router for AngularJS?
In AngularJS' own $location service I did
($location.search()).uid
to extract the parameter uid from a URL. What is the ...
2
votes
1answer
633 views
ui-router resolve with dynamic parameters
This is probably simple but I can't find anything in the docs and googling didn't help. I'm trying to define a state in $stateProvider where the url I need to hit on the server to pull the needed data ...
7
votes
1answer
211 views
How can I automatically go to the last selected child state when I view only the parent state with ui-router?
I have the following set up:
var admin = {
name: 'admin',
url: '/admin',
views: {
'menu': {
templateUrl: ...
0
votes
0answers
114 views
Angular.js UI-Router Children Scope
I am using the ui-router library (https://github.com/angular-ui/ui-router) and I'm having a bit of confusion around nested views/routes.
Here is how I've configured the routes:
$stateProvider.state( ...
0
votes
1answer
328 views
AngularJS UI-Router multiple states with same URL
I have a multipage form made using AngularJS and the AngularUI router ui-router. Each step has it's own URL (/step1 -> /step2 -> /step3). At step 2 the form offers the user a choice between 2 options. ...
0
votes
0answers
77 views
UI-Router dependencies for transitionTo
I am having trouble getting my states to work correctly using ui-router. The App I am building is large and hence I have multiple modules defined (which in the long run will be maintained by different ...
2
votes
2answers
428 views
Access $stateParams of new state in service called from resolve function with UI Router
Is there a way to access $stateParams for the state you're transitioning to from a service called in a resolve function? With ngRoute you'd use $route.current.params. As this minimal plunk shows, the ...
1
vote
4answers
1k views
Angular UI Router - Views in an Inherited State
edit: Based on the answer by @actor2019 I want to update my question to better explain the problem:
Using Angular UI-Router(v0.0.2), I've setup the app to properly navigate between main ...
0
votes
1answer
480 views
Angular UI-Router: Nested state/view displays route but not template
I'm currently using Angular UI-Router 0.0.2 for routes/states in my angular app. In my app, I have both a dashboard and an account page - the dashboard displays app data; the account page displays ...
2
votes
0answers
405 views
How to manage state with the ui-router with multiple modules
I have an app page with 3 columns. The middle column is the main activity and is always displayed. The two side columns are widget lists, that have their own controller and states, and can be either ...
9
votes
3answers
2k views
Otherwise on StateProvider
Using angular-ui-router, How can I user the otherwise method on $stateProvider or how can I use it at all ?