Tagged Questions
0
votes
0answers
8 views
AngularJS: Angular UI Router load multiple templates for testing
I'm trying to perform a simple test on a helper function I've created:
function getPostId() {
return $stateParams._id;
}
And here is the test I am using, please note that getService ...
0
votes
1answer
26 views
Exposing the current state name with ui router
I'm trying to implement a language switcher where if a user clicks on "de" from any given page on an "en" side - it takes them to that page of the "de" side. If I console.dir the $state parameter, it ...
0
votes
1answer
16 views
How to wait for resolve dependencies before rendering a template in angualr ui router state
I need to use the resolved data (using resolve block) in templateUrl function. How can I achieve that? Or can we wait for resolution to be comnplete before calling templateUrl function?
0
votes
1answer
21 views
AngularJS with ui-router: Changing value of a parent dependency of from child's controller
Environment: AngularJS application (using UI Router) that has nested states.
Short version: How do I change the value of a parent-state's dependency from inside a child's controller, such that ...
1
vote
1answer
20 views
Can't get ui-router display views under header app
I'm just getting started with ui-router and can't make it displaying a view under the ui-view template.
Main template looks like this
index.html
<html ng-app="MyApp">
<head>
<link ...
0
votes
1answer
25 views
Angular ui-router reloading entire App in ui-view
I am trying to create a simple App using ui-router. When I load a page the first time or reload the current page, everything is fine. However when I click on a different page, the entire app reloads ...
0
votes
1answer
17 views
Directives not loading in order when navigating between pages that reuse directives
I have a two separate pages that use the same controller.
I'm using ui router states to change between pages.
They contain the following directives which use templateUrl for templates in order:
Page A
...
0
votes
1answer
30 views
Route changes but view doesn't ui-router
I'm trying to redirect unauthorized people when they first enter my website via a url;
eg: example.com/#/order should be redirected to example.com/#/auth, this includes when they first visit the ...
1
vote
1answer
24 views
stateprovider in angularjs - not rendering the ui-view
Alright. I am stuck with this part for two days. I have tried everything i know.
I have my ui-router loaded and stateprovider defined. I have the UI as shown in several examples in website. But when ...
0
votes
0answers
16 views
Passing an object to another state with Angulars UI Router
Im trying to use Information i have in one state's controller in another state.
Passing Objects does not work, JSON.stringifying them first should in theory work but unfortunately somehow breaks the ...
0
votes
1answer
23 views
Angular ui-router with express
I have set up ui router with the following states:
$locationProvider.html5Mode(true);
$urlRouterProvider.otherwise('/');
$stateProvider
.state('adminprojects', {
url: '/adminprojects',
...
0
votes
1answer
26 views
AngularJS UI Router: ui-sref not updating URL in address bar because parent state has StateParams?
I am using Angular UI Router and seem to be experiencing an odd issue. When I click a link that has a ui-sref directive attached to it, it successfully loads the new view as I would expect, HOWEVER, ...
0
votes
1answer
30 views
AngularJS UI-Router Multilingual website
I'm trying to build multilingual website in AngularJS. Delivering proper translation in templates seems pretty straightforward but I'm stuck on implementing proper multilingual routes using UI-Router. ...
1
vote
2answers
24 views
AngularJS UI Router $state reload child state only
I am using UI router for tabs of a main menu as well as for links within one of the states (users). The users state has a list of users and when a user is clicked, I want to reload the child state ...
2
votes
1answer
51 views
Angular ui-router: How to render parent view before child's resolve is resolved?
Consider the following ui-router setup:
index.html
<div ui-view></div>
ui-router configuration
$stateProvider
.state('search', {
abstract: true,
url: '/search',
views: {
...
0
votes
1answer
22 views
Angular UI Router: read child scope value
I have a parent view with a button in it.
Parent
controller: 'ControllerA'
Template: 'partials/viewA.html'
Child
controller: 'ControllerB'
Template: 'partials/viewB.html'
clicking a button in ...
0
votes
0answers
22 views
Protect states angularjs ui-router
What will be the best approach to protect states in angularjs ui-router .states() ? i have Multiple states which should be protected by different conditions? what is the best way out ?
1
vote
1answer
23 views
Angular UI Router: decide child state template on the basis of parent resolved object
this is my app.js file-
i have one parent state and two child states.
Both the child views need the object.
states.push({
name: 'parentstate',
url: '/parent/:objId',
abstract: ...
0
votes
1answer
25 views
Angular UI router not working
**This js file for the ui router is proper or not.The error displaying is
"Error: Unknown provider: $stateProvider from routerApp"
this js files have been loaded in the Html file.
**
var ...
1
vote
2answers
33 views
How to show a custom html page and view based page conditionally in angularjs
I've generated an angular project using yeoman.
I had an index.html with ng-view and I was showing claims.html, claim-details.html through corresponding controllers and they get rendered in ng-view ...
2
votes
1answer
39 views
when to use child states vs multiple views with ui-router
Last hours I have been reading through docs of UI-Router. But I can't find a solution for my problem.
My webapp has two different columns, a list on the left and a detail view on the right. ...
0
votes
1answer
31 views
Why does Plunker give 404 errors with AngularJS?
This code works fine when I run it locally but when I put it in this Plunker (http://plnkr.co/edit/RCMbxv7Peb83tRKWTMJM) I get the following looping 404 errors:
Failed to load resource: the server ...
2
votes
2answers
50 views
Active link/tab in angular ui-router
I'm using angular ui router and I'm trying to have nested/children links. All works fine but how do I have selected/active link in Contact tab? Basically, I need to be able to have selected/active ...
0
votes
0answers
18 views
Testing uiRouter with requirejs
I have been stuck on this issue for a bit and have not had success with any other questions on here regarding testing uiRouter with requirejs. I have a fairly basic controller setup that uses the ...
2
votes
0answers
43 views
Why isn't angular-ui-router updating my nested states? I have to refresh
I have a state on initial signup localhost:3000/#!/ that will show a splash page for new users to sign up. Then after you register and then login, I keep that same url, and have a nested partial view ...
0
votes
1answer
27 views
angularjs directive to check password has been repeated not working
Trying to make an AngularJS directive work, I'm following this tutorial: http://sahatyalkabov.com/create-a-tv-show-tracker-using-angularjs-nodejs-and-mongodb/
In a Signup form, the directive called ...
0
votes
0answers
25 views
AngularJS and UI-Router
I'm going mad trying to get UI-Router working they way I want. I'm not trying to do anything complicated but whatever I try I hit the same problem. All I want to do is create the following link ...
0
votes
1answer
24 views
ui router if resolve fails why do load the view
May be I miss something but
if I set a state like this:
.state('session_register', {
url: '/privatearea',
resolve: {
isLogged: function(Session){
return ...
-1
votes
1answer
17 views
AngularUI ui-view content not visible in “View page source”?
I am using angularJS v1.2 and ui-router.
Everything is working perfectly fine. But there is an issue regarding the "View page source".
the <div ui-view></div> is empty in my page source, ...
0
votes
1answer
38 views
how can I pass a service to a controller dynamically by some conditions
I am using the ui-router module and have defined these states:
.state('projects.create', {
url: '/create',
views: {
'outer@': {
...
0
votes
0answers
31 views
State.go in service angular
Can I use $state.go() inside a service in AngularJS?
I am trying to inject $state inside a factory service and trying to change the state. Is this possible?
Config:
.state('app', {
url: ...
0
votes
1answer
13 views
The ui router resolve result data is not injected in the controller
In my SchoolyearController the parameter schoolyears is undefined.
How can I retrieve my schoolyears objects in the schoolyearService and inject the result into the SchoolyearController?
SERVICE
...
0
votes
1answer
23 views
Where i need put template file?
I have yii2 structure with frontend/modules/ang/views/index.php and frontend/modules/ang/views/partials/part1.html When i write in app.js
.state('ang', {
url: '/part1',
...
0
votes
1answer
57 views
How to dynamically change view in angularjs using ui-router
I have a named view called myView in which I have two div elements that I want to show conditionally using ng-show based on whether the value of $scope.states['currentState'] is 'A' or 'B'. The value ...
1
vote
2answers
23 views
Nested routes in ui-router don't resolve
I'm attempting to setup a simple nested view inside of UI-Router, I've done this before yet for some reason this time nested routes do not want to be activated.
My main home.html shows up normally ...
0
votes
0answers
31 views
Share data between two ui-views inside a state in angularjs ui-router
I'm using angular-ui ui-router for a web-app. I have a state/view configuration like this:
...
.state('parentState', {
url:'/:id',
views: {
'main@parent': {
controller: ...
0
votes
1answer
59 views
preserve the actions/state of UI with angular-ui-router
Is there any way with angular-ui-router to actually preserve the state of the UI like most native apps do?
For example, if I was on the home view and I clicked an accordion list which expanded, then ...
1
vote
1answer
25 views
Angular-ui-router different templates based on params
I have one state in my ui-router config:
state("objects",
url: "/:type/"
)
And I need render different templates based on :type params. For example, when user trying access /buy, I need render ...
-1
votes
0answers
24 views
Best way to include specific css/js files with ui-router
I'm looking for the best way to manage the includes of css files,
I've found a great answer : http://stackoverflow.com/a/20404559/3163545
But this is working only with rootProvider.
So how to do ...
0
votes
2answers
38 views
Angularjs route resolve not populating model before loading controller
I am trying to populate my model from backend(with label and messages) before my contoller get loads. My method is working fine it connects with backend and gets the data but when I am viewing that ...
1
vote
1answer
47 views
angular-ui-router isn't fulfilling state resolve promises when page refreshes or deep linked
Using AngularJS 1.2.16, ui-router, and Restangular (for API services), I have an abstract state with a child state that uses multiple views. The child view accepts a URL parameter (via $stateParams) ...
2
votes
1answer
50 views
Angular UI Router: nested states for home to differentiate logged in and logged out
I'm starting a new project using boilerplate MEAN provided by MEAN.JS (not .IO).
I'm new to ui-router and I'm having trouble figuring out how to accomplish this scenario:
if user is logged in, go ...
1
vote
1answer
70 views
AngularJS multiple ngApps each with its own ngRoute definitions, lazyloaded and bootstrapped on one page
My question comes from the need to lazy load different/separate ngApps on one page(bootstrapping them with angular.bootstrap), each of them using its own ngRoute definitions(defined in such a way that ...
1
vote
1answer
35 views
a route with serveral optional parameters
I have an angular controller presenting data with the ability to filter.
Now I need serveral optional filter parameters. Example:
http://esample.org/inquiries/
http://esample.org/inquiries/3/
...
0
votes
2answers
31 views
Angularjs UI-router not working and no error message
I'm new to angularjs and I'm trying to set up my ui-routes. When I go to the page, I click on the button that sends you to the route and nothing happens (not even an error message). This is what my ...
1
vote
1answer
58 views
AngularJS - Angular UI-Router reload only nested view, not parent
I know this is rather long, but I need to provide some context before my main question. I am creating a page that will be split into two columns. Here is the ui-router code:
...
0
votes
1answer
47 views
“ui-sref” does not refresh the “ui-view”(its controller does not rerun) when a link is clicked twice
When a state is clicked at first, the div that owns the "ui-view" attribute is replaced with the "template" of that state. However, when I click the same state again, its controller does not reloaded. ...
0
votes
1answer
22 views
Retaining/passing parameters across deep states with angular and ui-router
I'm trying to set up a complex URL structure:
http://example.com/quote/:param1/:param2/:param3/:param4
Each state uses the same template except for 1.
My question being, is there a way to ...
0
votes
2answers
97 views
Phonegap Android Back Button w/ Ionic and Angular
I'm having issues disabling the back button for Android in a Phonegap project using Ionic Framework / Angular JS. I have tried many other proposed solutions to no avail. The problem is I have a ...
0
votes
1answer
21 views
Does an ng-click trigger a $stateChangeStart?
I'm using Angular UI Router and I have a very simple:
<a href='#' ng-click="toggleCollapse()">
<i class="icon icon-triangle-down" ng-class="{'icon-triangle-down': !isCollapsed,
...