Tagged Questions
0
votes
1answer
11 views
Ui-router route parameter with regex
I feel like this is simple but I can't get it to work...
I am using Ui-Router 2.11 which includes optional parameters with regex expressions.
I have this url which works
'/event/{eventId:[0-9]}'
...
0
votes
0answers
15 views
Angular UI-router for filtered table with persistent URLs
Ok, so I have a pretty common use case. A large dataset (for now loaded in memory), which I'd like to filter to soemthing small enough to display. Each row in the table has a link that displays a ...
0
votes
1answer
45 views
Resolve a controller?
I'd like to expose the functionality defined in a controller to child controllers. In essence this:
.state('parent', {
controller: 'ParentCtrl',
})
.state('parent.child', {
controller: ...
0
votes
1answer
22 views
Angular ui router nested state but same controller/view (no page transition)
I have a scenario were I am creating a page that should be editable. On click of an edit button, property names should change to textboxes (or datepicker, etc depending on the 'type' of the property).
...
1
vote
1answer
17 views
Angular UI Router - Nested States with multiple layouts
I want to have multiple layouts (1-col, 2-col, 3-col) which I want to switch out for different routes based on the layout needed.
I currently have a root state which defaults to using a certain ...
0
votes
1answer
19 views
preventing users from navigating to some urls after login - angular-ui-router
currently i'm developing a sample admin application using angularjs, in my application. i have used ui-router instead of ngRoute to define the urls. on my config function states are defined as below.
...
0
votes
0answers
20 views
How to manage resolve data with some model logic
I got something like this:
.state('Main',{
abstract:true,
resolve:{
User : ['UserService',function (UserService) {
return UserService.getData();
}]
}
})
An ...
0
votes
0answers
9 views
Implementing angular-ui-router with java servlet webapp context path
Basically the problem is related to the path ui-router redirects when page is reloaded.
I have java application with context kiosk-ui so the url is: http://localhost:8080/kiosk-ui.
The client side ...
0
votes
0answers
25 views
Nested Views inside a modal not showing up. (ui-router and ui-bootstrap)
I'm having trouble creating a modal that responds to the application state.
From angular ui-router wiki I saw how to achieve my goal but my code is not working and I'm not figuring out why for the ...
1
vote
1answer
32 views
How to pass parameters using ui-sref in ui-router to controller
I need to pass and recieve two parameters to the state I want to transit to using ui-sref of ui-router.
Something like using the link below for transitioning the state to home with foo and bar ...
0
votes
0answers
28 views
Angular UI-Router pass resolve to child onEnter
I'm trying to pass a previously-resolved result from a parent to a modal instance that is instantiated onEnter, however the controller reports that it's an unknown provider:
Error: [$injector:unpr] ...
0
votes
0answers
17 views
Angular ui-router slide navigation
I am trying to make a simple website using angular ui-router. The idea is to have 5 sections. Each one has its own route and template.
When on section 1, you click section 5, you quickly go through ...
0
votes
1answer
44 views
AngularJS UI-Router. Unknown provider
I'm getting this error, but don't know where or how to find and fix it.
I've tried a variety of things listed around minification, but none have worked.
My module is defined here:
'use strict';
// ...
0
votes
1answer
27 views
Angular Nested states not working as expected
Can someone see why this is not working? /series is not loading the Gallery, however the /series/:id/seasons part is working. (Its not a missing ng-view problem see working code below!)
...
0
votes
1answer
38 views
Beginner Angularjs UI Routing
I have began learning AngularJS and decided to go with Angular-UI-Router for all of my routing needs, but unfortunately, I am unable to get the templateURL property of the $stateProvider to render. I ...
0
votes
1answer
30 views
How to properly refresh scope when changing state in ui.router
I am using ui.router to manage the state of some pages on my app. When I change state I would like the controller to reload the objects in scope. However I am not finding a way to tie into state ...
0
votes
1answer
20 views
How to access data from my controller in a state
What is the best way to stop a user from going to a state if there is no data for that state? I need to redirect the user to /featured if there is no data in one of the other states.
I thought that I ...
0
votes
1answer
144 views
Ui-router states appending to existing ui-view
App structure
$stateProvider.
state('azured', {
url: "/azured/",
}).
state('azured.ref', {
url: "/ref",
}).
state('azured.ref.table', {
url: ...
0
votes
1answer
35 views
Angular ui-router's ui-sref-active's parent not working
I know that since 0.2.11 sref-active gets activated even if some of the nested children gets activated. However I'm getting weird behavior.
In this plunk: ...
1
vote
3answers
77 views
How to achieve that “ui-sref” be conditionally executed?
I can't figure out a reasonable way, which doesn't feel like a hack, to solve this rather trivial problem.
How to achieve that "ui-sref" check for a condition before executed?
in other words
How ...
1
vote
1answer
30 views
How do I get rid of the /#/ when using ui-router? [duplicate]
I am new to Angular and I am currently doing my routes with ui.router and was curious about something. I notice when I go to my site either on localhost or online, my URL includes /#/ at the end of ...
1
vote
1answer
27 views
ui-router: Is there a way to have variables in the beginning of the url?
I'd like to have a variable in my route like this:
$stateProvider
.state('edit', {
url: ':organization/edit',
templateUrl: 'partials/edit.html',
controller: ...
1
vote
1answer
38 views
Angular UI router nested views
I have a structure like this:
<div ui-view="main">
<!-- content populated here by AngularJS ui-router -->
<aside ui-view="sidebar">
<!-- content populated here by ...
0
votes
1answer
66 views
lazy loading angularjs controllers with ui-router resolve
I'm trying to get to work angular.js, ui-router, and require.js and feel quite confused. I tried to follow this tutorial http://ify.io/lazy-loading-in-angularjs/. First, let me show you my code:
...
2
votes
0answers
20 views
ui-router: Prevent resolve to be resolved when activating a state in one of the resolve
In the home state, I have a function that checks if the current user is authorized along with other promises.
resolve: {
authorize: ['AuthService', function (AuthService) {
...
0
votes
0answers
22 views
How can I test angular ui-router $stateChangeStart listeners?
Here's a basic authentication scheme I'm using in angular. I'm trying to unit test this little chunk that listens for state changes and checks both if they need authentication and if the user is ...
1
vote
1answer
32 views
'/' is not letting the state to pass to '/{username:[a-zA-Z0-9]{3,20}}' in AngularJs UI-router
I have a abstract root state called 'site' with empty url i.e. '' , which has two child state 'profile' and 'home' where the url for home is '/' and the url for profile is ...
0
votes
2answers
34 views
angular-ui-router and angular-ui-bootstrap tabs: content being loaded into DOM multiple times
I'm using angular-ui-bootstrap tabs and angular-ui-router. I want to load specific states into the tab-pane when a tab is clicked. This is working fine. The problem is that the state is being loaded ...
0
votes
1answer
31 views
Use Ui-Router's ui-sref Just to Set Query Params
I have the following link.
<a ui-sref="...">Clicking this adds ?test=true to the query params.</a>
Is there a way to use the ui-sref attribute to just change query params without ...
0
votes
1answer
20 views
Prepend optional attribute in angular ui-router URL
Is there a way to have an optional attribute at the beginning of the url in ui-router? If so, how?
I want to achieve sth like this:
.state('events',{
url: '(/city:)?/events/:id'
...
})
So ...
0
votes
0answers
13 views
Calling state-parent setup with ui-router, indepenent of page scope
My situation is: I have some nested states that have nested views. I set up the basic app structure with a single, top-level view (called app). Then I can define state views like the following, which ...
2
votes
1answer
35 views
AngularJS: how to prevent programmatic clicking of button that hits AJAX endpoint from client?
I discovered a security vulnerability with my app and I would like to fix it.
On my homepage there is a button and when clicked it triggers a record to be created in my database. I would like to ...
0
votes
0answers
16 views
using ui-router and databinding seems to be broken
I am using a controller in my application... when the view loads its hits the breakpoints in the controller and by all accounts it seems to work.
angular.module('main.controllers', ...
0
votes
1answer
14 views
parallel states in ui-router and angularjs - preventing reload
I have a 'parallel states' setup in ui-router that allows the url and state to determine two different parts of the DOM (left and right). The right is always 'bar', the left varies between baz and ...
1
vote
2answers
17 views
Angular UI-Router redirect route
The Angular UI-Router documentation uses the following example for redirecting:
$urlRouterProvider.when(state.url, ['$match', '$stateParams', function ($match, $stateParams) {
if ...
1
vote
1answer
37 views
Angular-ui-router and href='#'
I'm using angular-ui-router and have an issue with empty a tags, like href='#'. I'm using bootstrap, which makes extensive use of href='#' for dropdowns and such. The problem is if a user selects a ...
0
votes
1answer
27 views
angular ui router - having to click twice for view to update as expected (with demo)
I am a novice with Angular and just getting to grips with the AngularUI Router framework. I have one html page which contains a list of questions (each question needs its own url) and a results page.
...
2
votes
2answers
51 views
Changing Navigation Menu using UI-Router in AngularJs
I'm trying to build a navigational menu like any social networking site i.e. If i'm logged-Out i Can see the input fields asking for Username and Password but if I'm logged-In then i get to see my ...
2
votes
8answers
233 views
+100
Multiple views on one page with history in AngularJS using Angular UI Router
In my AngularJS app, I have an about page with several sub-sections. All these sub-sections are on the same page and part of the same template. However I want to access each section via it's own URL ...
1
vote
1answer
29 views
Disable ui-router to some url
I have some urls, like /some_url_1/, /some_url_2/ and /static_url/.
In my app-config i defined ui-router states for urls /some_url_1/ and /some_url_2/, but url /static_url/ must doing full reaload ...
0
votes
2answers
36 views
angular ui router - using the same templateUrl and controller multiple times
I am using the AngularUI Router framework for the first time and wondered how I could improve the below code.
Basically this all works fine but eventually (in the project I am working on) there will ...
2
votes
0answers
21 views
ui-router deferIntercept and state params
I use the new deferIntercept() of ui-router to update the browser url without reloading
my controller:
$rootScope.$on('$locationChangeSuccess', function(e, newUrl, oldUrl) {
e.preventDefault();
...
-1
votes
1answer
14 views
what does abstract:true do in ui-router?
Sorry my question may seems duplicate beacuse i'm learning Angular JS with some downloaded template but i dint get anything what i exactly need with my searching.
what does abstract: true means?
...
1
vote
2answers
38 views
First state for angular ui router has `name: “”`
I'm new to angular and I'm trying to use angular ui router. When I navigate to / I get this abstract state as my $state.current: Object {name: "", url: "^", views: null, abstract: true}. Is there ...
0
votes
1answer
25 views
Keep $location.search across different states in AngularJS
So right now, I'm changing the url with:
$location.search(params);
But after I change the state (using ui-router), the url loses the parameters I set even though these states have no url defined. ...
0
votes
2answers
31 views
Parent scope not initiated for nested state (angular ui)
For the following state definitions and the url http://localhost/#/foo/bar, I expect to receive the console output
/foo
/foo/bar
However, I only get one /foo. Is my expectation wrong? What can I do ...
0
votes
0answers
109 views
Tabs in angularjs not working properly with UI-Router and UI-bootstrap
I'm using a MEAN.js boilerplate, you can find the entire code here.
I tried to add 2 new tabs to the page rendered after one of the articles have been selected from the list.
For this task I decided ...
0
votes
2answers
183 views
ui-router resolve behaves strangely in Ionic
I started from a demo Ionic app (ionic start myApp sidemenu), and added a resolve to one of the views:
resolve: {
issue: function($q, $timeout) {
var defer = $q.defer();
//defer.reject(); ...
9
votes
4answers
3k 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 ...
24
votes
4answers
10k 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 ?