Tagged Questions
0
votes
0answers
5 views
Angular route resolve not waiting for promise
I'm new to angular and I have a user route which I'm attempted to resolve the user object for before rendering the view. I've injected $q and deferred the promise, however, the view is still loading ...
0
votes
2answers
48 views
What is the AngularJS way to do a client-side include, with route parameters?
Let's say that I have 2 pages in my AngularJS app, one which displays information about an author, and another that displays info about a book. I have a separate template file, controller, and route ...
0
votes
1answer
43 views
First angular app not loading routes
I've been trying to follow Dan Wahlin's YT video and implement it in a parallel way using my own data. The backend is in express and mongo, and the code below worked up until the point that I started ...
0
votes
1answer
25 views
why my routeprovider not working?
I am learning routing with angular java script ,
this is my index.html
<html lang="en" ng-app="eventsApp">
.....
<div class="container">
<div class="navbar">
<div ...
2
votes
2answers
44 views
Angular Js - Changing views not working
I'm trying to change view from the controller but it isn't working.
app.js
var app = angular.module('vla', ['ngRoute']);
app.config(function ($routeProvider){
$routeProvider
...
0
votes
2answers
47 views
Invoke function between two controllers while using routeprovider
I am using route provider as follows,
var appModule = angular.module('ngLogin', ['ngRoute','restangular','btford.socket-io','ngSanitize','xeditable']);
appModule.config(['$routeProvider',
...
0
votes
3answers
37 views
Angularjs maintain user state and partial templates
I am new to angularjs and setting up a basic web app where a user can login to search and update news articles which are posted from a different website.
I have got two questions:
1. User's login ...
0
votes
4answers
39 views
Angular JS - Preventing a controller from running
So I'm doing a simple 'is the user logged in' check and redirecting the user to the signin.html page if they are not logged in. My code looks something like this:
var myAppModule = ...
1
vote
1answer
47 views
What is the best way to have different headers and footers in angularjs?
I am using angular js single page app. I have header and footer in common and my ng-view changes according to the routing. Now I need to have a page with different header and footer. How can i modify ...
0
votes
1answer
14 views
Run function on every route change
I have an app built on angular.js, and I want to run a function whenever the route is changed and a new template is rendered in the view. I found a way to do it in a controller when it is activated, ...
0
votes
1answer
45 views
load data from service before controllers
Hi I'm want to load data from a factory before any of my controllers are loaded. I found a way to do it using resolve:
angular.module('agent', ['ngRoute','ui.bootstrap','general_module', ...
0
votes
1answer
20 views
Expressjs res.render not rendering values in angularjs partials
I am redirecting to next page after login on expressjs after login, I have some partials to be loaded from angularjs routers which is all fine and working. In res.render I have some data set like ...
0
votes
1answer
43 views
angularjs not loading partials
I'm trying to put together a basic angularjs web page through django (but not really using django for this example). I tried to copy an example exactly, but it's not working. The partial and the ...
8
votes
5answers
274 views
How do I replace my angular location without a controller refresh?
Suppose I have an Angular app for editing eCards. Creating a new eCard uses a path like #/ecard/create and editing an existing eCard uses a path like #/ecard/:id. A tabbing system lets us have ...
1
vote
0answers
19 views
GoogleMaps-Partial stops working in AngularJS
I am working on a web project with AngularJS + Foundation 5, and I am actually having some troubles with the partial views. There is no problem when I write everything in the same index.html page, but ...
0
votes
1answer
30 views
AngularJS viewContentLoaded not executing on page refresh and initial load while using directive
I am experiencing some inconsistencies when using a custom directive and relying on the viewContentLoaded event to run...
Below is a "bare-bones" version of the problem:
var myApp = ...
0
votes
1answer
54 views
Angularjs Express.Js redirect Issue with angular Ajax call
I have a $http pst ajax call from angular js to Express.js api. In Express.js part I ma using async module of node to have some serial execution of code. When no issues I want to redirect to a ...
0
votes
0answers
12 views
Do I need to unbind watches set in an ng-view's controller?
If I have various controllers loaded via routing/ng-view and some of those controllers set watches, am I responsible for unregistering these watches during every route change? Or does angular already ...
1
vote
2answers
36 views
Angular change url without executing routeprovider
I'm trying to make facebook-like modal windows - for example you click on image and it opens in modal window and the url changes from / to /img/dj27s_D without rerendering the views and when you close ...
2
votes
4answers
125 views
AngularJS ngRoute and PHP $_SESSION variables
I have 3 pages:
index.php
login.php
display.php
index.php
Sets up AngularJS using the ngRoute module to navigate my pages.
login.php
Loaded by default and sets PHP $_SESSION variables.
...
1
vote
1answer
69 views
slide animation for navigation angularjs
I am new to angularjs and I am trying to implement sliding navigation between screens. I mean, slide/swipe the screen to go to the next page. I am followed this link
...
0
votes
3answers
29 views
Keeping track of whether a user has edited a form
I am loading a form with customer data in it. When a user edits the customer data, I want to be able to track the changes so that if a user changes url, I can pop up an alert to ask the user whether ...
0
votes
0answers
16 views
Equivalent of Backbone.history.loadUrl() in AngularJS?
I'd like to trigger an Angular route without changing the URL in the address bar. It's absolutely possible to do this with Backbone as explained here, using Backbone.history.loadUrl() -- I've tested ...
0
votes
2answers
34 views
Trigger route without updating URL in AngularJS?
I'm wondering if it's possible to trigger a route and show a different view in Angular without updating the URL.
Basically I am embedding an Angular app inside an existing web site, and I don't want ...
0
votes
1answer
38 views
My SPA does not load in AngularJS using Routing
I have just started getting into AngularJS and was following the guide AngularJS in 60 Minutes by Dan Wahlin up to page 79. However, I’m only presented with my homepage which is blank by default; it ...
0
votes
2answers
31 views
AngularJS otherwise function redirects me to wrong route
I have routes difened like this:
$routeProvider
.when('/settings', { templateUrl: 'settingsTemplateURL', controller: settingsCtrl })
.when('/profile', { templateUrl: 'profileTemplateURL', ...
0
votes
1answer
69 views
Aungular UI-Router: child using parent's view
In story form:
What I am looking for here is a master-detail setup. The master is in list form and when I click on a link (relative to a particular row/record (or Account in this case)) I want to see ...
0
votes
0answers
32 views
AngularJS: How to prevent route change from happening
I'm listening to the event $routeChangeStart and I want to be able to redirect the user to another controller based on a condition. I am able to visually redirect him to another controller with ...
-1
votes
1answer
47 views
Cannot call method 'path' of undefined when using Angular $location.path
I've tried multiple solutions found on SO but I'm obviously missing something fundamental as no matter what I try I cannot get the particle view to change on submission of a form (or click of a ...
0
votes
0answers
70 views
angularjs $location service and address bar changes with +,space in routeParams
I am using angularjs 1.2.10,ngRoute and the default html5 mode of false.
Using the follow url example:
http://example.com/#/route?message=test+message
In Chrome,firefox, and IE9 I am noticing the ...
0
votes
0answers
36 views
Angularjs — Using directives for data load or resolve
I'm working on a large mobile application and I've come across a debate. Currently I have the resources for the various rest api's wired into a directive which then loads the data into the scope at ...
0
votes
1answer
51 views
Angular best practice (in this situation) for passing data between controllers - service or routeParams?
I'm fairly new to AngularJS and I realise this question has been asked before (so hopefully I wont get voted down) but I've been unable to find a question matching my situation.
I want to pass search ...
1
vote
0answers
48 views
Angularjs Nested states: 3 level
I am using Agnularjs and Ionic Framework. I am trying to achieve a nested states, which looks like below,
Eventmenu(root)
Home (2 level)
Home 1 (3 level)
...
0
votes
1answer
46 views
Yeoman Angular not working with ngRoutes
I just created a new Yeoman angular project. The basic site worked when I started grunt serve. I tried to modify the project to use ngRoute so I could add more views, but I can't get any of the views ...
1
vote
0answers
31 views
Angular Web Project Not Changing Pages
I have a Java Maven Webproject that is using Rest. I cannot get the project to navigate more than a single time away from the index.html. I have attempted to use various applications of routes ...
1
vote
1answer
20 views
having trouble using the angular.module directive to create a new module
I am having trouble using the angular.module directive to create a new module. here is the code to create the module:
angular.module('dcuapp', [])
.config(dcuRouter);
function ...
2
votes
2answers
67 views
AngularJS ui-router reverting to otherwise when ng-click is used
I'm playing around with AngularJS as a learning exercise. I'm trying to get to grips with AngularJS ui-router (https://github.com/angular-ui/ui-router) and I've hit a bit of a brick-wall with an ...
0
votes
1answer
185 views
Error Uncaught Error: [$injector:modulerr] angularjs
I am using angularjs routing, but getting below error...
<title>Angular js</title>
</head>
<body><div data-ng-controller="SimpleController">
...
1
vote
1answer
40 views
$route change events vs. $('window').load() in Angularjs
I have a directive where I'm dynamically calculating the height of each li in an ajax-driven ng-repeater, finding the tallest one, and then setting all sibling li's to have the same height as the ...
0
votes
1answer
185 views
AngularJS with ASP.NET MVC5 - using routeProvider with templates but also adding angularJs bound data in _Layout.cshtml
Good morning,
I am building an MVC5 application that includes a SPA (single page application) which runs in a small part of my bigger ASP.NET MVC5 application.
So here is my angular app setup:
var ...
0
votes
1answer
33 views
Error in component $injector
I am loading my views in my app.js:
// create the module and name it testApp
var testApp = angular.module('testApp', ['ngRoute']);
// configure our routes
testApp.config(function($routeProvider) {
...
0
votes
2answers
147 views
Using AngularJS routing with a single-page web app
I read about angularJS routing. I want to implement it in my web app, but unfortunately I have a rather difficult situation changing to routing now I think. This is how my app works now (and I know ...
0
votes
1answer
60 views
properties from resolve object not passing to controller, unknown provider error
Before voting this down, yes this question has been asked here already, and answered, but the answers are not satisfactory. They all correctly suggest to add the controller in the route configuration, ...
0
votes
0answers
38 views
Using Google Chrome back button only ng-view content is loaded
There is a problem when navigating back:
Only a portion of the previous page is rendered and that is the portion loaded from "templateUrl" and rendered in ng-view.
I am using manual bootstrap :
...
0
votes
0answers
15 views
angular $routeSegmentProvider traverse routes
I use $routeSegmentProvider. I inject to my controller $routeSegment. $routeSegment tells me about the route which was parssed to build the current page (chain propertie). What I need in my service is ...
0
votes
1answer
33 views
Angular routing for POST URLs
The tutorial on Angular's website for Routing and Multiple Views shows an example where one partial page has snippets like:
<a href="#/phones/{{phone.id}}">{{phone.name}}</a>
It means, ...
0
votes
1answer
46 views
AngularJs - my view gets reloaded when clicking any link on the index page
I have an AngularJs app with start up page as index.html and I am routing the user to projects page by default. The issue is whenever I click the dropdown-toggle link in my index.html page the ...
1
vote
0answers
38 views
AngularJS $routeProvider can't specify groups of optional parameters
I have an angular view that displays a list and an optional detail of an item with a compound primary key (because the list aggregates results from multiple databases).
When an item from the list is ...
0
votes
2answers
249 views
Server redirect to login url from AngularJs page containing # (hash) sign
I use Spring Security to deal with session timeout. My application also uses AngularJs.
I have the following issue:
If the session times out and a user issues a non-ajax request from an angularJs ...
0
votes
1answer
45 views
Changing routes doesn't refresh data, gives ng:areq error
In my AngularJS app, I have a route that looks like:
.when('/:project/:page', {
templateUrl: '/ui-editor/editor',
controller: 'EditorCtrl'
})
In a view, I have a link that looks like:
...