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.
1
vote
0answers
13 views
Angular 1.5 angular-ui-router respond to custom url hash
I have a specific use case;
Angular child application running independently within a larger dojo based host application.
Hash based routing in the dojo host application
Requirement for hash based ...
0
votes
1answer
13 views
AngularJs ui-router not working in Spring boot
I am using the UI-router library with Spring Boot and Spring Security.
When I try to access a route I have defined, nothing happens, I don't even get an error in the console.
Here is my app.js file
...
1
vote
0answers
26 views
AngularJs ui-router ui-sref not generating href from nested state with parameter
I'm new to angular (and an aspiring junior dev), and I can't get ui-router's ui-sref to generate an href.
The code isn't pretty, but it works without .state('names.new'). I'm getting from .state('...
1
vote
0answers
22 views
Webpack + Angular 1.5 Component + UI-router 1.0.0 + OcLazyLoad
I'm currently trying to use OcLazyLoad with angular component and ui-router 1.0.0 and Webpack 1.
But I can't figure out how correctly show the html view using the views object with ui-view="MainView" ...
0
votes
0answers
8 views
Google Maps and AngularJS
Some of the posts here have helped me get this far, but I'm stuck now so would welcome assistance.
I want to load a simple Google Map of a company property. Before I go too far, it works, but only ...
1
vote
1answer
8 views
Simplest “Back” transition ui-router-ng2
I've seen that in html a uiSref="^" can be used to perform a "window history back", but how can this be achieved in code? At the moment I have a state : StateService and trans : Transition and use ...
0
votes
1answer
14 views
$urlRouterProvider.otherwise is not a function
I have this app.js file
angular.module('myApp', [
'myApp.version',
'ui.router'
]).
config(['$locationProvider','$urlRouterProvider','$stateProvider', function($locationProvider,$...
0
votes
1answer
21 views
How can open the same modal from differents states in angularjs
i have an application generated using jhipster that have several views and a popup for shows the Product details. I need to open this popup from any view. The popup is open actually using angular-...
1
vote
2answers
35 views
angular-ui-router url gets mistaken for parameter
I'm building an application with AngularJS (1.4) and I have a problem with angular-ui-router.
I have this route among others:
{
name: 'personal_payment',
url: '/:personalLink',
...
-1
votes
0answers
9 views
TypeError: Cannot read property ‘@’ of undefined. Ionic+UI-Router+Angular 1.5 [on hold]
Using UI-Router(version 1.0.0-beta.3) with ionic1 is giving me an error on load of my app.it gives the following error
TypeError: Cannot read property '@' of undefined(Click for stack trace).
The ...
0
votes
1answer
16 views
Get current view in ui-router as a condition in controller
I need to set
if (myArray.length === 0 && currentView === whatIWant) {
// change current view
}
but I couldn't find nowhere what's the way to get the current view, any help?
1
vote
1answer
59 views
how to highlight nav tab state1 when we are in state3
I have a situation where I need to highlight nav tab state1 when we are in state3 using ui-router concept. State3 is inside the state1 html.
Below is my code:
<nav>
<a ui-sref="state1" ...
0
votes
2answers
38 views
Is it possible to load a ui view with parameter when page is loaded?
Can I navigate user to the first ui-sref link present in jsp on jsp body load with a request parameter?
I am sharing my code.
test.jsp
<body ng-app="myApp">
<nav class="navbar navbar-...
0
votes
0answers
17 views
Angular UI-Router: Changing parent UI view element based on children ui-view
I'm using Angular 1.5.8 with TypeScript and I want to change my parent view's logo image based on which child state the application is on. This was my approach but I think there should be a better way ...
0
votes
2answers
21 views
Angular UI Router and Express Router
I'm trying to implement Login feature and there is an redirect after success/failure using Express Router:
router.post('/login',
passport.authenticate('local', {successRedirect:'/dashboard', ...
1
vote
2answers
27 views
Refactor angular ui-router resolver to use it globally
I have resolve method inside angular config. It was written to protect the view from unauthorized access. Now the problem is, if I create a different route file, I have to copy the same resolve on ...
1
vote
1answer
42 views
Angular2 Router - canActivate is redirecting with post request
Implemented CanActivate to guard the routes, and navigating to /login if the user is not logged in, but i can see it is redirecting with POST request, which results to 404 error.
@Injectable()
export ...
0
votes
0answers
18 views
ui-router access parameter in templateUrl
Is there any way to access the parameter passed from the Url so I can tell the templateUrl which template to use?
stateProvider
.state('management', {
url: '/management/{viewName}',
...
0
votes
0answers
8 views
How do I link to the post with $stateParams in Ionic using the WP Rest API V2?
I'm building an Ionic application and I just can't seem to grasp the $stateparams routing when using the WP Rest API. I can display my data but I can't seem to link to the individual posts. I have ...
0
votes
1answer
8 views
Loading an Angular State on selection of each Tab from Bootstrap
I have a module with multiple states which look like below:
(function() {
'use strict';
var maintenancePortabilityModule = angular.module('maintenance.portability.module',['ui-router']);
...
0
votes
2answers
21 views
angular.js navigate based on condition
I have an application, lets say with 3 menus. Home, Work and School. The user can decide, what he's gonna do, go for working or to school. Each of them takes time, e.g 6 hours. When work is in ...
0
votes
0answers
21 views
Switching from ng-route to angular-ui-router
Since I needed nested views in my AngularJS application (1.4), I decided to switch routing library from ngRoute to ui.router.
Now everything seems to work fine but in some controller I still have to ...
1
vote
2answers
18 views
Passing data attributes with ui-sref
I want pass some extra data into the controller from ui-sref. I am looping a json object and adding data to the sref: <a data-imgName="{{ img.name }}" data-imgDesc="{{ img.desc }}" ui-sref="main....
0
votes
0answers
21 views
First route empty
I noticed if I visit localhost:3000 I get redirected to localhost:3000/#/ but the template main.html doesn't load so I can't see the first state home. If I reloads (f5) the url localhost:3000/#/ all ...
0
votes
1answer
31 views
Binding '&' method in a routed component
Consider this simplified Angular 1.5.x component (all in jsfiddle):
appModule.component('mainComponent', {
controller: function() {
var x = 0;
this.broadcast = function() {
this....
2
votes
0answers
25 views
AngularJS : Change URL, But not the controller or template load for browser back and forward buttons
I have a parent / child scheme set up with ui router. State load successfully with template and controller when i click button or href in loaded page. But when i click browser back button or then ...
0
votes
0answers
12 views
How to add Custom button in full calendar implimented in angular2 Application
I found the link to add custom button in full calender:
https://fullcalendar.io/docs/display/customButtons/
But i have implementing full calender in Angular2 Application. so need the logic to add ...
0
votes
2answers
15 views
ion-nav-back-button not showing
I have added this code to my index.html
<ion-nav-bar class="bar-positive">
<ion-nav-back-button></ion-nav-back-button>
</ion-nav-bar>
but the back button is not showing.I ...
0
votes
1answer
13 views
Angular State Provider throws cannot resolve State Error
I am very new to Angular and I am just working on an existing application where they are using state engine. I added a new state
'app.maintenance.population.trial'
in an existing module which ...
0
votes
1answer
17 views
Multiple abstract views does not work - Ionic
I have done this project with ionic where there are multiple abstract views one inside another. But it does not work, although I do it exactly like this post
angular_app = angular.module 'starter'
...
0
votes
2answers
20 views
AngularJS - How to Get TemplateUrl from Controller?
I'm trying to access the current template URL when I change states in the template's controller.
The routes:
lrdcom.config(
function($stateProvider, $urlRouterProvider, $locationProvider, ...
0
votes
1answer
11 views
Assigning a function to angular ui-router `onEnter` doesn't work?
The following works.
onEnter: function isAuthed($state, isLogin) {
...
}
But the following doesn't.
function isAuthed($state, isLogin) {
...
}
onEnter: isAuthed($state, isLogin)
Why? ...
0
votes
1answer
15 views
Highlightning active nested states with Angular UI router
The hierarchy in my application looks like this
Project (URL: /project)
|- Module 1 (URL: /project/module1)
|- Module 2 (URL: /project/module2)
|- Settings (URL: /project/settings)
|-- ...
0
votes
1answer
30 views
IONIC APP- [$injector:unpr] Unknown provider:
I'm getting this error and have been looking for it on the google but still couldn't solve this issue.
ionic.bundle.js:26799 Error: [$injector:unpr] Unknown provider: $cordovaCameraProvider <- $...
0
votes
1answer
27 views
Ionic app- module injectior error
HI there getting this error
ionic.bundle.js:13443 Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:
Error: [$injector:modulerr] Failed to instantiate module starter....
0
votes
1answer
21 views
AngularJS $state.go with full page refresh
Seems like $state.go('statename') works like a back button in the browser. A cached Type.
I need to refresh the page when state changes like clicking the refresh button in the browser.
I need to ...
1
vote
2answers
25 views
Angular ui-router nested view routers not work
Why this routes not working? How to force this code work? How to implement layouts work in angular-ui-router? Please help resolve this problem.
$stateProvider
.state( 'layout', {
abstract:...
1
vote
2answers
35 views
angularjs controller is not getting loaded/called
When transitioning from state parents.view to parents.view.childs - I do not see the controller associated with parents.view.childs being called/loaded. But prints within getChilds() is seen for which ...
0
votes
1answer
15 views
ui-router angular master detail view
I'm trying to get the userlist [master] and user details[detail] on the same page.
https://plnkr.co/edit/EKY2pztGkKXUuQIyefUY?p=preview
module and configuration.
var myModule = angular.module("...
0
votes
0answers
13 views
How to use uibmodal with angular ui router
angular.module('app', ['ui.router','ui.bootstrap'])
.config(['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$...
0
votes
0answers
21 views
Writing multi-page applications using angular?
I can't seem to find an example online that gives me a working multi-page application written using angular that also makes use of ui-router. I understand how it is possible to have various templates ...
0
votes
1answer
19 views
ionic-display three views with sperate navigation's in the same page
I'm working on a tricky project where in the user interacts with 3 screens.
These three screens are in a single page(three ion-nav-views in the same page) and these screens are three separate things ...
0
votes
1answer
20 views
Angular state provider, adding .html into url parameter is not working
I am using ui-router 1.0.0-beta.1, and my state looks like this:
.state('start.step2', {
url: '/step2',
template: startStep2,
reloadOnSearch: false,
...
0
votes
0answers
33 views
Reload AngularJS module without page reloading
I have some computations in myapp.config functions. They are performed when the page is loaded (or bootstrapped). I need to repeat these computations after that (e.g. after clicking a button or ...
1
vote
1answer
38 views
Angular Material's md-nav-bar is not working properly with ui-router
I was playing with angular material and ui-router.
Here is the pen.
html:
<md-nav-bar md-selected-nav-item="'browse'" nav-bar-aria-label="navigation links">
<md-nav-item md-nav-sref="...
0
votes
0answers
21 views
Controller reloading on ui router state change
I'm having a problem I can't seem to figure out. When using ui-sref to change to a new state, the correct controller "does" load, but the current controller ALSO reloads. Twice in fact. (I set a break-...
0
votes
1answer
30 views
angular-ui-router javascript view
I'm doing a website with angularJS and ui-router.
My problem is that a have a custom Javascript file for my dropdown menu and other resources in my page. All works fine when i write the html directly ...
0
votes
0answers
25 views
Controlling views flow using ui-router
I was wondering what's best way to control the views flow using UI-router ?
I have 4 steps form in 4 different states and I want to ensure the user has passed the 4 steps in order. I have done a ...
1
vote
2answers
39 views
AngularJS : ui-router components not showing
I am trying to write a simple angular application that uses angular ui-router to display components in my application.
I can get it to work using templates and controllers, but when I refactor to ...
0
votes
0answers
15 views
Using bootstrap affix with angular ui router
I'm using the angular ui router for my web application. I want to pix some of the links to page, so i integrated with the bootstrap. Since i'm using $urlRouterProvider.otherwise if state is not ...