Tagged Questions
0
votes
4answers
24 views
angularjs maintain the scope variable across routes
How do I maintain the model across routes. for eg I have a list of profiles loaded onto the home page. The home page also contains a "load more" action to load more profiles, basically pushing data to ...
0
votes
2answers
32 views
bootstrap carousel does not work correctly using partial file
I am new to bootstrap and AngularJs. I am using bootstrap and Angular Js for my current application. When I use the bootstrap carousel directly inside the index page, the carousel's slide link are ...
1
vote
3answers
21 views
Angularjs route executes twice with particular querystring
I'm developing a SPA AngularJs application, that has to deal with some particular legacy URL's.
I am using the basic $routeProvider that works fine, with one exception: when i invoke a special url ...
0
votes
1answer
16 views
Should resolved objects be tested in routes unit test in Angular?
Currently in routes unit test I'm testing if appropriate controller and template are called, like seen here.
Also, in some routes I have resolved object. I can access them like:
...
0
votes
3answers
28 views
Dynamic routes for angularjs
I want to have a routes that would look like such:
$routeProvider.when('/trial/:extention/:id', {templateUrl: 'partials/quran.html', controller: 'QCtrl'});
$routeProvider.otherwise({redirectTo: ...
0
votes
1answer
52 views
angularJS template url is not loading automatically
It's loading when I type a char in input type="search".
Page is calling 'ajax call' twice. request is fire twice on 'single click' or 'onPageload'
index.Html
This is my html file which has a ...
0
votes
1answer
29 views
Resolve in router is not updating scope in time
Hello there,
I have issue with manipulating with scope variables (with resolve in router) before angular view content is renderer. I am using AngularJS 1.2.16
I have view, where is DIV displayed ...
0
votes
1answer
34 views
AngularJS: multiple edit forms routing?
I have a listing of Requests each with a Request_Type_Id which maps to a feeder list (which could grow as the application evolves). For example, we might have (id, request_type) 1 - Sales Information, ...
1
vote
2answers
26 views
AngularJS: Recommendation on rendering different view when HTTP 404
What I am doing
I am trying to create a service which loads the user budgets for current month. The code looks like
$scope.thisMonthBudgetSummary = function () {
console.log('retrieving ...
1
vote
1answer
39 views
Can we make hidden routes with angularjs?
I want to know if it's possible to make some hidden routes with angularjs, for example I have a category and sub category, in my application I have
.when('/category/new' ,{
controller : ...
3
votes
2answers
190 views
AngularJS: Two Parallel Views, One URL
I'm building a dashboard/control panel app that is basically made up of two tabs (bootstrap) at the root level, called "dispatch" and "admin". Each tab has a good bit of its own multi-tiered ...
0
votes
1answer
63 views
Single Page Application angularJS
I was developing a sample application to learn AngularJs.
There are three links that show up three different templates in the ng-view .
main.html has the three links.
...
0
votes
1answer
44 views
ngRouter/uiRouter preserve controllers when changing view
Is there anyway to preserve route controllers in Angular when using routing?
Everytime I change the view, the old controller is destroyed and a new one created, but I was wondering if there was a way ...
2
votes
2answers
38 views
How to reuse controllers in AngularJs when success locations are different and $location.path('..') is not supported?
Right now the $location service is getting in the way. Suppose one wants to use the same controller for multiple routes, however the expectation is that upon a successful 'save' the destination ...
1
vote
1answer
28 views
AngularJS $location not updated properly when using $routeProvider
I have an Angular JS application with a defaultController which controls the header of the app. Then I have some other controllers one for each view. The views are loaded in the <main>. I load ...
0
votes
0answers
8 views
Routing dynamic Paths recursively in AngularJS
I want to build something like a directory browser with AngularJS. Is is possible to route paths with ng-route? I'd like to parse URLs like this: myapp.com/#/folder1/folder2/.../folderN
2
votes
0answers
36 views
IE favicon disappeared when navigating other page in angular application
I found an issue with angular application.
I have a the location provider setup to use the html5Mode true:
$locationProvider.html5Mode(true);
I noticed that the favicon is disappearing when ...
0
votes
0answers
19 views
AngularJS remembering page scroll location
I have multiple pages of data that lists publications by author. The first page lists all the publications and has infinity-scrolling implemented.
Another page allows you to filter by author, and ...
0
votes
1answer
50 views
AngularJS Routing not doing anything not working
I have following PhoneCat tutorial combined with an angular seed project. Now i come into the problem, i can't get routing to work / load, no errors occur and everything seems fine. Can't even seem to ...
0
votes
1answer
28 views
AngularJS Multi-Level Default Routes
In AngularJS, I wanted to send all my routes to a single controller - so I figured - why set up routing at all?
It seems simpler to get route information with $window.location.pathname.split("/");
...
2
votes
1answer
37 views
Responsability of a controller in AngularJS - More than two views?
I come from the Rails world, where a controller is responsible to do business logic but a single controller can render several views, depending on the action that is supposed to do.
However, and ...
0
votes
1answer
74 views
Routing with controllers in these html pages, is it possible?
I'm new in AngularJS development and I'm actually in front of a problem.
In my index.html I have already many scripts included like that :
<script type="text/javascript" ...
0
votes
0answers
26 views
Angularjs routing manual refresh
I have an SPA anularjs app with a few pages.
Router Provider is configured as follows:
$locationProvider.html5Mode(true);
var path = 'web/partials/views/';
$routeProvider
.when('/', {
...
1
vote
1answer
97 views
AngularJS how to change location path in routeChangeStart event?
in my application I'm using some query string parameters to resolve links for preselecting some data. But this parameters I would like to hide for users. For example I'm using routes like this ...
0
votes
1answer
47 views
AngularJS route does not render the template
I have two controllers and I'm using the AngularJS $routeProvider to load multiple pages. When I click on the link from the first partial to go the second one, the second partial does not render, and ...
0
votes
1answer
73 views
AngularJS: Getting ngRoute working
I'm working on a new Angularjs webapp where I have to use ngRoute. I'm a bit confused first, because routing doesn't work at all in my case – I always end up at index and MainCtrl.
in index.html I've ...
0
votes
1answer
58 views
AngularJS Routing and ng-view issue
Hey everyone I am trying to work through a tutorial for Angularjs, and am stuck on some routing issues.
It seams like the route is actually working but no content is showing up in my section.
here ...
0
votes
2answers
125 views
Problems with AngularJS $location.path
I am having fun and games with a troublesome AngularJS route, so lets see if I can explain this as well as I can.
APP.JS:
app = angular.module("index", []);
app.config(['$routeProvider',
...
0
votes
1answer
28 views
Routing resolve does not work if resource returns error code 400
In my app.js i have:
resolve : {
resetCodeCheckData : function(resource) {
return resource.get().$promise;
}
}
But if ...
0
votes
4answers
56 views
AngualrJS routeProvider routing to the wrong template
I've the following 2 routes in my app.js file, for some reason I don't know when I try to navigate to /clients/new-invoice I see the /clients/:clientID route and template. The only way I can go to the ...
0
votes
1answer
53 views
AngularJS routes not working in Chrome extension
I have an AngularJS app that works fine in the browser when served by 'grunt serve'. However, trying to run the app as a Chrome extensions fails. The initial page (the '/' route) displays, but when I ...
1
vote
3answers
53 views
angularjs using variables in templateUrl
Im trying to use $scope in my templateUrl like this:
app.config(['$routeProvider',
function ($routeProvider) {
$routeProvider.
when('/blog', {
templateUrl: 'themes/{{ ...
0
votes
0answers
62 views
angularjs ui router directive after ui.view loaded
I've got a mixed menu I mean
there is my animation + ui-router animation
html
<ul class="nav navbar-nav">
<li data-ng-class="{ active: $state.includes('index') }"><a ...
0
votes
1answer
36 views
When Arriving at AngularJS-driven site, routed to / instead of actual link
I have a site built with AngularJS. I use $routeProvider to define a bunch of routes. They all work fine when I am in the site already. Let's take the following:
rooturl.com#/services/myservicename
...
1
vote
1answer
78 views
Angularjs adding $scope.$watch after $routeProvider's resolve
I'm having an issue where I am trying to watch a certain element from my scope after the resolve is done. For some reason, it gets run when i run the second line from this snippet and I dont seem to ...
0
votes
1answer
76 views
AngularJs route.reload(); infinite loops
i'm a newbie in AngularJS, i got some Jsonp files witch they're generated by drupal.
My problem come when i'm trying to show the informations of my articles on my view.
<!-- Script JS -->
...
0
votes
1answer
28 views
AngularJS Route - custom validation, then check other routes
Say I have a route like "/:department", where department can only be books, music, etc. firstly, how do I enforce this constraint prior to controller/template selection, and then if its not valid, how ...
0
votes
0answers
48 views
Django angular database form integration
I am currently trying a few ways of connecting a postgre sql database that I already have defined using a django model with a front end angular form that I created within the same project. (This a a ...
0
votes
1answer
81 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
74 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
107 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
46 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
75 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
90 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
107 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
72 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
96 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
2answers
27 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
59 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
62 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 ...