Tagged Questions
0
votes
0answers
12 views
On initial load of my app why is the ui-router state not set?
When I go to my app at https://localhost/my-app/resources/index.html, I have logic to go to my self-defined default state. However when I want to go directly to a specific part of my app (i.e. ...
0
votes
1answer
10 views
Ionic: Routing gives a blank page
im just starting to learn angular and ioninc to build an app.
I just started a new app with ionic included and made a list of items from a json file. This works perfect, but since im jump into ...
0
votes
2answers
26 views
Angular redirect to home on refresh
What's the best way to direct a user to the home page if they happen to refresh from any other route (or state if you're using ui-router, as I am).
For example - I want them to begin on the inventory ...
0
votes
1answer
44 views
Can I access the $state outside of the active controller in angularjs?
I am writing an Angularjs app (using ui-router) based on the Hot Towel template. The basic layout is a header area with navigation tabs and a dropdown list of users, and a content area below that.
...
0
votes
1answer
14 views
UI-route doesn't work with no console errors
i was implementing NgRoute, but somewhere in angularjs tutorials they introduce ui-route, i watch some video tutorials about this ui-route, i find it cool and more fluent than the mg-route, so i went ...
1
vote
1answer
32 views
Angular ng-repeat error
So my HTML is:
<div class="checkbox" ng-repeat="test in tests">
<a ui-sref="test{{id: test._id}}"><pre>{{test._id}}</pre></a>
</div>
My router config in ...
0
votes
0answers
8 views
AngularJS - selection popup
I'm using AngularJS for my web app and i'm looking for the way to open a popup page to select an address, and if the address down't exists to open add address page on same popup.
How should the states ...
0
votes
0answers
29 views
Angular UI-Router $urlRouterProvider .when not working *anymore*
Question: Why won't the .when() in my $urlRouterProvider work anymore?
I've picked up a fairly robust angular app. The most recent issue I've been trying to fix with it has been the 'user ...
0
votes
0answers
21 views
Renderidng nested view inside each elements in AngularJS ui.router
I have a list of items and want to render contents of each item in a particular child view. Something like bellow:
Item 1
Nested view of item 1
It will load here when click on Item 1
Item 2
...
1
vote
0answers
20 views
UI-Router modal changes existing views
I'm trying to use ui-router to trigger a modal for a certain state, rather than changing the entire view. To do this, I implemented a slightly adapted form of what is given in the FAQ, as I'm using ...
0
votes
1answer
24 views
Should the resolve map redirect to the 'otherwise' location during the first ui-router request?
I have found the resolve map incredibly useful. If I request a state change within a page, if any resolves fail the state will not conclude/succeed as expected.
I do not seem to be performing ...
2
votes
0answers
38 views
How should you handle major UI transitions when data changes?
My team and I are building a medium / large size AngularJS application and the controllers and views of a single page view can change dramatically depending on the data in 1 field:
if (order.state == ...
0
votes
2answers
32 views
Angular JS - Route to Non Single Page SPA
We need to load some pages in non SPA mode, while others in SPA mode. For example, homepage and about pages should be non SPA, while other pages should be SPA.
$locationProvider.html5Mode(true); ...
0
votes
1answer
39 views
Angular UI Router: keeping sibling views around on state change
I have a classic set-entity situation whereby the user chooses an item from a list and it is displayed in a view next to the list.
A typical way of implementing this with UI router would be to have ...
0
votes
0answers
16 views
Dynamically create parent states for nested states
I'm stuck with a big problem in my Angular JS APP where I'm creating a dashboard and it has to be available on every page seen with an overlay on current page.
For this I created a directive called ...
0
votes
0answers
19 views
ui-router transitionTo in a directive to manage 404 doesn't work
I thought to exploit a directive to manage
the 404 status.
Server express.js
// Assume 404 since no middleware responded
app.use(function(req, res) {
var assetmanager = ...
1
vote
1answer
16 views
ui-router. get state name from object/function
I wonder, is there any way to reference states in view with object or function?
Just to decouple views from states definition. E.g. if I change state name I don't have to change it everywhere in my ...
1
vote
1answer
40 views
AngularJS UI router: How to configure nested named views?
I have a configuration like below:
...
.state('profiles', {
abstract: true
, url : '/profiles'
, resolve: {...}
, views: {
mainModule: {
templateUrl : ...
0
votes
1answer
24 views
Incorrect context within $on in AngularJS
I'm attempting to handle http errors within AngularJS (using ui-router), but am losing the context of my run function in the following code.
bugtracker.run(['$rootScope', '$state', ...
0
votes
1answer
20 views
ui-router shows no default state url
Looking at the ui-router sample starting it I see that url:
http://angular-ui.github.io/ui-router/sample/#/
When I change the state:
.state("home", {
// Use a url of "/" to set a ...
0
votes
0answers
39 views
AngularJS UI Router - change url without reloading state
Currently our project using default $routeProvider, and i using this "hack", to change url without reloading page:
services.service('$locationEx', ['$location', '$route', '$rootScope', ...
0
votes
0answers
46 views
ui-router ng-repeat with dynamic named views
I wanting to dynamically load views into an accordion with ui-router. The thing is, when I generate the views by name inside ng-repeat I can't load the views at all.
I know that someone else asked a ...
0
votes
1answer
28 views
Resolve a promise array with Angular UI Router
I'm trying to resolve a promise array to things before hitting my controller:
resolve:{
things: function($q){
var promises = [];
var titles = [];
var thingRef = ['a1', 'a2', 'a3'];
...
4
votes
1answer
52 views
How do I prevent reload on named view, when state changes? AngularJS UI-Router
I'm using the excellent ui-router module in my application. As part of this, I'm using named views to manage the 'dynamic sub-navigation' I have in the app.
Consider the following:
...
0
votes
1answer
23 views
Angular Router UI Child Controller not Starting
In the route definition below if I go to #/systemadmin/edit/Testing it brings up the SystemAdminController but not the one defined in the child route I am using. I am missing something.
...
0
votes
0answers
23 views
ui-router issue of state not assign properly it works after refresh
I have used ui-router in my app.
Explaination of Issue: from init controller i have open bootstrap modal as form and after form saved its takes id of row inserted and redirect using $location.path ...
1
vote
1answer
33 views
Create a bogus state
How do you create a fake state, same as the current one? That's gonna give us two identical in the history, so when you click back you stay in the same one.
I tried this $state.go($state.current), no ...
0
votes
1answer
33 views
Rails + AngularJS app, what should the rails controllers respond with?
I'm a newbie in AngularJS, and I'm trying to build a Rails-Angular web app. I designed the app to have a main layout with header and footer, and nested layouts for each main section of the app. I'm ...
0
votes
1answer
21 views
$watchCollection on an array of js objects in an Angular Controller requires an anonymous function?
I have a simple js array being retrieved by an angular factory, injected into a control, watched, then displayed in a table using ng-repeat from within a view state managed by ui-router.
Initially I ...
1
vote
1answer
28 views
ui-router dynamic template path
I'm using ui-router 0.2.8. I'm wanting to load a template based on device width. I can get the device width without issue, set it in the scope etc but I can figure out how to bind it to $stateParams. ...
0
votes
1answer
56 views
Angular UI-router set website entry point. Redirect to home URL
I'm using Angular with UI-router and I want the user to always (or under most conditions, but for brevity we can say "always") enter the web app on step1, my home page.
UI-router config shorthand:
...
0
votes
1answer
19 views
Filter in ui-sref
I am trying to apply a filter on a parameter in my ui-sref reference.
<a ui-sref="item.show({ itemId: item.id, itemName: item.name | slugify })">
However, the above is not working. How to I ...
0
votes
0answers
22 views
angular ui-router browser compatability
Looked all over, but can't find spec on the Angular ui-router browser compatibility.
Does anybody know? Is IE9 supported?
1
vote
2answers
46 views
Dynamically constructed ui-sref attribute in ui-router
I am new to angular and especially ui-router.
Here is a link:
<a ui-sref="/topic/{{topic.id}}">SomeText</a>
The link is dynamically populated.
So when I try to access that state from ...
0
votes
1answer
27 views
How to get state data while resolving
I'm using ui-router for AngularJS.
I've defined some states like this.
$stateProvider.state(
{
name: 'home',
url: '^/?page&find',
...
0
votes
2answers
55 views
Declaring a master controller on a state with Angular UI router's $stateProvider
I've just started playing around with UI router, mainly because of the ability to declare nested states and named views.
Here is a simplified example of how I have configured a combination of the ...
0
votes
0answers
41 views
How to access ui-router $state.go inside angular factory?
I want to use $state.go inside a factory like this
App.factory('$exceptionHandler', ['$log', '$window', '$state', 'stacktraceService', function ($log, $window, $state, stacktraceService) {
// ...
0
votes
1answer
21 views
How can I get ui-router's ui-sref to point to a nested state?
How can I get ui-router ui-sref to point to a URL
Here's my link:
<a ui-sref="admin.overview"</a>
and my configuration
var admin = {
name: 'admin',
url: '/admin',
views: {
...
0
votes
1answer
21 views
ui-router display error page without ui-view
I am using ui-router with ui-view in my index.html page. I have defined states and all routes are working properly. Now I want to display an error page without showing header/Footer from index.html. ...
0
votes
1answer
132 views
Using ui-router in the ionic framework in AngularJS
I'm working on an app that uses the ionic framework. This in-turn uses the ui-router. Currently, I have a pretty basic two-page app. However, it will expand to be much larger. At this time, I get an ...
1
vote
2answers
72 views
Angular UI-Router sending root url to 404
I am having an infuriating issue regarding ui-router. Everything works as I want, where all bad urls are sent to the 404 state. However, even though my default state is correctly rendered when the url ...
1
vote
1answer
42 views
AngularJS, ui.router, load template and controller based on user role
I have developed a Single Page App that uses a REST api. Users are required to login to access the application. When a user logs in they are redirected to /dashboard. On this URL / route, I would like ...
1
vote
2answers
50 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
99 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
39 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, ...
0
votes
1answer
16 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
28 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
111 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
44 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
39 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 ...