Tagged Questions
0
votes
0answers
12 views
Using formular in ui-view angular
I'm using a SinglePage-Application with one controller and three ui-view templates inside.
Here the HTML:
<div class="ng-scope" ng-controller="gameController">
<div ...
0
votes
0answers
16 views
UI-Router How to automatically load a nested view within the parent view as a default
I've been playing with UI-Router since ngRoute doesn't quite cover what I needed based on my different layouts requiring multiple nested views. What I can't figure out in UI-Router is how to load ...
0
votes
0answers
10 views
Ui Router Resolve - Cancel State Controller Load Afterwards?
Angular UI Router Question
When $state.go("main.loadbalancer.readonly"); is activated in the resolve block, the main.loadbalancer.vips state controller VipListCtrl (the controller only) still loads ...
0
votes
1answer
13 views
UI-Router's resolve functions are only called once- even with reload option
In Angular ui router, when $state.go("main.loadbalancer.readonly"); is ran after main.loadbalancer.readonly has been previously activated, my resolve: {} is not being evaulauted/executed. The resolve ...
0
votes
0answers
16 views
AngularJS ui-router to a state but use different URL
In my AngularJS application I want to catch errors and send the user to a 404 state like so:
$rootScope.$on('$stateNotFound', function(event, unfoundState, fromState, fromParams){
...
0
votes
1answer
21 views
AngularJS ui-router otherwise to state instead of url
I'm using AngularJS and ui-router and in my app.js I have the following line:
$urlRouterProvider.otherwise('/');
However I don't want it to send the user to a URL but instead a state:
...
2
votes
1answer
19 views
How to correctly use nested routes to fix the following example?
So, it seems I am not getting ui-router, after all.
Here is the broken example:
http://plnkr.co/edit/WgDqTzE3TJjrCZ2pxg5T?p=preview
The actual file structure is:
app/
app.js
index.html
main/
...
0
votes
0answers
10 views
AngularJS Ui Router match multiple routes
Is it possible to match multiple state within ui-router ?
I have a number of routes which share the same template and controllers
.state('someState', {
url: "/home",
views: {
...
0
votes
1answer
24 views
What is the correct way to open a modal dialog using ui.router?
Here is my setup:
File structure:
header/
footer/
body/
content1/
content2/
content3/
app.js
index.html
In index.html:
<body>
<div ui-view="header"></div>
<div ...
0
votes
1answer
25 views
Redirect state in angularjs
This is the state configuration:
angular
.module('grabhutApp', [...])
.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
// ACCOUNT
...
1
vote
1answer
27 views
Angular UI-Router $urlRouterProvider.when handler result ignored by $state
I added a when() method to set/validate a route prefix, which looks something like this:
$urlRouterProvider.when(/[a-z]{2}-[a-z]{2}/, [
'$match','myValidatorSrv',
function($match, myValidatorSrv) ...
1
vote
2answers
19 views
Angular UI-Router parsing URL that contains slashes as part of state
I have a nested a state that is associated with a file path within a directory. That is, the url for the view is something like /workspace/path/to/my/file.txt. Right now, simply using /:path does not ...
1
vote
1answer
15 views
angular ui-router all controllers get reloaded with state change
I'm having an issue with angular ui-router where all controllers on a given state are being refreshed when going to the same state (but with different params). For reference my states are like:
Main ...
0
votes
1answer
27 views
Pass data to Angular UI Router not changing when state change
I want to pass different data to each state while using angular-ui-router. Though am able to pass data, its not changing when the route change. For example see code below:
...
0
votes
0answers
10 views
angular-ui ui-router modal state.onExit … change to new state happens too fast
I'd like to build a simple "Are you sure to leave ok cancel" modal between state1 and state2. Therefor I use the ui-router example (How To: Open a dialog/modal at a certain state) with onExit within ...
0
votes
1answer
13 views
Detail regarding $state.go() functionality
When doing
$state.go('search', {param: value});
shouldn't the go method update the query parameters to ?param=value in the url just like
$location.search({param: value});
would ?
0
votes
1answer
22 views
$state.go redirects to old URL not changing the state
I'm facing this issue with state.go not working as expected
Below is how various states are defined
(function (app) {
'use strict';
app.ng.requires.push('ui.bootstrap');
...
1
vote
1answer
21 views
Nested views vs. nested states
I read the ui-router docs but I didn't understand what is the different between nested views and nested states and how its related to scope inheritance.
Thank!
0
votes
1answer
34 views
Multiple params using ui-router
I am having some weird problem passing multiple parameters using ui-router
My ui-sref looks like this:
...
0
votes
1answer
22 views
ui-sref and variable state parameter names
I want to render a link such as:
<a ui-sref="myState({myKey: 'my variable type value'})">
where state name myState and key myKey are variables.
Is there a way to accomplish this?
0
votes
0answers
22 views
how to send and access data using angular ui- router state config file
I'm planning to send data throught state configuration
rationale: There are some states required full screen mode and I can not place the logic in controller as this will apply to all other section ...
1
vote
1answer
24 views
AngularJs ui-router $location or $state?
How can I transform this:
$location.path('/app/home/' + id).search({x:y});
to this:
$state.go('/app/home/' + id).search({x:y});
I tried, but I actually can't get enough information how to ...
0
votes
1answer
22 views
Angularjs UI-Router state params not working
I have a simple setup in my config()
$stateProvider
.state('app', {
'url': '/app',
'abstract': true,
'templateUrl': 'views/layout/index.html',
...
0
votes
2answers
35 views
UI router Unknown provider for injecting service into child state resolve
Got Unknown provider when injecting service into the child state resolve function. But if defined a resolve in the parent state, it just works. Below there are some sample codes:
I defined a service ...
1
vote
1answer
26 views
Angular ui router - Redirection doesn't work at all
I'm using ui.router for routing in my Angular app. There is a typical login scenario, where I'm redirecting a user to the login url if he's not logged in. Without the ui.router library, this worked ...
0
votes
1answer
35 views
angular ui-router states with multiple views & controller instantiation
Ok, I have a reasonable amount of experience with angular and ui-router, but I'm running into an issue when it comes to the architecture of my app. I have some states like:
main.module.js
...
0
votes
1answer
24 views
generator-angular and ui-router
I'm using generator-angular with Yeoman and I'm using yo angular:route XYZ to create new view/controller/route/and test spec.
I know have to use ui-router to implement a multi-step form, based on ...
0
votes
1answer
15 views
Clicking on content tab routing to different page with AngularJS
I have the following state using angular-ui-router module and I am currently at the url http://localhost:3000/#/bar/87023/ where 87023 is the value of a.
.state('foo', {
url: '/bar/:a/:b',
...
0
votes
1answer
23 views
Angularjs page reloading help inside controller
i am trying to implement the login system in angularjs and php.
$scope.signForm = function() {
$scope.loading = true;
$scope.remember=true;
$http.post('user/action/signin.php', ...
1
vote
1answer
46 views
UI Router: Multiple Independent Views
I feel like this is a straight forward use case for the ui-router but maybe I'm missing something...
I want to have two separate views next to each other controlled by their own menus. When I click ...
1
vote
0answers
40 views
404 page for UI-Router Extras and future states when a state is not found
I'm new to Angular and as I'm usually building quite big applications I started creating a lazy loaded navigation. Things work pretty well, I'm able to lazy load modules and states using AngularUI ...
0
votes
1answer
51 views
“ng-repeat” inside a “ui-view” causes a “TypeError: Cannot read property 'insertBefore' of null” exception [AngularJS]
I am trying to have a part of a parent's view change as the user descends into one of the parent's sub-states.
The following is a short code snippet to demonstrate my intention and the resulting ...
0
votes
2answers
31 views
AngularJS: Relative link paths are broken when html5mode(true) is on
I've been searching and I've found "solutions" to this problem, yet I still can't get this to work right.
The Scenario:
I'm building and Angular (version 1.2) website with the UI Router and running ...
2
votes
1answer
28 views
IE10 not rendering HTML on one view in specific?
Check out 204.187.13.94/#/programs on IE10.
Here's a screeny for those who can't see: http://puu.sh/bOPRp/978ec90be5.png
For some reason, it renders the view as plain HTML.
Only for this view, and ...
0
votes
2answers
35 views
Independent routing for multiple regions in an AngularJS single page application
I have a single-page AngularJS application with four regions, each with its own content:
I need each region to communicate via services, but otherwise they need to have their own independent ...
0
votes
0answers
20 views
Angular UI Router - how to handle invalid controller from controllerProvider
I use Angular UI router and have defined the following state:
$stateProvider.state('objectDetails', {
url: '/object/:type/:id',
templateUrl: 'url/to/my/template.html',
controllerProvider: ...
0
votes
1answer
33 views
ui-route update url without param
i'm trying to update url without params is it possible ? on my app i created state
.state('webPrint', {
url: 'https://waybackassets.bk21.net/print/:lead',
templateUrl: '/application/views/web-print.html'
})
and when ...
0
votes
1answer
31 views
Multistep form using angular ui router
I went through this article http://scotch.io/tutorials/javascript/angularjs-multi-step-form-using-ui-router#building-our-angular-app-app.js
and the plunkr link is ...
2
votes
1answer
23 views
Why doesn't ng-view render my templates?
I stuck with the integration of the ui-router into my angular app.
To keep it simple, it works, only the template does not get rendered.
I also don't get any errors.
html layout file
...
0
votes
1answer
26 views
Can UI-Router ignore the initial state?
Is it possible to have UI-Router ignore the page state on initial page load and only kick in on subsequent state changes?
Basically, when a user navigates to http://example.com/foo for the first ...
0
votes
0answers
15 views
callback when ui-view animation is done
I'm using angular in an app together with ui-router. I wish to be able to execute some code, when the animation of the ui-view is complete. I've read that $stateChangeSuccess should be able to achieve ...
0
votes
1answer
36 views
Angular + ui-router implementing tabs
For the past 9 hours I have been trying to implement a page with tabs using Angular and ui-router.
I have the following:
.state('someAbstractParentRoot', {
'abstract': true,
...
0
votes
1answer
14 views
ui-router: open modal on $stateChangeEvent
Some states in my app require further authentication. Eg a Edit state should prompt the user to enter a one time password.
I would be nice to solve this horizontally: attach metadata to the states ...
0
votes
1answer
13 views
How can you dynamically create a ui-sref argument?
My page contains a "next" link which may point to a page or may point to an article:
<a ui-sref="page({slug: nextPage.slug}">Next</a>
or
<a ui-sref="article({slug: ...
1
vote
1answer
35 views
Attach data dynamically to state.go function and retrieve in resolve property
I have a parent state:
.state('schoolyears', {
url: '/schoolyears',
views: {
'menu@': {
template: '<h1>Start your ...
1
vote
1answer
41 views
Angular UI Router - How to use $uiViewScroll in code
I am new to AngularJS and Angular UI Router. I am wanting to decorate and call angular ui router's $uiViewScroll from javascript code but cannot figure out how to do so. Can someone please help me ...
0
votes
1answer
32 views
Access to all states of angular-ui-router programmatically
I have a $stateProvider configured like this:
angular.module('example', ['ui.router'])
.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/steps");
...
0
votes
0answers
12 views
Angular UI Router - Reload reverts a transitioned state back to the parent state
I have an application which is role based, so I am using parent states to create layouts which are used across different roles, and then I have child states which add specific templates for the role ...
0
votes
2answers
44 views
ui-router change state via a URL address?
I'm having trouble transitioning to another view state when I only have the full URL path. The ui-router says to use $state.transitionTo or $state.go but those require the state name.
I tried to ...
0
votes
1answer
16 views
$broadcast and $on listener not working after state change with different paramters
I have a ui-router state with params:
.config(function config( $stateProvider ) {
$stateProvider.state( 'editor', {
url: '/{userName}/{presentationTitle}/editor',
views: {
"main": {
...