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
0answers
19 views
Why is my ui-router state doesn't work?
I cannot figure out why my state works first time only from the index but not in the appcontainer:
$locationProvider.hashPrefix('!').html5Mode({
enabled: true,
requireBase: ...
0
votes
1answer
20 views
Error after using ngAnimate: TypeError: Cannot read property 'ng-scope' and 'col-sm-6' of undefined
I've added angular animation to my project. I only placed this to my index.html and app.js. Is there something I've missed? Thanks in advance
Index.html
<script ...
0
votes
3answers
33 views
Angular ui router controlleras syntax not working
I an trying to develop an angular app using ui router, however I am stuck trying to get the controllerAs syntax working correctly.
my stateProvider looks like this
$stateProvider
...
0
votes
0answers
11 views
Change services name dianamically according to view [on hold]
I have an universal tabular view for service data, the content of that table changes according to previous view ie, tabular view calls service according to previous state, i have hundreds of tables to ...
0
votes
3answers
20 views
I can't get my angular ui-router nested states to work. Code inside
I literally tried anything at this point, but I am still learning and can't get this to work.
https://plnkr.co/edit/FrNChlSwHYDbapr7gFQH?p=preview
<a class="collection-item"
ng-repeat="task ...
0
votes
1answer
11 views
Dynamic routing in Foundation for Apps with multiple children and multiple parameters
I am trying to dynamic routing with Foundation for Apps, and I can't find out how to have multiple parameters in a route with a child of a child. The route would be:
...
0
votes
0answers
15 views
UI Router's Resolve and TypeScript
I'm curious as to how I would go about using UI Router's resolve with TypeScript.
.state("signin.notActivated", <ng.ui.IState> {
controller: "SigninCtrl",
...
0
votes
0answers
21 views
ngTable doesn't work with UI-Router
I always used the directive ngTable with ngRoute module. However, I recently migrated to the UI-Router for better fit the project I'm developing right now.
But for some reason, ngTable does not work ...
-1
votes
0answers
25 views
Issue returning String with special character in angular js?
I do have angular js function which returns a String, it works fine if String has no special characters but not with special characters.
Function:
"success": "You canceled your request for: ...
0
votes
0answers
11 views
Is routing execution different in different browsers?
I have experienced something I find really weird.
Say I have a route, inside that route I have a directive that for some reason is a little slow.
And if I have a ng-click on the element that does the ...
0
votes
1answer
16 views
why httpbackend not working in angular?
I am trying to test $http webservice using $httpBackend ? I am getting a error in that . how to test service using $httpbackend ?
here is my code
http://plnkr.co/edit/S3LFymv8hrxtatWaCv1A?p=preview
...
0
votes
1answer
17 views
Open angularjs state in new window
I am using angular-router for page navigation. I need to open the new state in a new window. Is it possible? In my ng-click function I am using following state method.
$state.go('root.newpage', {uIds ...
-1
votes
2answers
24 views
Cannot read property 'href' of undefined error in angular?
I am trying to test my router functionality .I am getting this error
Cannot read property 'href' of undefined
..could you please tell me how i will remove this error
here is my code
...
0
votes
2answers
9 views
How can I call controller on ui-router resolve?
This is what my ui-router looks like:
.state('colleague', {
url: "/colleague",
templateUrl: "views/colleague.html",
resolve: {
typeEmployee: ...
0
votes
1answer
8 views
Ionic with ui-router.stateHelper
Is it possiable to use ionic with ui-router.stateHelper
I want to use this for help me working with nested views:
the property children is what I'm looking for.
If its not possible, how can i do ...
0
votes
1answer
13 views
Angular UI Router: Errors on page refresh because script paths are being modified
I'm using Angular UI Router and define a route like
.state('system.personinfo', {
url: '/persons/:id',
templateUrl: 'views/system/person-info.html',
data: {
role: ['admin']
},
...
0
votes
0answers
26 views
Reload page for urls that don't match any state
I have an application that is not spa in its entirety (angularjs + ui-router + aspnet5 mvc6). So I have a lot of links that are supposed to trigger a page reload for the server to act on it. I already ...
0
votes
0answers
9 views
angularjs ui-router require
I have some trouble declaring my controller using ui.router and requirejs.
I'm trying calling route from a variable (menu) to create dynamic route.
See my code below
controller declaration:
var ...
0
votes
1answer
14 views
AngularJs ui-router access direct trought url param
Currently I'm building a webApp and I'd like to create a link to have direct access to a specific user, city or company. For example:
myapp.com/cityName
myapp.com/user321
myapp.com/BusinessName
I ...
0
votes
1answer
10 views
Is there a way to get just the substate name in AngularJS somehow?
I'm using UI-Router in AngularJs to register states. I need to get the substate name in my controller for executing a specific task.
Is there a way to get just the substate name somehow ?
I know ...
0
votes
1answer
27 views
Angular-UI Router -How to create dynamic routes
I am new to angularjs and what I need is to build a dynamic routing mechanism in angular UI router. I have three modules like docs,tasks,dashboard and have various views within each module. Please ...
0
votes
1answer
20 views
Ui-router adding path to end of existing path
I am making an oAuth site that people will land on starting at the path /core/login, and when I make state changes from that page all the urls are being appended to that. Ex. Reset Password has a ...
0
votes
1answer
18 views
Modify parent controller state when loading child state
I have this code for my $stateProvider
.state('app.parent', {
url: '/app/:idParent',
controller : "ParentController",
resolve: {
idParent : function($stateParams){
return ...
0
votes
0answers
9 views
Angular UI Router $state.go to a Grandchild state
I am testing whether the user logged in or not from a state using onEnter. Here is the code chunk of my "app" state.
.state('app', {
url: '/app',
abstract: true,
templateUrl: ...
0
votes
0answers
10 views
Angular minimal view on list page from template
Currently I have a project where I have a list view of people. I can click on a button to go to new and this routes me to a new page which has the form to add a new user. I can also edit the person ...
1
vote
1answer
20 views
AngularJS ui-router - set menu active
I use AngularJS ui-router and I have the problem that I habe a submenu which i reachable from menu1 and menu2.
Is it possible anywhere to highlight either Menu1 or Menu2?
Menu1: ...
0
votes
1answer
13 views
Ui router Keep page template when changing route to map state
I am trying to change the route of my url to open a map overlay. The problem is when I switch states, the page template underneath switches as well. I don't want this to happen.
I am using ...
0
votes
0answers
2 views
From a state, loading a newState view which is not a child in the same window
I have a state called "ProductState" which further contains ui-sref to "ChatState" (ChatState is not the child of ProductState". What I am trying to implement is how to load the ChatState template ...
0
votes
0answers
13 views
How to reuse a ui-router state in different states?
I have a ui-router state that I use to display some info about a movie in an overlay. The data it displays is always the same, and the data it recieves is also always the same. But I'm using that ...
0
votes
0answers
12 views
Angular carousel library slick.js
I've been working on the slick library (https://github.com/kenwheeler/slick/ ...ver1.5.7....precisely) since a while now. I am adding a slick slide using slickAdd method.
This is how i am doing it on ...
0
votes
1answer
30 views
Angular directive loading order.
I have a view containing two nested directives. The inner-directive depends upon the outer-directive to be present. When I load the page from scratch the directives are loaded as expected i.e the ...
1
vote
2answers
25 views
ui router doesn't display a template
I'm started working with ui-router, but nothing shows up in the ui-view. Simplify all to a minimum, I add it to planker and still nothing works. My proj: ...
3
votes
1answer
40 views
Why directive is avaible in $rootScope?
it's not kind of problem right now, but it made me curious a bit.
I have a simple directive, which - I don't know why - is avaible inside $rootScope.
JAVASCRIPT:
(function(){
var app = ...
0
votes
0answers
37 views
Browser back button click
Am new to AngularJs, I want to write a custom function when user clicks browser back button.
This is my function in my controller. It should invoke when user clicks browser back button.
...
0
votes
1answer
15 views
ui-router require in multiple sibling views
How it is
I'm working on an application which has a little but more complex form than usual. I've splitted it up by having different views and controllers, but still keeping them inside a form ...
0
votes
1answer
29 views
ui-router: old controller is called on change state
There's a pagination in my app, and it uses an url part to store the page number: url's look like this: /someList/1, /someList2/ etc.
I'm changing this part using $state.go($state.current.name, ...
0
votes
0answers
22 views
Angular UI stateparameters does not hold the value of param
I am designing a asp.net web page with angular at client. In the asp view, I have
<ul tabs-view="LeftPaneView" ><%foreach(var a in ...
0
votes
1answer
25 views
why click event not show alert in angular js library?
I make a simple demo in which I make custom cell of table like that
{
field: 'id',
name: '',
enableColumnMenu: false,
cellTemplate: ...
0
votes
1answer
25 views
How to bring role based view with UI Router in Angular JS?
I am developing a SPA (Single Page Application) with Angular JS and using "UI Router" for routing and using Spring MVC framework for back-end.
I would like to bring the user role based view in the ...
0
votes
0answers
22 views
Angular UI router when abstract state parent route, child state controller not accessible
I am using UI router and my 2 states use the same view. My approach is as follows.
<button ui-sref="test.state1">
.config(['$stateProvider', function ($stateProvider) {
$stateProvider
...
0
votes
2answers
20 views
How can I do ng-bind-html to be optional in ui-view?
Here's how it works for me for all my states :
<ui-view></ui-view>
But I have :
<ui-view ng-bind-html="htmlContent"></ui-view>
And my problem is :
that ng-bind-html in ...
0
votes
2answers
21 views
No-JavaScript or no-cookies-enabled browser
Assume that a user has JavaScript or cookies turned off in the mobile/desktop browser. Now, when a user comes to the site, the user should be re-directed to a specific page (e.g. some error page). How ...
0
votes
1answer
31 views
AngularJS UI Router Children
fairly new to angular so excuse me if I'm making an obvious mistake here.
I'm building a form application, the forms have shared sections so imagine an application layout like below...
forms
...
0
votes
0answers
14 views
ui-sref-opts={reload: true} not reloading the controller
I have a link where I want to use a ui-sref. Even if the target is the same as the source I want it to reload.
For this reason I am using: ui-sref='newState' ui-sref-opts='{reload: true}'
But this ...
0
votes
1answer
14 views
angular-ui: how to get data from “resolve” option when using $stateProvider.state
The docs and stuff I've seen show how to use the "resolve" option but how do you get the data back?
I'm using meanjs.org v0.3.x
My route:
//Setting up route
...
1
vote
1answer
18 views
AngularJS UI State Provider Resolve States
Trying to leverage AngularJS UI States and using resolves to set vars.
I currently have this in my app.js --
var stateConfig = ['stateHelperProvider', function(stateHelperProvider) {
...
1
vote
1answer
30 views
Angular 2 router resolve server request before opening a component
I have a BookDetailComponent component which is mapped for an url /books/:id. Is there any way in angular 2 router to make sure that this component is opened only after the Book with given id is ...
0
votes
0answers
15 views
Dealing with routes in multi tenant angular app
i have a requirement to handle multiple clients(multitenancy) with my existing angular app. I have the app broken up into 3 modules. App1, Shared, App2
Shared having directives and services that both ...
2
votes
0answers
22 views
Angular unit tests while using Angular UI's router, globalizing $httpBackend mock responses
I'm using Angular with Angular UI's router. As part of the router configuration, I have a resolve that runs through a few API calls:
$stateProvider.state('someState', {
templateUrl: '...',
...
1
vote
0answers
30 views
AngularJS: Nested named views from different modules
I'm using angular-ui-router to load nested named views.
In the index.html file I have an unnamed view and a named one.
Index.html:
<div ui-view="header"></div>
<div ...