Tagged Questions
1
vote
2answers
39 views
Bind a controller $scope to objects in service
I'm creating a multi-step wizard using angularjs. The steps in the wizard could potentially change by actions the user takes. I'm storing the steps in a navigation service. I want the navigation ...
0
votes
0answers
36 views
RequireJS + AngularJS + Module: Dependency issues
I had my angularjs app setup in local and everything was working fine till I upload my code to the staging server. I now have issue with dependencies that are not respected but I can't see why. I ...
0
votes
2answers
32 views
AngulaJS UI-router retry promise
I am using ui-router in my angular project. My question is: What's the best practice to retry and handle correctly a promise inside a resolve?
Right now I am simulating a disconnection or timeout, ...
-1
votes
0answers
12 views
How to trigger ui-sref from within the controller
Below is my navigation for a multi-step wizard that uses ui-router. I want the ui-sref=".newmodel" behavior that I get when I click the anchor tag to occur on the page load, so I would do this in the ...
0
votes
1answer
10 views
UI-Router using routes within a Section of a Site
The site I'm building already has URL's built up using MVC. So for example /Account goes to a page, /Customers goes to a page, and /Quotes goes to a page. On the /Quotes page I have a multi-step ...
0
votes
1answer
14 views
ui-router removes directory path from url
I've set up ui-router states like so:
$stateProvider
.state("login", {
url: "/Login",
templateUrl: "login.html",
controller: "LoginController"
...
0
votes
1answer
29 views
Angular Ui Router :stop $state.go to reload controllers but change URL
My app uses $state.go when switching between tabs and this cause to re-initializes the controllers and scope variable in those controllers get updated and causes memory leaks.Is there a way to stop ...
0
votes
0answers
25 views
Ui router - nested view with modal box
I am trying to show a modal box based on the url using Angular ui.
I have three states - home, setting, and modal based on the setting state.
$stateProvider
.state('home',{
url:'/',
...
0
votes
0answers
25 views
$urlRouterProvider with dynamic paths? [ui-router]
Is there a way to use dynamically generated paths using $urlRouterProvider.when()
?
For instance, I have sub states that are based on $stateParams.
http://www.example.com/users/User01/edit/
Where ...
0
votes
1answer
19 views
Automatically redirect to child state
I'm using UI-Router in my AngularJS app and I have routes like this:
angular.module('app.messages').config(function($stateProvider, ACCESSLEVELS) {
$stateProvider.state('messages', {
url: ...
0
votes
0answers
21 views
Angular UI router and $stateChangeError - strange resolve loop
The app I'm writing is using the resolve property in the main UI router state.
It tries to resolve to a list of things, using a factory that uses $http.
So I was trying to implement error handling, I ...
0
votes
0answers
34 views
Angular Ui Router :same state with different url
My app has two states home.summary(parent state) and home.summary.detail(child state) and I want to show on same state with different url.
Is there a way to achieve this?From state of home.summary ...
1
vote
0answers
19 views
Get ui-router's ui-view to repopulate default content?
How can I set default content for ui-router's ui-view without a template?
Right now I have something like this:
<div ui-view>
Default Content
</div>
As the states change, the view ...
0
votes
2answers
55 views
Angular UI Router: Different states with same URL?
The landing page of my app has two states: home-public, home-logged-in. Now I want to show both states on the same URL, but let the controller and template depend on the user session (is the logged in ...
0
votes
0answers
16 views
augular-ui-router state will not match with query parameter
I'm stuck.
I can't get ui-router for AngularJS to match a state with a query parameter, but my other state with query parameters is working correctly.
Here is the problem state.
...
0
votes
1answer
24 views
sharing resource objects through state controllers
What are the posible ways for sharing resource objects through state controllers.
I am using $rootScope, state inheritance or factories (services). Is there any other ways to send resource objects to ...
0
votes
0answers
23 views
How to change parent item state to active in angular-ui-router
beacouse i am a foolish chinese coder,so my english is very ...., if you do not understand me,but I can't help it
this is my code,i just want class parent's state to active when I click a1,a2,a3,a4
...
0
votes
1answer
25 views
Angular UI Router resolve throwing provider error
I seem to be having an issue with Angular UI router and trying to add a resolve to a state. The weird thing is, that I have it in another place and it works fine.
I'm separating my code out into ...
0
votes
2answers
72 views
Angular UI router handling 404s
I have an app with a service which wraps my API calls:
var ConcernService = {
...
get: function (items_url, objId) {
var defer = $q.defer();
$http({method: 'GET',
...
1
vote
2answers
86 views
Transitioning from a state containing an ng-grid object is not working
In my AngularJS app, I use ui-router for navigation and ng-grid to display data. Things work fine until I transition from a state containing a grid to any other state. This is the corresponding ...
0
votes
1answer
39 views
AngularJS ui-router initial route
I have a page that contains 2 different sub-pages.
The search state is the main container and search.list automatically when that loads.
When a user navigates to search.detail it will invoke the ...
0
votes
1answer
34 views
Angular UI Router: The opposite of ui-sref-active
Is it possible to achieve the opposite of ui-sref-active="class1"? I want to insert a class on all states except for the one I define with ui-sref.
I can easily solve this on the CSS side, but I was ...
0
votes
1answer
30 views
Alternative approach to ui-router state transition animations
I was given what i thought was a nearly impossible task by my product owner to create some animations between states. I began using ngAnimate and came up with what I thought was a pretty cool solution ...
1
vote
1answer
32 views
Angular UI-Router modal removes parent state
I'm working on an angular app that has ui-router module.
When entering a certain state of the router, I show a modal dialog, which then replaces my parent view. I would like to keep the parent view ...
1
vote
2answers
76 views
Angularjs nested routing and loading multiple pages within a view
I'm setting up an angularjs app that has multiple vertical columns that display on the same page and based on what item is clicked a new or different column will expand.
Here's my jsbin example.
...
0
votes
1answer
26 views
Changing menu structure using ui-router and angular js
I am trying to create a menu structure, where the nav bar contains some information that is selected in one of the menu options.
See the plunkr.
What I try to do
Initially the welcome state is ...
1
vote
1answer
37 views
angular ui-router best practice inheritance vs metadata
I am converting my application from ngRoute to uiRouter. I have read and watched a lot of tutorials but I am still lacking the experience to decide on best practices.
First of all a major change I ...
1
vote
0answers
29 views
angular ui router scroll to an anchor/optional parameter
url: '/blog/:id/:slug?scrollTo',
when the scrollTo is not null
I want scroll the page to the scrollTo
value.
I tried like:
$scope.$on('$stateChangeSuccess', function (event, toState) {
...
0
votes
1answer
40 views
Angular UI-Router nested tabs, switch and switch back to where we left off
Please look at this Plunk
click "Left"
click "Link 2" to expand it
click "Right"
Click "Left" - link 2 is no longer expanded
Question: how can the Left tab "remember" that it was displaying "Link ...
3
votes
2answers
195 views
AngularJS: Two Parallel Views, One URL
I'm building a dashboard/control panel app that is basically made up of two tabs (bootstrap) at the root level, called "dispatch" and "admin". Each tab has a good bit of its own multi-tiered ...
1
vote
0answers
34 views
Angular-UI ui-router supporting infinitely nested states
I have a situation in my Angular app where I'd like to consider an infinitely nested state/route. For example, let's say that I have a person and I want to see the lineage of the family. I might ...
2
votes
1answer
82 views
angular ui router directive dynamically ui-sref
HTML
<li class="dropdown signals" signals="signals" data-nb-signals="" style="visibility: hidden;">
<a data-toggle="dropdown" href="#">
<i class="glyphicon ...
3
votes
1answer
60 views
Changing the default behavior of $state.go() in ui.router to reload by default
I have an Angular app built using the ui.router package for its URL routing. I would like to change it so that if the user attempts to navigate to the page they're already on, the router reloads that ...
1
vote
1answer
29 views
Conditional ui-view
I have a ui-view defined in my root template <div ui-view=""></div>. Is that possible to automatically hide that view if it's content is empty?
I was searching for similar thread for some ...
1
vote
1answer
23 views
Nested views without nested states
Following this tutorial: https://github.com/angular-ui/ui-router/wiki/Multiple-Named-Views, i'm able to create an application with multiple views defined in a root template. I need to modify that ...
0
votes
1answer
21 views
Angular ui-router url issue
I have a search form, something like (jade):
div.search
form.form-inline(role="form", method="get", ng-controller="searchFormController")
div.row
div.col-xs-2
h3 Search
...
1
vote
0answers
68 views
AngularJS Ui Router regex matching wildcard in url
I wonder if this is possible - I need to match the following URLs with one pattern:
/one/app/home
/one/two/app/home
/one/two/three/app/home
...
I understand that AngularJS routing doesn't support ...
0
votes
0answers
8 views
Is it possible to have cross-references states?
Is it possible to reference a state from a child of a different state?
For example:
I have an abstract state admin which I use for prefixing the url with /admin.
It has a child state: admin.list from ...
0
votes
0answers
14 views
Distinction between Angular controllers in filesystem vs controllers in Angular-ui-router
I am trying to keep all different providers (services, factories, services, providers) in their own file for a growing application. So the file system should look similar to this:
www
↳ bower
↳ img
...
0
votes
1answer
12 views
How can I prevent the window from scrolling when changing states with AngularJS UI-Router?
With ui-router whenever the user navigates between states the browser window always scrolls to a seemingly random location. It seems to be worse when there are multiple ui-views in play. How can I ...
0
votes
0answers
17 views
Prevent user from executing actions in parent state when parent and child state are in the same view
I'm developing an application with some complex forms. For example I have a grid that displays personnel to the user in my personnel state, the grid has editing/deleting/creating functionalities which ...
0
votes
1answer
71 views
Change a url parameter in the current state from ui-sref in angular-ui-router
Using ui-router I would like to set a URL parameter no matter what state I'm in. A use-case for this is to switch between bookmarkable interface modes (e.g. "boring" or "funny").
I know it can be ...
0
votes
0answers
15 views
ui-router - handling bad URL's when dynamic templateUrl
I don't know how to redirect to another state when html file is not found...
.config ($stateProvider) ->
$stateProvider
.state 'main.page',
url: '/page/:staticName'
...
1
vote
0answers
32 views
angular ui router resolve view not loading
I have a state configuration which can be abstracted to the following:
$stateProvider.state('myState', {
templateUrl: 'myPath.html',
resolve:{
'myData': function($q, ...
1
vote
1answer
40 views
Synchronizing nested views in Angular ui-router
My "root" state includes two views that exist for the entirety of the application:
//index.html
<body ui-view>
<under-pane ui-view = "underpane"></div>
...
1
vote
1answer
61 views
Matching url path with regex in $urlRouterProvider.when()
Based on the angular ui-router wiki (https://github.com/angular-ui/ui-router/wiki/URL-Routing#urlrouterprovider) it should be possible to use regex for matching the incoming path. How could I express ...
0
votes
1answer
34 views
angular-ui-router: add css class if state matched
simple wiki
I'd like to show an edit button in the navbar is state == 'page'
v0.2.10
.state('page',{
url: "/wiki/{ns:[0-9a-zA-Z\-/_]+}/{wp:[0-9a-zA-Z\-/_]+}",
templateUrl: ...
0
votes
1answer
49 views
Deep linking to AngularJS app doesn't work consistently… what's up?
I have an AngularJS app that uses ui.route. This is hosted within ASP.NET MVC, which is intended to only serve a single View that points to this app and ideally links into it as needed. My state ...
0
votes
1answer
34 views
$state.go('state.name') not correctly changing states
I am attempting to move between states (using ui.router) programmatically without the user having to click on anything. The documentation at ...
0
votes
1answer
26 views
$stateParams returning undefined
I have these routes defined:
.state('sport',
url: '/sport'
templateUrl: '/templates/sport'
controller: 'SportCtrl'
)
.state('sport.selected'
url: '/:sport'
...