Questions tagged [angular-ui-router]

UI-Router evolves the concept of an AngularJS Route into a more general concept of a State for managing complex application UI states. Most notably, it allows nested state/view hierarchies and multiple named views.

UI-Router

UI-Router is a routing module created by the Angular-UI team that replaces the built-in $route/$routeProvider in Angular.

Its most notable advantage is that it uses states which, while similar to routes, allow you to describe your application as a collection of states. A state being comprised of optional parameters, such as a url, template, controller and resolved dependencies. States can be nested (parent/child relationship), multiple views can be used in a single state, and urls can be appended or absolute.

A question that would be a good candidate for using the ui-router tag would:

  • Pertain to a project that is:
    • built on the AngularJS framework
    • using or is migrating to UI-Router (over $routeProvider and ng-view)
  • Not be easily answered by the UI-Router Github Wiki. Be sure to check the FAQ!
  • Show all the various files related to the issue. State configurations, Controllers, Templates, other.
10400 questions
3
votes
5 answers

override angular ui-router for links to page anchors

I have links to anchors on my page (a href="#idea"). ui-router obviously overrides them. Is there a way to use both in harmony? Thank you. https://gist.github.com/anonymous/2880f2f2c9f91b0b695f#file-gistfile1-txt
guyja
  • 857
  • 1
  • 10
  • 19
3
votes
1 answer

Why does second use of $state.transitionTo() cause "TypeError: Cannot read property '$$nextSibling' of null"?

It's the strangest thing, I found the code that does exactly what I want: using ui-router to change the displayed URL without reloading the page. This is it: $state.transitionTo($state.current, args, { location: true, inherit: false, notify:…
3
votes
1 answer

ionic - $state.go with params issue

I'm currently working on a mobile app using Ionic and building it with Phonegap. The problem I'm currently facing is related to $state.go with parameters. What happens is that I want to pass a group id as a parameter and when the new screen load, it…
Xavian Tracy
  • 127
  • 1
  • 10
3
votes
1 answer

What is the minimum needed to preserve angularjs ui-router states with sticky states from ui-router-extras?

I have a page which includes HTML form elements distributed on several tabs. I want the user to be able to switch tabs without loosing the data that he entered on the form elements (and I also want to save needless data reloads). And I still want to…
yankee
  • 38,872
  • 15
  • 103
  • 162
3
votes
1 answer

Angular JS: Async factory call issue

I'm new to angular and I'm creating a simple app. It navigates between projects, pulled in via JSON: http://plnkr.co/edit/FTfa1rcVaf85xTu65oSR?p=preview I am also using a factory, where I make a call such as get or getOne, so that it deals with the…
AlexKempton
  • 1,648
  • 15
  • 28
3
votes
1 answer

AngularJs: ui.router does not loading controller

I'l try to use AngularJs with ui.router, but have the trouble. This example have three states: index, template and template.show $stateProvider .state('/', { url: '', template: 'GoTo Template Index' }) …
3
votes
2 answers

$state.go, missing elements on page until refresh

I am building an app using Ionic & AngularJS and using states to manage the views. I have a side menu which is accessed by a nav button. When transitioning to my "home" page the menu is not visible until I refresh! In my side menu I use $state.go…
Joshua Ohana
  • 5,613
  • 12
  • 56
  • 112
3
votes
1 answer

How to design angularJS resource based authorization routing?

I'm building a blog system using angularJS, and now trying to build a resource authorization flow that is simple to use for certain resources. For example, I have the following states PROPOSALITEM, PROPOSALITEM.VIEW and PROPOSALITEM.EDIT.…
Huang Yen-Chieh
  • 635
  • 2
  • 11
  • 24
3
votes
4 answers

creating nested list in the ionic for mobile app

I am developing the mobile app. I want to create a nested list. Can anyone help me out. For e.g. On my first page list is: Food, Beverages. Clicking on food I want to display L1,L2,L3 etc. How can I achieve that?
Vipul
  • 58
  • 1
  • 2
  • 8
3
votes
4 answers

How to store and retrieve search parameters in angularjs?

I have an Angular app where I sometimes want to: Store the currently entered form variables for the currently shown page. This can be search terms or other user input. If the user goes back in history, make sure the same search parameters are used…
3
votes
2 answers

$location.search() not working

Update2: $location just for ng. so $location.search is ng's search it parse url from mark like # or #! . but $window.location handle the brower url in my question, first url's ng search is empty and second url's ng search is {code & state} is it…
GeminiYellow
  • 1,016
  • 2
  • 12
  • 34
3
votes
1 answer

How can I access a service in a ui-router resolve?

I have an Angular Application app.js : var app; app = angular.module('app', [ 'exam', 'ui.router' ]) .controller('appController', AppController) .service('examService', ExamService)); and I have a config file: var…
Alan2
  • 23,493
  • 79
  • 256
  • 450
3
votes
1 answer

UI-ROUTER - stop ui-sref from changing state

Does anyone knows a way to stop ui-sref from reloading a state? I cant do it from '$stateChangeStart' event because the ui-sref is only changing the params and not the state name. I have a book list on the left and book details on the left. I am…
einav
  • 599
  • 3
  • 8
  • 15
3
votes
1 answer

Calling a function while angular gives error 'net::ERR_INTERNET_DISCONNECTED'

When I loose net connection and try to load a HTML template(which is not loaded previously) using angularJS it gives me error, net::ERR_INTERNET_DISCONNECTED. Is there any way to call a function before angular fires error…
Aditya Ponkshe
  • 3,840
  • 4
  • 39
  • 58
3
votes
2 answers

How to create User-friendly and SEO friendly URL in AngularJs

We are working on website where we using AngularJs. Is there any way to make AngularJs user-friendly urls and seo-friendly urls Want application/#user/add to application/User/Add In AngularJs. HTML 5 mode convert hash based urls into Query string…
virender
  • 4,539
  • 5
  • 27
  • 31
1 2 3
99
100