Tagged Questions
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.
0
votes
1answer
12 views
UI-Router $state.includes() not returning true for child states
I have the following states (small snippet of all states):
.state('reports', {
abstract: true,
url: '/reports',
template: '<ui-view/>'
})
.state('reports....
0
votes
0answers
8 views
Scope inheritance with nested states inside of Angualr 1's Components
I'm having difficult getting the controller to link up to nested states within Angular components.
For example, I have the following parent component:
export default {
restrict: 'E',
bindings: ...
0
votes
0answers
12 views
(Angular) Simple nested views not working
I'm studying Angular, and I'm stuck with ui-router.
Here is the code. I'm using PUG & Livescript, I doubt that I'm having issue because of these two.
My codes are similar to some answers here in ...
1
vote
2answers
26 views
Angular Routes are not working
app.js I am trying to setup routes here but It is not working and I have no idea why its not working , kindly look into this issue.When I click on page1 the url should be /employees but it takes ...
1
vote
0answers
11 views
How to get ui-router state parameters from resolved data in angularjs
How do I get parameters for a state from a service?
I have this state:
.state('cashbox.list', {
title: 'Cashbox',
url: '/:from/:to?q',
templateUrl: '/cashbox_list.html',
...
0
votes
1answer
21 views
How to test controller with template provided by state from ui-router
Configuration for ui router:
$stateProvider
.state('search', {
url: '/search',
views: {
content: {
templateUrl: 'scripts/search/search-...
0
votes
2answers
20 views
ng-bind-html not working inside ui-view
I am developing an angular app with angular 1.4 and ui.router 0.2.8. I am using ng-bind-html to print error messages while form validation.But it is not working.
In my controller
$scope.nameError = $...
0
votes
0answers
10 views
How to use $stateParameters in template in angular ui-router?
In the following state, I would like to use the parameter (ref) directly in the template attribute of my view 'news':
.state('home', {
url: '/home/:ref?:advanced',
views: {
...
0
votes
0answers
17 views
ui-router $q resolve causes infdig
When I try to use resolve in a ui router state with an angular service that uses $q for creating a promise I get a $rootscope infdig error ([$rootScope:infdig] http://errors.angularjs.org/1.5.8/$...
0
votes
0answers
23 views
angular 1.x ui-router can't navigate to routes other than default
I have an angular 1.5 app with ui-router.
i have configured the router like this:
$stateProvider
.state('home', {
url: '/home',
controller: 'HomeController',
...
0
votes
0answers
21 views
Angular Routes From Video Tutorial with Infinite $digest Loop
I watched bad Angular tutorial.
plunker
It contains example with 2 states: login and users. This example doesn't work.
We have 2 states. And 1 directive for each state.
Also we have AuthService ...
0
votes
1answer
11 views
Dependency injection into onEnter callbacks for state changes with ui-router
When using ui-router in Angular JS, what dependencies can be injected into onEnter callbacks? Specifically, I want to use the $http service and a constant defined in the parent module. The code I am ...
0
votes
1answer
15 views
button didn't trigger modal when using ui-routing
I'm trying to create angular modal wizard using ui-routing. Inside my modal window I got two nested views which should be responsible for navigation inside the modal window by ui-sref directive. ...
1
vote
1answer
41 views
Shared Service, Component communication Angular 2
I have recently started to develop with Angular 2. Now I am just playing with a test project, not real application to get better understanding.
And I have a lot of questions and misunderstandings ...
0
votes
1answer
39 views
Issue with controller
<body ng-controller="addressbookController">
<div class="header">
<h3>Address Book</h3>
</div>
<div class="nav-bar">
<ul>
...
1
vote
1answer
14 views
AngularJS ui-sref not working in navbar dropdown Bootstrap on mobile
Using UI-Router for Angular and Bootstrap for a navbar I'm trying to turn anchor inside dropdown clickable on but isn't working on mobile. I saw ui-sref not working in bootstrap dropdown and the ...
1
vote
1answer
47 views
Error: Cannot match any routes. URL Segment:
I am trying to follow this tutorial http://onehungrymind.com/named-router-outlets-in-angular-2/ but I am getting the error.
EXCEPTION: Uncaught (in promise): Error: Cannot match any routes. URL
...
1
vote
1answer
22 views
angular-ui-router Multiple Views
I'm new to use angular-ui-router, I has a index.html and javascript like this:
var mainApp = angular.module('mainApp',['ui.router']);
mainApp.config(['$stateProvider', '$urlRouterProvider','$...
0
votes
1answer
25 views
Is it possible to reload only a view inside a state in AngularJS?
my problem is that I have two different views inside a AngularJS state, as seen beneath:
$stateProvider.state('root.base.persons', {
url : 'persons/:id',
views : {
'level-1@root' : {
...
2
votes
0answers
54 views
+200
How to pass $state variable into 2 other sibling $states?
Plnkr: https://plnkr.co/edit/Brmcxd2LjGVJ6DXwuJtF?p=preview
Architecture:
$login -> $container (contains $dashboard and $feed), dashboard contains: $tickers, $tags, $viewHeader and $socialMedia ...
3
votes
2answers
36 views
How to send object from 1 $state into another $state with ui-router
https://plnkr.co/edit/nqyBTcBgBimjkrpf2oYo?p=preview
Expected
After Login Selecting a Ticker button should make the Tags module display the matching Tags for that Ticker.
Results
After Login ...
0
votes
1answer
14 views
Angular stateParams without url
I want to navigate from one url /projects to url /projects/{name} , but I need to resolve resource by $stateParams.id. How can I do it?
Now I have something like this:
$stateProvider.state('project....
0
votes
0answers
12 views
Redirect : resolve vs onEnter
I want to redirect the user if some conditions aren't right. (typically when he's not connected).
I have 2 solutions to redirect the user found on stackoverflow or ui-router wiki. But i don't ...
0
votes
0answers
20 views
Angular2 - Change menu in parent Component from child inside router-outlet
I have menu and secondary menu component. I would like to change items in secondary menu based on component I displayed in router-outlet tag.
My menu navigation has multiple levels (classic tree), but ...
-1
votes
1answer
12 views
AnagularJS Component - UI-roter - parent child comunication
I have problem with setting comunication between AngularJS Components with ui-router.
Here is an UI-router configuration example:
$stateProvider.state('parent', {
abstract: true,
template: '&...
0
votes
0answers
15 views
change state in ui router during content loading
I have a scenario in which directives rendered in ng-repeat, and from directive I have to send request on server(node).So If I have 40 items so 40 request goes to server and loads their data. But ...
1
vote
0answers
23 views
$window.scrollTo(0,0) stop working completely with no reason. Any ideas?
I have a web app using AngularJS and ui-router for routing. I have been using $window.scrollTo(0,0); to scroll top to each view changes. It had been working normally. Now it suddenly stops working and ...
0
votes
1answer
23 views
How long should a route be in an application? My route is getting longer
I am building a large scale application. and I was wondering how long a route should be? or what is recommended? My longest route is:
http://localhost:3000/#/mc/accessories/watches/wa/mens watches
...
1
vote
1answer
25 views
How to prevent specific $state from refreshing when another $state updates
https://plnkr.co/edit/bOZW1a9u62W1QA6cYjYj?p=preview
Expected
After Login all $states initialize, then after clicking a Ticker button, the only $states that should re-init are ticker, tags and ...
2
votes
0answers
26 views
Modal view inside ui-view not working
I amm trying to implement a modal window inside a ui-view. All was working fine when the modal template and controller were inside the ui-view, but after separating them in separate folder they don't ...
1
vote
2answers
17 views
Sub view for $state not rendering in named ui-view
https://plnkr.co/edit/VV13ty8XaQ20tdqibmFy?p=preview
Expected
After login the dashboard state renders dashboard.html, and all components and ui-views should render: tickers, tags, social(named ui-...
0
votes
0answers
11 views
Pass a Parameter to UI-Router From Constructor
It seems everywhere I search it is mostly about people passing parameters TO the Constructor from the UI-Router. But not really any information for passing parameters TO the UI-Router from the ...
0
votes
1answer
20 views
Module sub views not rendering in ui-views of component template
Full Plnkr code: https://plnkr.co/edit/5A5YFEWZ7ZTzRJloxgka?p=preview
Expected
The Tags title sub view's template should render in the Tags list.
The Tags counter sub view template should render in ...
1
vote
2answers
28 views
ui-view for 1 module duplicating content from another module
https://plnkr.co/edit/n2RANdhtRYIGQURVIElY?p=preview
Expected
After login, when you click Count the red number should change in the Tags list and match the number in the Tickers list, but nothing ...
0
votes
1answer
13 views
angularjs ui-router: redirect vs multiple url for same state
When I navigate first to my index page where the url is '/', I want to display the content of the state '/matches'. What you think is better?
I can use
$urlRouterProvider.otherwise('/matches');
...
0
votes
0answers
17 views
Angular JS IE 9 TypeError: Object expected
I have a weird bug in one application I'm working on.
The application itself transitions between states and display modals.
One state works when you go to it directly via browser URL, but if you ...
3
votes
1answer
30 views
Controller not registering when using nested view
My app was working fine until I changed routing from ngRoute to ui-Router so I could use power of views within views. Now the controllers of the views are not being registered. My folder structure is ...
0
votes
1answer
20 views
ui-router set params from resolve
Hi I wondering is it possible set param in ui-router data which from resolve. This example doesen't work, what's wrong ?
resolve : {
userItem : [function () {
...
0
votes
0answers
22 views
Conditional routing in to the Angular appliaction
I have an existing Angular App using ui.router wherein multiple states are being internally called from one another. The initial state is directed using $urlRouterProvider as :
$urlRouterProvider....
-1
votes
1answer
30 views
Puikinsh/gentelella admin dashboard with ui-router in angularjs
I am working in an angular project which uses puikinsh/gentelella
admin dashboard.When I use the ui.router the template's custom.min.js not working properly.
Which shows JQuery error : Dom elements ...
0
votes
1answer
27 views
$scope.$on not listening after browser refresh
I am using angular ui-router.
I have the following structure :
state a controller parentA
state a.b Controller childB
I have a resolved on state a.b that broadcast event 'event1' and I have a ...
0
votes
3answers
38 views
Partial Layout in Angular JS with new latest routes
/// <reference path="Scripts/angular.js" />
var myApp = angular.module("myModule", ["ngRoute"])
.config(function ($routeProvider) {
$routeProvider
...
1
vote
2answers
33 views
Update $state variable in 1 module from another
https://plnkr.co/edit/PWuKuVw9Dn9UJy6l8hZv?p=preview
I have 3 modules, routerApp, tickers and tags. Basically trying to rebuild my app out of smaller mini-apps.
The routerApp template contains the 2 ...
0
votes
1answer
26 views
Angular 1 uiRouter how to get full path with url query?
I'm trying to get the url path with it's current url queries using uiRouter.
What I want to achieve is something similar to:
window.location.pathname + window.location.search
How would one achieve ...
1
vote
1answer
17 views
Angular 2: Router Tree is not load correctly in complex module architecture
I have a complex module architecture to separate domains in my Angular2 application.
Well, I follow a Routing architecure in tour of heroes tutorial wich each module has the own app-routing.module to ...
0
votes
1answer
14 views
Check whether ui-state has forward ui-state
I think it is a simple question but could not find on google. I am using angular 1.5 and ui-router 1.5. How do I check if current ui-view state had next ui-state? (This is required because I want to ...
0
votes
1answer
22 views
How to navigate from a login state to an abstract dashboard state?
https://plnkr.co/edit/ByatrCzdUJfAV3oc8XPq?p=preview
^ On line 10, if you put back in the abstract:true key you will see the tags view appear in this plnkr app.
However my problem is that in my real ...
0
votes
1answer
22 views
Lazyloading states with new ui-router 1.0.0-rc.1
I was trying to upgrade to ui-router 1.0.0-rc.1 , in a gulp webpack setup . I am not able to figure out how to achieve loading states from server and registering future states for it .
What i am ...
0
votes
0answers
27 views
Angular UI-Router Not Changing Title
I have code and I am trying to figure out the best way to have pages with their own title. Currently in the index.html it sets the title and somehow every page auto-inherits the title.
index.html ...
0
votes
1answer
25 views
UI-Router doesnt working as expected(NESTED VIEWS!)
I am trying to use ui-router on my current project. But somehow, when it comes to nested view(i think i wrote it proper and correct) it doesnt showing content of views.. Let me show you my code..
....