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
9 views
Confusion on State Provider in coffeescript/javascript
New to Angular/Javascript:
I'm trying to remove an old coffeescript file (rent-roll.coffee) and replace it with rent-roll.js but am having an issue with the routing/state provider.
The existing ...
0
votes
2answers
11 views
How to load/render nested UI-Views in UI-Router
I have an application with one page called index.html. This page is the main page inside the application which I load my partials into.
Here is my Index.html:
<body>
<!--<div id="...
0
votes
1answer
12 views
UI Router inside promise redirection
This is my login controller:
export class LoginCtrl {
// tslint:disable-next-line:no-empty
constructor(
protected $http: ng.IHttpService,
protected $state: ng.ui.IStateService)...
0
votes
0answers
15 views
How can I pass an existing controller to a state with specific args for injecting if I need to pass it like a string, not a function?
I've implemented my controller like this:
angular
.module(appSettings.appName)
.controller('someCtrl', function (objectFromResolve) {
var vm = this;
vm.serviceName = ...
52
votes
5answers
77k views
Could not resolve '…' from state ''
This is first time i am trying to use ui-router.
Here is my app.js
angular.module('myApp', ['ionic'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory ...
0
votes
0answers
9 views
Implement google analytics in angularJS1.5 app
I have an angularjs1.5 app and it is using ui-router for state change.Recently, I got the requirement to implement google analytics in our app. I never worked on google analytics before.So, I started ...
0
votes
4answers
27 views
Get querystring in ui-router
I have the following URL http://localhost:81/#/payment/confirmed/success=0&invoiceid=42828852E9FFE2923CB6?useraction=canceled and I want to get the value of the querystrings after ? how can I do ...
0
votes
0answers
27 views
how to get one component from another module angular2
In angular 2 how to import specific component from other module
In home.module.ts appComponent i need exports and import to other module tranfer.module.ts
After import homeModule when click tranfer ...
2
votes
2answers
89 views
+50
ui-router: Transform parameter from URL
Is there any possibility to transparently transform URL parameters? As it's kind of difficult to explain, I will give a scenario. We have a URL structure similar to this one:
/shopping/nuts/:...
0
votes
1answer
10 views
Misbehaviour on routes with Laravel 5.3 and AngularJS 1.5
I try to create an app with Laravel 5.3 and AngularJS. I want to use the routes and templates from Angular instead of Laravel.
Here is the web.php file from Laravel:
Route::get('/', function () {
...
0
votes
0answers
34 views
Is there a better way to structure filter & results with UI-router?
I need to put together a filter and results page.
I'm using UI-router in the project, and trying to find the best structure for this page.
I have a slight difference to a typical filter and results ...
0
votes
0answers
15 views
angularjs window.open calling child state issue
I have created nested view using angular router. 'home' state having two child states 'home.list' and 'home.details'. Both child states having two stateparams (but different). I am using window.open ...
0
votes
1answer
20 views
Angularjs ui-router: Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:Error: State 'frameworks'' is already defined
My application is failing with the error in the title. This error is occurring when I define too many states for my ui-router. Previously when I posted this problem I was told that this is the same ...
1
vote
2answers
22 views
Angular UI Router - Prevent re-running of parent state when switching between children
I currently have a state hierarchy in my application like so;
- module_base
- page_base
- tab_one
- tab_two
- tab_three
The page_base state is abstract and has a ...
0
votes
1answer
13 views
Error:Could not route into another page in ionic
I can't navigate to it another template
its shows me error above
and i also tried ui-sref to go signup templete
Here My Starter app Structure--
I have templates of
Login.html
Signup.html
dash....
1
vote
0answers
24 views
Angular-ui router nested sub sub state
Using angular-ui router with lazyload on Angular 1.5:
My JS code is like:
$stateProvider
.state('app', {
url: "/",
views: {
'@': {
...
1
vote
1answer
29 views
Transition to a New URL State Without Reload
I'm using Angular UI Router 1.0.0-beta.1. Trying to transition from a state like /myroute/new to /myroute/5. Since the state with the id of 5 is very similar to the new state, I'd like to not reset ...
1
vote
0answers
38 views
Angular2 : Multiple Router-Outlets & Router-Outlets Inside Child Route
I have created an application containing a left-navigation (containing "User Management", "Vehicle Management" and "Administration").
The routing to go to the respective Components currently works as ...
11
votes
6answers
20k views
Angular UI router handling 404s
I have an app with a service which wraps my API calls:
var ConcernService = {
...
get: function (items_url, objId) {
var defer = $q.defer();
$http({method: 'GET',
...
0
votes
0answers
19 views
Angular.js can't focus after state changed
Our UI is a little buggy. When we load the page the first time everything works perfectly. When we switch - in our case restaurants - the model is update and we can't focus the input fields. Any idea ...
0
votes
1answer
17 views
Switching ui-router states when clicking or scrolling to page sections
I have a huge page with four sections that is intended to be used as "single page checkout" for the shop.
[Header]
...
[Section 1: delivery address form]
[Section 2: payment address form ]
[Section ...
1
vote
1answer
397 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 a java application with context kiosk-ui so the url is: http://localhost:8080/kiosk-ui.
The client side ...
0
votes
1answer
37 views
Hiding navbar based on current path with AngularJS ($scope vs. controller as syntax)
I'm working with the Inspinia Admin Theme (AngularJS Version) and have the following Problem.
I'm trying to show or hide the navbar based on the current path. The Problem with my first approach (...
0
votes
1answer
15 views
From run block can i able to call angular scope function inside another controller instead of $rootscope
I need to call angular Scope function inside some controller from runblock. can i able to call the function or else need to use rootScope or $scope.apply.
First method:
myAPP.run(function ($...
-1
votes
1answer
12 views
Angular - show loading icon depends on $http.pendingRequests
I'm working on loading icon which ideally I would be able to display it whenever $http.pendingRequests is not equal to zero and also old state is not equal to new one (I use Angular Ui-Router). Here ...
0
votes
3answers
24 views
Angular JS <a href> route back to LogIn
I've placed a below link in my code
<a href="/#/list/' + data._id + '" class="btn btnprimary1" > LIST </a>
It should routed to below point
.state('index.list', {
url: '/...
0
votes
0answers
21 views
modal should remain same but content should only change on actions - bootstrap & AngularJS using UIRouter
I have a Signup link in menu. When I click on that popup modal should open for some links (Signup using Facebook, Signup using Google, Signup using Email)
When I click on Signup using Email, popup ...
0
votes
0answers
13 views
Fail to load files using karma-jasmine for ui-router testing
I am trying to use karma/jasmine for unit test, but it fails when I run karma start. Here are my codes:
app.js
angular
.module('app', [
'ui.bootstrap',
'ui.router',
'oc.lazyLoad'
])
.run(...
1
vote
0answers
183 views
Angular ui-router loads neither template nor controller?
I use ui-router for moving between pages, without reloading.
Here is one of my states:
$locationProvider.html5Mode({enabled: true, requireBase: false});
$stateProvider
.state('aboutBook', {
url: '...
0
votes
0answers
7 views
Angular ui router onEnterChild?
I have abstract route "registration" that has a lot of child routes. I want to call a method when some of the child routes is called.
At the moment i am detecting this in the stateChangeStart event
$...
2
votes
2answers
1k views
How to preserve ui-router parameters on browser refresh
am using angular ui-router to manage states of my SPA.
I have this route:
.state('index.administration.security.roleEdit', {
url: '/roleEdit',
templateUrl: 'app/...
0
votes
1answer
8 views
Angular-breadcrumb: label/parent relationship
I am trying to use ncy-breadcrumb in my application but I don't know how to solve one particular case.
First of all I have these 2 states:
{
state: 'installation-edit',
config: {
...
1
vote
1answer
28 views
How to change the path from custom directive? Angular
I have the following directive which is a button and trying to change the path when clicking on the button but nothing happens.
app.directive('searchAgainButton', function ($location) {
return {
...
0
votes
2answers
27 views
angularJS multiple Master pages based on Role
The requirement of the application is to show different options based on the Role of the user. Like
If role is Admin , the after logging in , the user needs to be shown a master page which has link ...
-1
votes
1answer
16 views
Duplicate controllers, templates because domain models are almost the same [on hold]
I am new to Angular and I need to make single page application with Angular and Typescript. It is small application with 2 views (movies and tv shows), and I have just 2 two main domain models. So I ...
0
votes
0answers
219 views
AngularJS and prevent to encoding url
The problem is that angular encodes url as default when you use special characters like [ ] { }
I would like to know how I can prevent browser to encode url like below address:
http://www.hepsiburada....
0
votes
0answers
14 views
Angular ui-router catch onBefore event when navigating to external site
catching onBefore events is all and well with $transitions.onBefore(), but it does not work when navigating to some external website, is there an alternative for catching that kind of event too?
0
votes
1answer
51 views
UI-Router Child State For Multiple Parent States
I have a project that requires parent routes that are separated, in order to isolate URLs, controllers and API calls.
/boardgames/:id/review/
/boardgames/:id/setup/
The issue I am trying to solve is ...
0
votes
0answers
19 views
Legacy Meteor Methods angular2 UI Router Issue
https://github.com/faizmh/meteor_angular2_router_issues
I am trying to navigate from home page to market page.
In home page, I tried different variations to transition to market page
My target ...
57
votes
11answers
83k views
Clear History and Reload Page on Login/Logout Using Ionic Framework
I am new to mobile application development with Ionic. On login and logout I need to reload the page, in order to refresh the data, however, $state.go('mainPage') takes the user back to the view ...
0
votes
0answers
13 views
UI Router stateParams JSON path
I'm trying to access a specific article by ID from a JSON file in order to display the article details.
However, I get the following error:
GET http://127.0.0.1:4000/data/inventory.json1 404 (...
0
votes
0answers
29 views
UI-Router ui-sref to current state with new parameter
I have an app that has a location setting which when changed updates currency/ language etc.. This is visible on every page as it's in my parent state. When the location is changed using the below ...
1
vote
2answers
25 views
Passing params into angular directive controller
I have a controller which has some custom UI router resolve params injected:
uxgroups.controller('UXGroupStepCtrl', ['$scope', '$rootScope', '$stateParams', 'stepData', function ($scope, $rootScope, $...
0
votes
1answer
50 views
How to test Angularjs route's resolve value on component?
I'm using [email protected] and resolve some resource at the route level for one of my component. The component works as expected but my test fails now.
Error
PhantomJS 2.1.1 (Linux 0.0.0) module ag....
0
votes
3answers
25 views
Components aren't being injected into my ui-view
I'm just trying to setup a boilerplate for angular 1.5.9 with UI Router 1.0.0. I can display my parent state component within the ui-view, however when I nest states within my parent, my components ...
0
votes
2answers
25 views
Angularjs- how to check child form validity in parent form
I have used ui.router with nested ui-views and I want to check the inner form validity to enable common button used for multiple nested views.
Please help me out
7
votes
4answers
6k views
angular-ui-router: resolve on root state
As far as I understand ui.router
You have $stateProvider
in it you can write $stateProvider.state()
you can write
.state('account', {
url: '/account',
template: '<ui-view/&...
33
votes
6answers
28k views
Angular UI-Router How to create a “layout” state?
Given an HTML file like so:
<html>
<header ui-view="header"></header>
<div class="main" ui-view></div>
<footer ui-view="footer"></footer>
</html>
How ...
-1
votes
0answers
16 views
Error using resolve with UI Router => angular.js:13920 Error: [$injector:unpr] Unknown provider: simpleObjProvider<- simpleObj<- EnrichingController
I am trying to use ui router with resolve and it is showing the error message :
This is app.js
var app = angular
.module('CoreServiceApp', ['pasvaz.bindonce','ui.router','ngResource','...
0
votes
0answers
24 views
Detect that URL has been changed by ui-router, not by user?
I have a SPA angularjs application and have tabs within the application. Every click on the tab has different URL. But every time the URL changes, the page has to do something. I have to separate the ...