Tagged Questions
1
vote
0answers
22 views
How to allow static url routes to exist on a dynamic url namespace
So I have 2 routes in angular-ui-router, one static and one dynamic
$stateProvider
.state('home', {
url: '/home',
templateUrl: 'home.html'
})
.state('profile', {
...
0
votes
1answer
23 views
Angular ui-routing and multiple views in nested child states
I have a parent state that is abstract which basically only contains a template html that has ui-views. I have multiple child states that contains multiple views, and each of the child states has ...
0
votes
2answers
29 views
How to get state variable value from the URL
My state look like this.
$stateProvider.state("user.admin", {
url: "/administration/:action",
views:{
content:{
templateUrl: 'views/admin.html',
...
1
vote
1answer
56 views
UI Router: Multiple Independent Views
I feel like this is a straight forward use case for the ui-router but maybe I'm missing something...
I want to have two separate views next to each other controlled by their own menus. When I click ...
0
votes
1answer
37 views
Access to all states of angular-ui-router programmatically
I have a $stateProvider configured like this:
angular.module('example', ['ui.router'])
.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/steps");
...
0
votes
1answer
25 views
angular ui router state being hit but no template returned
I'm using ng-boilerplate amd have the following folder structure
member
-add
--add.js
--add.tpl.html
-member.js
-member.tpl.html
inside add.js I have the following route defined
.config(function ...
0
votes
0answers
28 views
ui-router prevent individual views from rendering
I wish to develop a dashboard which has multiple named views. Depending on the users role, I would like to prevent certain views from rendering (not simply hiding). With the release of 0.2.11, they ...
0
votes
0answers
29 views
Angular ui-router and ng-grid - very laggy when switching between the pages/views :(
I'm trying to build a single page application using ng-grid and ui-router. All works fine, but when the user navigates between the tabs/pages there are some funny behaviours in the ng-grid tables. ...
0
votes
1answer
72 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
1answer
79 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
2answers
99 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
43 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.
...
0
votes
2answers
90 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 ...
0
votes
2answers
47 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 ...
1
vote
2answers
38 views
not allow to navigate if any changes on form using $dirty and $pristine
I'm trying to stop navigation on my application if any form made changes and try to navigate without saving changes.
i want to show a dialog to show whether to save navigate or discard or cancel ...
1
vote
1answer
57 views
Angular UI router not working
**This js file for the ui router is proper or not.The error displaying is
"Error: Unknown provider: $stateProvider from routerApp"
this js files have been loaded in the Html file.
**
var ...
0
votes
0answers
68 views
State.go in service angular
Can I use $state.go() inside a service in AngularJS?
I am trying to inject $state inside a factory service and trying to change the state. Is this possible?
Config:
.state('app', {
url: ...
0
votes
0answers
104 views
Share data between two ui-views inside a state in angularjs ui-router
I'm using angular-ui ui-router for a web-app. I have a state/view configuration like this:
...
.state('parentState', {
url:'/:id',
views: {
'main@parent': {
controller: ...
1
vote
1answer
138 views
AngularJS multiple ngApps each with its own ngRoute definitions, lazyloaded and bootstrapped on one page
My question comes from the need to lazy load different/separate ngApps on one page(bootstrapping them with angular.bootstrap), each of them using its own ngRoute definitions(defined in such a way that ...
0
votes
1answer
214 views
“ui-sref” does not refresh the “ui-view”(its controller does not rerun) when a link is clicked twice
When a state is clicked at first, the div that owns the "ui-view" attribute is replaced with the "template" of that state. However, when I click the same state again, its controller does not reloaded. ...
0
votes
1answer
43 views
Putting a “resolve” on an angular-ui-router view isn't working - the page simply doesn't render
$stateProvider
.state('root', {
url: '',
views: {
'root.base': { templateUrl: '/templates/root/root.html' },
'root.sidebar': {
templateUrl: '/templates/root/root-sidebar.html',
...
1
vote
0answers
168 views
Angular ui-router to accomplish a conditional view
I am asking a similar question to this question: UI Router conditional ui views?, but my situation is a little more complex and I cannot seem to get the provided answer to work.
Basically, I have a ...
0
votes
1answer
82 views
How to efficiently architect the AngularUI ui-router state machine?
I am very new to the new AngularUI ui-router library that allows us to create nested views using a state machine configuration service and am trying to figure out the best way to architect my states. ...
1
vote
1answer
145 views
UI Router fails to update URL in address bar after successful state change
I'm building a small Angular app and I'm currently using ui-router.
I've hit a problem which looks awfully like a bug in ui-router but I can't be sure as I'm not that familiar with this library. When ...
1
vote
3answers
53 views
Pass resolved objects into controllers defined by a string in angular-ui router
I have a set of objects that get resolved using
:resolve
I also have a controller that I define by passing it the name as a string but I need to pass in the resolved objects to it.
I know it ...
0
votes
3answers
303 views
Angular UI Router - Default Parameter
Is there anyway to specify a default parameter for every route using the Angular UI Router?
My app is entered through the context of another application by selecting a user and then navigating to ...
0
votes
2answers
161 views
Get stateParams on change without reload
I'm making an app using the angular ui router.
When navigating to a particular state, which always has parameters passed to it, I need to be able to change the url and update the parameters without ...
0
votes
1answer
39 views
ui-sref not working approperly
I have a very basic angularjs app, using ui-router. The stateProvider is defined as follows:
$stateProvider
.state 'home',
url: '/'
.state 'products',
abstract: true
url: ...
0
votes
0answers
165 views
Angular UI Router Regex State Matching
I've an infinite level accordion with a url structure like:
http:localhost/#/list
http:localhost/#/list/section-1/
http:localhost/#/list/section-1/content-bla
When /list/section-1/ is accessed I ...
0
votes
2answers
36 views
How can I override route in AngularUI Router?
Using AngularUI Router can I have a way in which more than one state matches the requested URL but the one which satisfies first kicks in.
I have 2 states catalog.category for catalog page and ...
0
votes
2answers
145 views
angular-ui router — inherited resolved dependencies for NAMED dependencies
Per the example in the documentation, child states will inherit resolved dependencies from parent states. Furthermore, you can have promises for parent dependencies be resolved before children are ...
1
vote
1answer
85 views
Doubly-nested views in UI Router
Playing around with angular-ui and specifically using the ui-router module to do some nested views. I'm having trouble getting a partial to render within a partial:
The nesting is as follows:
...
0
votes
1answer
104 views
AngularUI Router: pass url params to 'abstract' state while calling child state
I want to access the url parameter($stateParam) inside a abstract state while calling a child state. I am curious to know how that can be done. Code in plunker also
$stateProvider
...
1
vote
2answers
580 views
Angular ui-router get asynchronous data with resolve and promise/deferred
I've having a problem to get the resolve mechanism working in my application.
I separated the webservice call into an extra module and using deferred/promise to have callbacks.
Before showing the ...
2
votes
1answer
580 views
angular ui-router: how do I reload a state when a path parameter changes but not reload when a query parameter changes?
For example, I want this change in navigation to reload the state:
#/detail/1
#/detail/2
But I do not want this navigation to reload the state:
#/detail/1?search=blah
#/detail/1?search=huzzah
...
0
votes
2answers
82 views
ui.router changing state, but ui-view doesn't display anything?
Though the states are changing successfully, I can't get the ui-view to update:
HTML
<a ui-sref="promo.foo">Foo state</a>
<a ui-sref="promo.bar">Bar state</a>
<div ...
0
votes
2answers
143 views
Angular UI Router replace view on runtime
I'm trying to change a parent view template on runtime - inside a service.
My app config looks like:
$stateProvider
.state('base', {
abstract: true,
views: {
'header': {
...
2
votes
1answer
216 views
Handling trailing slashes in angularUI router
It's been hours since I started working on this problem and I can't seem to get my head around the solution.
I have an app that may result in users actually typing in the URL. In such cases it is not ...
1
vote
2answers
98 views
Hide Parent's sbling ui-view quadrant when in a child state
When I go to a child state, I want to hide a ui-view component of a quadrant ui-view in root state. How can achieve this.
##index.html
<div ui-view="a">
</div>
<div ui-view="b">
...
4
votes
1answer
244 views
Angularjs ui-router blocking access to non-state routes
I am using ui-router in an angular site I'm making, but cant get it to allow routes through to my server. I have facebook oauth authentication on my server, where I navigate to /auth/facebookand the ...
0
votes
0answers
28 views
Change the location address without causing state loading
I am using AngularJS 1.2+ and Angular UI Router.
I am trying to change the location address without causing a reload. I tried the following but it didn't work:
function setPath(stateName, ...
0
votes
1answer
932 views
Dynamically set the value of ui-sref Angularjs
I have searched for a similar question but the ones that came up seem slightly different.
I am trying to change the ui-sref='' of a link dynamically (this link points to the next section of a wizard ...
0
votes
1answer
252 views
AngularJS ui-bootstrap open modal window without changing the url
I am using the ui-bootstrap module in my AngularJS project. Before I open the modal the url looks like this : localhost:58890/#/Project/46. The code that opens it is here :
...
1
vote
1answer
115 views
How to retry route request on $stateNotFound event in AngularUI Router
I have a large AngularJS application which is split into different functional modules. It is currently bundled into single JavaScript file and thus all the modules are loaded on initial page load. I ...
1
vote
1answer
83 views
Get the “absolute” URL of a state in Angular-UI?
I am using Angular and Angular-UI ui-router. I have some states defined:
app.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('tabs', {
url: "/tab",
...
1
vote
1answer
62 views
angular ui-router multiple nested and controller data
What I'm trying to build:
A page with two nav bars, one for color, one for letter. Clicking the color button will change one view to represent that color. Clicking the letter will make a different ...
0
votes
0answers
48 views
isn't the absolute naming in angular-ui-router optional?
I have 3 templates like so
1.
<div ui-view="header"></div>
<div ui-view="body"></div>
2.
<p>hello from header</p>
3.
<p>hello from body</p>
...
1
vote
0answers
71 views
Angular UI-Router not displaying template
I have come across a very weird bug. My UI-Router is set up as follows with the ui-view element in the home template.
.state('main.home.one', {
url: '/',
templateUrl: 'partials/home/one',
...
0
votes
0answers
87 views
Only change one view with ui-router and AngularJS
Say you have a website that has 3 different routes, /news, /about, and /signup.
News and about are their own "pages", while signup is just an overlay that can be toggled on either /news or /about.
...
0
votes
0answers
41 views
Check privilegies in nested states
I've got problem, I do use angular ui-router for routing to check if user is logged in I have something like this:
$stateProvider.state('settings', {
abstract : true,
url : '/settings',
...