Tagged Questions
0
votes
0answers
14 views
UI-Router Let URL Pass when not defined in a state
I would like to use Angular UI-Router however I would need it to let any url not defined in the $stateProvider or $urlRouterProvider.
I've searched through their documentation, API etc but cannot ...
0
votes
0answers
70 views
Why js variable is changing? [on hold]
I am using Angular-UI Router and when ui-view directive is being applied, variable $state makes surprise.
In $viewDirective I wrote console.log($state) - variable $state.$current.locals contains key ...
0
votes
0answers
18 views
Ui-Router and purposeful transition to the same state
I was wondering about going to the same state in ui-router and the best way to approach this. In my state transition I have it set up like this:
.state('newstep',{
url:'/step/:stepnumber',
views: {
...
2
votes
0answers
29 views
What is the Angular ui-router lifecycle?
The best I've found is http://www.ng-newsletter.com/posts/angular-ui-router.html. It doesn't go as deep as, for example, the order in which $stateChangeStart, exampleState.onEnter, ...
1
vote
1answer
36 views
Injecting resolve into resolve
I was wondering, if i can inject a resolve parameter into another resolve parameter. Code would tell you more:
.state('videos.videosLection', {
url : '/:lection',
templateUrl : ...
0
votes
0answers
41 views
Angular UI select2 - shows [object Object] on tab switch
select2 with Angular seems to be working - however I'm using ui-router and I have different tabs.
One of my select2 inputs is used in two tabs and the ng-model is the same. While everything works, ...
0
votes
0answers
26 views
Angular-UI-Router - change 3rd level nested view without knowing about 2nd level nested view
I have few "parent modules", lets say
user
community
I also have "embedable modules", lets say
photos
videos
wiki
My embedable modules can be embed to the parent modules.
All modules do not ...
0
votes
2answers
36 views
How can I get the full url of the current ui-router state?
I'm using ui-router for AngularJS; I'm handling the '$stateChangeSuccess' event, and trying to get the full path (after '#') for the current state. $location.hash() returns an empty string and ...
0
votes
1answer
33 views
How to redirect to state if specific stateParam is empty
I'm not sure if the way I am doing it is correct, any advice would be appreciated.
I have a Restaurant Selector, which the user can select a restaurant from. Then all other child states load up ...
0
votes
1answer
37 views
AngularJS / ui-router: $state.go does not work inside ng-click
I have a view where I have the following code:
<input type="button" value="New Post" ng-click="$state.go('blog.new-post')">
The goal is to transition to a new state without having to use ...
1
vote
1answer
91 views
angular-ui-router 0.2.7 nothing showing on page
I need help. I build web app with angularjs 1.2.5 and angular-ui-router. When I use angular-ui-router v0.2.0 all works fine. But when I have upgraded angular-ui-router to v0.2.5 or v0.2.7 I see empty ...
2
votes
1answer
23 views
AngularJS: Pass an object into a state using ui-router
I'd like to be able to transition to a state and a pass an arbitrary object using ui-router.
I'm aware that usually $stateParams is used, but I believe this value is inserted into the URL, and I ...
0
votes
1answer
29 views
AngularUI Router abstract states
I'm using ui-router & running into some issues with abstract states. When using version 0.2.0 this works but I get this error:
Uncaught Error: Cannot transition to abstract state 'opportunities'
...
1
vote
1answer
41 views
Angular ui router : calling method on controller from onEnter
My ui router config is like this:
$stateProvider
.state("list",{url:"/list",templateUrl:"list.html",controller:"ctrl as vm"})
.state("list.select",
url:'/select',
...
2
votes
1answer
30 views
Have parent state default to child state using ui-router
I have this state structure:
.state('places',
{
url:'/places',
controller:'PlacesController',
templateUrl:'views/places.html'
})
.state('places.city',
{
url:'/:city',
...
0
votes
1answer
52 views
Keep AngularJS responsive while resolving controller dependencies
AngularJS stops processing UI events while it waits for any promised controller dependencies to resolve. If any of these dependencies rely on an API call that hangs, the application becomes ...
1
vote
1answer
32 views
Closing a modal automatically on navigation (when clicking an anchor)
I'm using angular-ui modal in my webapp. one of models display many links (anchor elements) that navigate to various parts of the app. the modal can be closed as usual with modal.dismiss() or ...
1
vote
1answer
63 views
Angular/UI-Router - How Can I Update The URL Without Refreshing Everything?
I'm new to both Angular and the ui-router. When someone selects a model and my controller performs a standard SHOW method, I simply want to update the URL to include the model's ID without refreshing ...
3
votes
2answers
93 views
Angular UI Router Nested State resolve in child states
In an angular app I'm working on, I'd like there to be an abstract parent state which must resolve certain dependencies for all of its children's states. Specifically, I'd like all states requiring an ...
0
votes
0answers
47 views
Stop angular ui-router from reloading state's template and controller, if only params change?
I have state defined like:
.state("root.home.foo", {
url: "/foo/:id",
templateUrl: "/static/partials/home.foo.html",
controller: 'FooCtrl'
})
When in that state, I respond to a mouse ...
1
vote
1answer
40 views
Angular-UI-Router modal like pinterest
I'm making an app with a gallery that looks a lot like http://pinterest.com. In Pinterest, when you click a pin, it shows the pin page over the top of the gallery you were viewing. The URL changes to ...
0
votes
1answer
30 views
how to use $state.go with a sub state?
I'm trying to switch states into a substate from its parent page. Here is my setup:
I've a form (url: /session) that has ng-click attached
the ng-click runs a $resource POST, and calls
$state.go on ...
0
votes
2answers
62 views
ngAnimate with ui-view
I am having major problems with getting ngAnimate to work with ui-view. The classes never get applied. Please help:
bower.json
"angular": "1.2.0-rc.2",
"angular-resource": "1.2.0-rc.2",
...
1
vote
1answer
27 views
How to set nested state with default fallback state in AngularJS
Is there a way in the AngularJs to define the fallback per nested root state?
i have the following to redirect the user to the homepage when unmatched url is found
...
0
votes
3answers
39 views
Controller scope object changes not reflected in directive $watch callback
I have a controller that has an an object on its scope: $scope.objToTrack.
I have a directive that is inside a nested view that $watches for changes to that object.
It's has isolate scope, but ...
1
vote
1answer
58 views
How to change ui-view template URL programatically
I want to change the ui-view templateUrl programatically from inside a controller because the templateUrl option does not support injection of services and I need a service to determine the template ...
0
votes
0answers
55 views
AngularJS [UI-Router] urlRouteProvider.when() versus resolve for routing to child states
In my app I have a state called 'dashboard' with multiple child states
.state('dashboard', {
url: '/dashboard',
abstract: true,
// resolve async objects before controller instantiation.
...
0
votes
1answer
22 views
Using angular-ui-router can I have multiple states simultaneously?
What I'm trying to accomplish is showing the user a page-creation wizard in a lightbox/modal without the underlying page disappearing just because I'm moving from the page state to the wizard state; I ...
0
votes
3answers
54 views
0
votes
1answer
64 views
Query string parameter in ui-router urls?
I have these states:
.state('quotes', {
abstract: true,
url: '/quotes'
})
.state('quotes.new', {
url: '/new',
templateUrl: 'views/quote-form.html',
controller: 'QuoteFormCtrl'
})
...
0
votes
1answer
29 views
Referencing Angular controller members from named / unnamed controllers
I decided to put this question up because I got to a point where I'm pretty confused about how Angular and the more delicate parts of JavaScript work. I try to formulate my question so it can be ...
0
votes
1answer
34 views
Stop a common template from being reloaded
I have an Angular application that depends on Angular ui-router. This application has multiple pages which share a common template such as the navbar:
var app = angular.module('app', ['ngSanitize', ...
2
votes
1answer
53 views
why $routeChangeSuccess never gets called?
I am doing something similar to below on my app but I am just not able to get the routeChangeSuccess event.
var myapp = angular.module('myapp', ["ui.router", "ngRoute"]);
...
0
votes
1answer
50 views
How can I redirect a user to an unauthorised page based the result of an async call from stateChangeStart?
I would like a central place to check if a user is authorised to navigate to states in my application (e.g. can current user view details page for company x). Adding a line to every resolver seems a ...
0
votes
2answers
43 views
UI-Router inheriting views
i'm beginning to have some serious repetitions in my code.
Is there any way to declare a father view that outer views will inherit from ?
my code is as below :
var header = { templateUrl: ...
2
votes
1answer
45 views
What is best way to implement Dynamic URL Routing using ui-router
We have a large application and one of our requirement is dynamic views need to be shown to user from a links in Grid. We are using kendo grid to display data.
e.g. clicking on customer name should ...
0
votes
0answers
41 views
Angular ui router unit testing (states to urls)
I'm having some trouble unit testing the router in my application, which is built on the Angular ui router. What I want to test is whether state transitions change the URL appropriately (there will be ...
0
votes
1answer
22 views
Strange ui-view behavior when managing states with Angular ui-router
I've built a basic plunker where I'm trying to manage a list of posts with two separate post filters in the header. When a filter is clicked, an "active" class is appended to the link. Since two ...
0
votes
1answer
85 views
AngularJS with ui-router and nested templates
I have AngularJS with angular-ui-router to have more control over my templates. I have two URL's
"/timeline"
"/login"
My idea is to load a parent state which has both the HTML for 1 and 2 and a ...
0
votes
1answer
44 views
How to have global footer in separate views using angular-ui-router v0.2.5 (allows modules)
Sorry if the title of this is confusing.
I'm converting a template I purchased into an angular.js app.
I want to use different modules to organize the app.
I'm also using version 0.2.5 of ...
1
vote
1answer
32 views
Angular with filter in different view
I have a question concerning Angular and Angular-UI Router. I would like to place a filter in a bootstrap navbar which can vary depending on the current route. I have tried to implement this behaviour ...
1
vote
1answer
30 views
angular-ui-route with IE8
I'm trying to use angular-ui-router in my current project - and it was all fine in chrome & firefox. But when it comes to trying it out in IE8, it doesnt seem to work. I'm getting the error ...
1
vote
1answer
49 views
Angular UI-Router Thinks Every URL Is Unmatched And Redirects
In my HTML, I have the following two links, but when I click them or try to enter them into the browser, my new ui-router code is redirecting them to the otherwise url I have specified. Why is this?
...
0
votes
1answer
50 views
angular-ui: ui-router dynamic routes and states
I have a dynamic route defined as:
$urlRouterProvider
.when(
'/:resource?collection&type&id',
[
'$match', '$stateParams',
function routeValidator( ...
0
votes
0answers
31 views
AngularJS ui-router omitting query parameters
I need to switch to a new state in my AngularJS app. I am using ui-router to manage the states. The current URL contains query parameters that I use. The URL for the new state should not contain those ...
0
votes
1answer
34 views
Ui-router not routing by url
router change view by uri
my current router is
$stateProvider
.state('main', {
url: "",
views: {
"header": { templateUrl: ...
0
votes
0answers
28 views
combine two or more navs
I'm trying to create a three-panel layout:
left: a list of items generated with ng-repeat (ie: group1, group2, group3...)
top: a couple of buttons for each group-page (ie: home, browse, users,...)
...
0
votes
2answers
42 views
Why can't I access params within resolve?
I have a show page and I want to make sure the data is available before i display this page. It was my understanding that using the resolve property in a route was the best way to do this. However ...
0
votes
0answers
37 views
Angulajs - creating a directive while using ui-router
I am trying to decipher directives... although I viewed and implemented many AngulaJS simple stack tutorials, I am unable to get it to work while using ui-router, not sure why. Too many attempts have ...
0
votes
1answer
70 views
angular-ui-router - ng-model not accepting input text change unless in ng-repeat
The problem is:
Using ui-router 0.2.0 and angular 1.1.x, ng-model is not accepting changes to an input text field (I also tried checkbox and select dropdown with same dis-allowed change!).
However, ...