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
0answers
9 views
How to display sidebar content using angular ui-router?
On home page i have sidebar and Main content , when i click on sidebar items i want to display sidebar content to right side where i have Main content. I want fixed sidebar on all the pages only main ...
1
vote
0answers
12 views
Angular NG6 IE assignment to read only properties is not allowed in strict mode
View IE console Error
keep getting this error in IE and Mac safari and iOS devices.
in pageheader it only display {{$ctrl.title}} not the value, any idea about this?
Games.js
import angular from '...
0
votes
1answer
15 views
AngularJS UI-Router “otherwise” state not loading
My index.html page has 3 views:
<header ui-view="header"></header>
<main ui-view="content"></main>
<footer ui-view="footer"></footer>
I just changed the site to ...
0
votes
0answers
17 views
Cannot find module at webpackEmptyContext when change route
I have multi angular application. ui-router in angular 1 used required to get html template and controller. Now after bootstrapping with UpgradeModule when i use require or System.import when try to ...
1
vote
1answer
16 views
ng:btstrpd err App Already Bootstrapped with this Element?
It's entirely possible I'm doing something stupid ...
Full stack trace of the Error
Error: [ng:btstrpd] App Already Bootstrapped with this Element < html class="js flexbox flexboxlegacy canvas ...
0
votes
1answer
36 views
Authentication on route change
I want Angular to check for authentication at every route change. My code looks like this.
config.js
angular.module('message').run(['$rootScope', '$location', 'Auth', function ($rootScope, $location,...
0
votes
1answer
23 views
Nested Angular ui routers throw exception
I've got this error when clicking on ui-sref="favorite-list":
Could not resolve 'favorite-list' from state 'studies'
I have code like this:
$stateProvider
.state('study', {
...
0
votes
1answer
9 views
Ionic UI Router not working for child view
I'm trying to create a very simple lookbook application. Yet I can't seem to get the routes to work. I tried the answer to this question to debug the routes. Nothing appeared in the console.
I'm ...
0
votes
0answers
27 views
Angular-ui-router version 1.x - problems implementing - need syntax for require command
I have been trying to upgrade to latest version 1.x of angular-ui-router. I need this version as it provides better support for components and a path to an Angular 2 upgrade.
Multiple attempts to ...
0
votes
0answers
11 views
UI-router: Scroll to top page on statechange in Internet explorer scrolls to top before next view loads
In our angular application we want to scroll to the top of the page when a user navigates between pages.
Unfortunately, not much was happening when we added the autoscroll attribute to our ui-view ...
0
votes
1answer
29 views
How to prevent state change in AngularJS 1.6 with ui-router 1.0?
How can we use $transitions to cancel a state change to prompt the user for saving? Previous ui-router versions used to have an event in the callback, and could be stopped with event.preventDefault(), ...
4
votes
0answers
26 views
How do I configure Java EE running on GAE to work with Angular UI Router in html5Mode?
I am attempting to set the UI Router location provider html5Mode to true for my Angular application: locationProvider.html5Mode(true). While this works client side (appropriately redirects) I am ...
0
votes
0answers
19 views
Best process to make a state of ui-router from a page
I have created a working web page page.html, which loads page.css and page.js in the header:
<script src="page.js"></script>
<link href="page.css" rel="stylesheet" type="text/css" />...
1
vote
1answer
13 views
Angular ui.router, any result and any error
I have a little problem with my views in angular. I try to use ui.router to config my routes but it doesn't work. I try to use the console but it's clear. I don't know what i can do fix this problem.
...
0
votes
1answer
9 views
Child states not rendering with parent state in Ionic V-1
enter image description hereI'm new to Ionic v-1. I tried implementing navigation using parent-child relationship. The parent state is "tab" while the active child state is "home". When I load the app,...
0
votes
1answer
37 views
Ui-router not generating templates having checked all options
I'm trying to use a ui-router in Angular to generate a single page with multiple templates in <ui-view></ui-view> but it is unable to load a single template. It just gives a blank page ...
0
votes
1answer
26 views
Angular $rootScope.on('$stateChangeStart') is not working
I use this to create my website and when i created a run method with $rootScope.on('$stateChangeStart') in it and isn't working.Here is the code:
.run('Url',function($rootScope, $state, $location){
...
0
votes
0answers
15 views
EJS,express, ui-router and angularjs how do they work together?
If i have an angularjs project in project1 then a public folder with index.ejs as the main html how would i set it up in the server.js outside the public folder?
how do I make public/index.ejs as a ...
0
votes
1answer
24 views
My declared state is not being picked up?
I have this code and every time I typed "localhost:3000/page1" nothing happens i get cannot get /page1, this is the code..
var module = angular.module('ngFirstApp',['ui.router']);
module.config(...
0
votes
1answer
28 views
Ui router not working?
My simple router doesnt seem to work, here is my app.js
var module = angular.module('ngFirstApp',['ui.router']);
module.config(function($stateProvider, $urlRouterProvider) {
$stateProvider....
0
votes
0answers
27 views
AngularJS ui-router inserts route in every page
I have two pages
http://localhost/page1 which contains ng-app="appOne" in header and ng-app="appTwo" in the body. appTwo uses ui-router to pull forms to enable a multi-step form and displays the ...
1
vote
1answer
39 views
Redirecting state: null is not an object (evaluating 'name')
When a user enters the state cloud, it checks if a current variable is found, and if it isn't, it redirects them to a different state. But for some reason, I get the following error on the redirect.
...
0
votes
0answers
16 views
How to pass ng-repeat object attribute to nycBreadcrumb label?
I'm using ngRouter with nycBreadcrumbs to pass a GUID to another view. The GUID is applied to the resolved URL, but not to the label attribute of the breadcrumb (where the title of the page and ...
1
vote
1answer
18 views
angular-ui-router share states
So I have a few states set up like this:
$stateProvider.state('accounts', {
url: "/accounts",
templateUrl: 'tpl/accounts/index.html',
}).state('accounts.view', {
url: "/{accountNumber:[A-...
1
vote
2answers
20 views
angular-ui-router and regular expressions for parameters
I am trying to fix an issue with routing getting confused by introducing regular expression to match my route parameters.
The path needs to be something like:
/accounts/MER005
or
/accounts/...
0
votes
1answer
41 views
Load variable in angularJS before before javascript html
I am trying to load a graph in AmCharts.
The problem is that the JavaScript script is loaded before I get the service return, it starts empty and I can not update the variable.
Any idea how to do ...
0
votes
1answer
25 views
angularjs ui-router persistant page elements
I am trying to get my head around angularjs and ui-router at the moment, my application is split into 3 layouts basically (Marketing Layout, Authentication Layout & Application Layout). I am ...
0
votes
2answers
28 views
Angular2 - Calling function 'UIRouterModule', function calls are not supported
I'm new in Angular2.
This error I'm getting when I import UIRouterModule, referring this
ERROR in Error encountered resolving symbol values statically. Calling function 'UIRouterModule', function ...
0
votes
1answer
24 views
ui-router issue with stateParams and routing
So i have 2 routes set up:
$stateProvider.state('accounts', {
abstract: 'true',
url: "/accounts",
template: '<div ui-view></div>'
}).state('accounts.view', {
url: "/:...
0
votes
1answer
13 views
UI-router. Dynamically replace root state's template
I have a root state app which defines master template. I have a need of switching this template with a different one for a certain route:
app.run(($rootScope, $state) => {
$rootScope.$on('$...
1
vote
1answer
22 views
ui-router Dependency included still getting the error[$injector:unpr] Unknown provider: $stateProvider
I am actually trying to use $stateProvider routing but it gives the error; Uncaught Error: [$injector:modulerr] Failed to instantiate module moduleTry due to:
Error: [$injector:unpr] Unknown provider: ...
1
vote
0answers
20 views
Reload not working when passing multiple params in ui-router state
I am using ui-router with parent and child states. My states are defined as below :
.state("home.ben", {
url: "/beneficiary/:name",
abstract:true,
templateUrl: "app/ben/views/ben-form....
1
vote
5answers
44 views
Angular.js UI-Router templates are not loading
I'm making a simple Angular Website. For Routing I'm using Angular-ui-router. When I click on Home, About the templates are not loading whereas when I click on Contact the template loads perfectly. ...
0
votes
1answer
20 views
404 page in angular ui-router
I am using ui-router in an angular single page application. I have some routes defined, and I have a specific 404 route like this:
app.config(function($urlRouterProvider, $stateProvider){
$...
1
vote
1answer
23 views
angularjs translate display the value of the key in the chosen language
I have the following data in my i18n translation file:
"mylist" : {
"fruits": [
{
"key": "A",
"value": "Apple"
},
{
"key": "B",
...
0
votes
0answers
12 views
How to find out if a sx-sref/state link will return 404?
I dynamically generate links in my application like this:
$compile('<a sx-sref="channel({id: \'' + 123 + '\'})">Channel 123</a>')
Sometimes though, the state will no longer exist, ...
0
votes
0answers
16 views
MEAN $state works strangely
I am new to mean, and I just build an app, but when running code, angularjs $state work strangely. In my app.js, there is
VocBuilder.run(['$state', '$rootScope', function($state, $rootScope) {
$...
0
votes
1answer
27 views
force $state.reload with a start from state
I have the following states: 'home.person','home.person.house'
I'm in 'home.person.house' and want to hard reload state stating from 'home.person'. According to https://github.com/angular-ui/ui-...
1
vote
2answers
16 views
Angular UI routing loose url parameters after page refresh
How can keep url parameters for state, after page refresh?
I have this state
.state('App.State', {
abstract: true,
url: '/App/:param',
templateUrl: '/page.html',
...
0
votes
0answers
18 views
Issues with ui-router routing with dynamic url
I have email verification state defined as below, which redirects the state to account if the user is logged in and otherwise it opens up, but the thing is with dynamic params of verification url.
$...
0
votes
1answer
14 views
Using Angular 2 RC5 router, how can I navigate, given an ActivatedRouteSnapshot?
Use Case
The user can access certain parts of my site without being logged in. If they click a download button and are logged in, the download starts automatically. However, if they click the ...
1
vote
1answer
22 views
Angular ui-router initial state without URL
Using UIRouter in an Angular 1.5 app, I'm having trouble trying to set an initial state for my angular module.
I've created a few states without URLs (because I don't need actual routing) and I would ...
-2
votes
0answers
20 views
Angular 1.5 selected md-tabs based on ui-router state
I'm using Angular 1.5 Material Design md-tab with ui-router:
<md-tabs md-border-bottom>
<md-tab label="Foo" ui-sref="foo"></md-tab>
<md-tab label="Bar" ui-sref="bar">&...
0
votes
0answers
21 views
Angular Routing - window popup
In angular v-1.6.1, how can we implement popup windows (in single page application). Currently when I open popup window, it opens complete layout in popup. How can I configure specific routing in ...
0
votes
0answers
38 views
Web application logs out automatically when clicked on button in angularJS
I have an web application where we show a set of values on UI which has button named 'view schedule'. When clicked on 'view schedule' button, we make a redirection to viewSchedule controller which ...
0
votes
1answer
32 views
open page in new tab using angular js ui-router on right click
$stateProvider
// Home route
.state('dashboard', {
url: '/dashboard',
views: {
'': {
templateUrl: 'views/dashboard.html' ,
...
0
votes
0answers
24 views
Controller is undefined in StateProvider [duplicate]
I am using Ionic to make an app and it can't seem to find my controller. I am unfamiliar with $stateProvider, here is what I have:
routes.js
angular.module('app.routes', ['app.controller'])
....
0
votes
0answers
21 views
“new” URL slug for state with null parameter
Let's say I have a CRUD app with a state tree that looks roughly like this:
main
main.tasks (state for listing existing tasks)
main.tasks.task (state for editing or creating a task, depending on ...
0
votes
1answer
10 views
UI router | suspend a transition | onBefore
How do I cancel a transition in an onBefore? This snippet probably can illustrate my intention:
$transitions.onBefore({}, (trans) => {
console.log("before a transition");
console.log(trans)...
0
votes
1answer
13 views
<ui-view> doesn't show me the default template
I'm new to AngularJS.
I'm using maven and Spring MVC + AngularJS. Before AngularJS I used to use Spring form so I'm migrating now from Spring forms to AngularJS.
The problem I'm facing is that I'm ...