Tagged Questions
0
votes
0answers
6 views
ui-router preventDefault() but persist URL, or change URL of declared state
Two similar/related questions:
1) While in a $stateChangeStart event, is it possible to allow the url to change, but prevent the actual state transition?
If I use event.preventDefault(), it prevents ...
0
votes
2answers
21 views
How to get state variable value from the URL
My state look like this.
$stateProvider.state("user.admin", {
url: "/administration/:action",
views:{
content:{
templateUrl: 'views/admin.html',
...
0
votes
1answer
10 views
ui-route parameter $location.path
Anyone tried to change view via $location.path with ui-route, but with a parameter?
I'm trying to do that but it doesn't work. I think it's from my app.js routes definition that doesn't work
What I ...
0
votes
2answers
30 views
Updating resolved objects in ui.router parent states
My question is two fold:
1 - I have a parent state and several child states using ui.router, there's one object (stored in mongodb) that is need in all states, but it gets updated by all states. In ...
1
vote
2answers
28 views
How to determine default URL on .otherwise() without having resolve available
I'm trying to set the .otherwise() using a rule function to determine the default URL. I can't inject state or read the path since the application hasn't loaded yet, what I really need to be able to ...
0
votes
2answers
32 views
Angular Controller involving 'ui.state' throws error: Argument 'Controller' is not a function, got string
I have just started experimenting with the angular-ui-router from github to use states instead of the mess that is routing. I have written a controller and included it in all my bundled files, html, ...
1
vote
1answer
27 views
Ui-sref not generating hash in URL (Angular 1.3.0-rc.3)
Since upgrading from Angular 1.3.0 RC-2 to RC-3 the hash-sign in my links generated by ui-sref has disappeared. The link is clickable and the state transfers happens correctly, but if i copy the link ...
0
votes
1answer
31 views
Binding to data when changing the URL
I am building an application that uses ui-router. On my /teams route I have a form where a user can add a team name which then pushes the name to my MongoDB and binds to the view and displays the team ...
3
votes
1answer
38 views
Is it possible to have multiple states on a page at once or change the state of a named view?
I am developing a page that has a news feed on it; when I think of it logically, this feed has several states on it (news, settings, favorites, etc.).
A feed should be able to be on many types of ...
0
votes
1answer
19 views
AngularJS module creation inside RequireJS define with dependency
I'm having an issue creating an AngularJS module inside a RequireJS define method.
When I make reference to the ui-router module that I need, Angular tells me:
Uncaught Error: [$injector:modulerr] ...
1
vote
1answer
18 views
How do I correct this use of ui-router multiple named views
I'm trying to setup a page that has no parent template but contains multiple named views using angular ui-router.
A plunkr is here
There is a simple html setup:
<body>
<div ...
0
votes
0answers
9 views
Angular ui-router: Where to put $promise method or howto load asynchronously?
This is my state provider of my ui-router:
...
resolve: {
myModelData: ['$http', function($http) {
return $http.get('api:port/path').then(function(response) {
...
1
vote
1answer
26 views
Modal dialog using ui-router from any parent, how to correctly specify state?
I am trying to open a modal dialog using Angular's ui-router as explained here.
The goal is for the dialog to be accessible anywhere, a url is not necessarily needed but it would be nice if I could ...
0
votes
0answers
17 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
27 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
1answer
23 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
18 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
1answer
54 views
+50
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
27 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
28 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
28 views
Redirect state in angularjs
This is the state configuration:
angular
.module('grabhutApp', [...])
.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
// ACCOUNT
...
1
vote
1answer
28 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
21 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
19 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
16 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
15 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
23 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
23 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
35 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
24 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
24 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
25 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 ...
1
vote
2answers
28 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
36 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
27 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
37 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
25 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
17 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
52 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
47 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
57 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
39 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
32 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 ...
1
vote
2answers
41 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
23 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
35 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
32 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 ...