Tagged Questions
0
votes
1answer
14 views
Angular service reset when changing page through Angular routes
I have multi page signUp form , I need to persist data until last step , so that user can jump to any step back and edit.
I am using service "User" as singleton object for all six steps.
...
1
vote
0answers
38 views
Route with Arguments and Resolve Loads Angular More Than Once
This is working code from this question that receives and renders the data.
var app = angular.module('app', ['ngResource', 'ngRoute']);
app.config(function($routeProvider, $locationProvider) {
...
0
votes
1answer
262 views
UI-Router: sequential resolve of parent and child states
I have two abstract states parent and parent.child, and an activateable state parent.child.grand.
I want parent to be promise resolved before parent.child.grand gets its resolves executed. Why? ...
0
votes
2answers
29 views
Angular JS UI Routing
I am trying to use angularJS UI routing. I have three webpages, clients can access the first page through some link but if the url has a token attached to it I am doing a $state.go('second-page') in ...
0
votes
2answers
24 views
Using ngRoute and getting 404 Error
All, I was reading The tutorial of $route.
and try to get the example work against my IIS. When I click the link in the page. The address of chrome will be changed like below.
And when I tried to ...
1
vote
2answers
55 views
+50
Getting Jasmine to Work with Angular JS
I am trying to get Jasmine to work with my Angular JS Project But I always keep getting the following error. I am trying to get it to run a very very simple test. Also I have setup the angular js ...
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 ...
1
vote
2answers
39 views
Angular's “controllerAs” not working in routeProvider
I am trying to use the controllerAs property on a $routeProvider route without any success.
Here is the sample code:
var app = angular.module('app', ['ngRoute']);
app.config(['$routeProvider', ...
0
votes
1answer
41 views
AngularJS crashes when I define a route with two parameters in it
As per the title, as soon as I add the route:
.when('/cluster/:clusterName/node/:nodeId', {
templateUrl: 'partials/node/view.html',
controller: nodeViewController
})
and try to ...
0
votes
1answer
24 views
Angular resolve user on startup
Hoping this is an easy one!
I want to make sure the user accessing the application is resolved before showing any screens or calling any subsequent services.
I can resolve the user through making a ...
0
votes
1answer
25 views
Angular routing was ignored
I have module Board with routes:
@Board.config ($routeProvider, $httpProvider,$locationProvider)->
# Code
$routeProvider
.when '/boards/:board_id/topics/new', {
templateUrl: (p) -> ...
-1
votes
0answers
20 views
Get predicted $location.path for any url in AngularJS
In my Angular application I have a bookmark like feature where I want to persist application routes.
I want the persisted data to be still valid even when the application url changes, so I thought ...
0
votes
1answer
131 views
Browser's back buttton doesn't work without refresh in Angular app
I have an Angular app, which has several ng-controllers and several templates. And here is a snippet of my routing:
when('/claims', {
templateUrl: '/angular_templates/index',
controller: ...
0
votes
0answers
28 views
Store the value from url params using angular js
var x = $location.search('filterBy=')[1];
$http({method: 'GET',url: '/asasa/sddd?websiteId='+x}).success(function(data) {
$scope.onlinedata = data.coupons; ...
0
votes
0answers
18 views
Executing php code issue caused by angular routing
This php code works standalone but if it gets injected via angular routing the if statement does not accept the submit from the input:
The PHP Code:
<?php
if (isset($_POST['submit'])) {
echo ...
1
vote
0answers
21 views
How to structure AngularJS and PaperJS project
The idea is to make use of Angular in a simple canvas game development. In theory the project should benefit from being more systematic, manageable and scalable. This is not a sprite/tile/collision ...
0
votes
2answers
20 views
AngularJS html5Mode fallback in IE. Express server needs to know route
I'm using html5Mode=true with AngularJS routing. Works fine. When I access the site with IE, Angular routing falls back to Hashbang URI's like http://example.com/#!/route-name. That's all fine. Except ...
0
votes
2answers
25 views
How to stop execution of Controller with $routeChangeStart in angularjs
I am setting session on login and after that I am preventing LoginCtrl to be called as it is resetting session.
I have a setup of routes where if any undefined route is called it takes to /login But ...
1
vote
2answers
30 views
AngularJS route does nothing
I am a newbie, trying to understand routing, I read the documentation and i injected ngRoute module, but still when i am trying to click on Employee Name its not showing any thing, i have wasted lot ...
-1
votes
0answers
18 views
Change SPA address in Google
I first created single page application website with Angular using the default hash sign in URLs (e.g. URL v1 http://example.com/#/main).
Then I changed to hashbangs for making my SPA crawlable (e.g. ...
0
votes
0answers
35 views
template instead of templateUrl in angularjs and Asp.Net MVC?
I am using AngularJs in Asp.Net mvc 4. I would like to use the template in $routeProvider instead of templateUrl
I wan to use this one
$routeProvider.when('/url', { template: ...
1
vote
2answers
43 views
Crawling a website that uses angular routes
I have a personal website that I use for some of my motorbike racing. I created it recently using node and angular. I decided to try angular routes for my page navigation etc. I think it worked well ...
-1
votes
1answer
37 views
AngularJS Trying to use ng-click with ng-switch but ng-switch is not switching my divs
AngNoob here. I have some global navigation that uses the routeProvider to swap out external html pages inside the view. Within the view i set up a list type sub navigation (created with ng-repeat) ...
0
votes
1answer
19 views
controller does not recognize routeParams variable passed from routeProvider
<script>
var app= angular.module('myApp', ['ngRoute', 'ngResource']);
app.factory('Greeter', ['$resource',function($resource){
return $resource(
...
0
votes
0answers
20 views
Is it possible to transition between named views with ui-sref in the same template file?
Here's my code
// DEMO
.state('demo', {
abstract: true,
url: '/demo',
templateUrl: 'views/templates/demo.html',
controller: 'MainCtrl'
})
// PAGE ONE
.state('demo.one', ...
-3
votes
0answers
25 views
how to pass json object between different controllers in angular js? [duplicate]
Like in asp.net mvc, we use ViewBag, ViewData, to pass in objects between different views. How do i pass in a Json Object between 2 different controllers using angular js?
1
vote
1answer
27 views
Angular js api url call not working
app.controller('Ctrl', function ($scope, $http) {
$http({method: 'GET', url: "/api/v1/coupons-dunia/coupons-by-website?websiteId=1"}).success(function(data) {
$scope.onlinedata = ...
0
votes
1answer
37 views
Angular routing with bootstrap carousel issue
I currently have an issue which im unsure of how to solve or if it even can be solved. I am currently using Angular JS and Bootstrap 3.0. Within my Angular project I am using routing but on my page ...
0
votes
0answers
32 views
Routing in AngularJS is not working. '.config' keyword is not identified
I have used routing in AngularJS in one of the applications. It is working fine and .config is highlighted by webstorm as shown below. It is able to identify the command/keyword.
It is shown as
'Non ...
0
votes
1answer
30 views
angularjs pretty url is not working
My problem is url is not working without # . Here is my code :
angular.module('Hiren', ['ngRoute'])
.config(function ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
...
0
votes
1answer
54 views
Angular route won't load templateUrl
I can't seem to load the templateUrl using the angularjs routing.
Using django and angularjs.
What I do is go to 127.0.0.1:8000/phones/, it redirects me to 127.0.0.1:8000/phones/#/
Then, I refresh, ...
0
votes
1answer
36 views
Can I pass multiple controllers in $routeProvider.when() in angularJS?
I tried searching for this on various threads, but I can't conclusively understand this.
test.config(['$routeProvider', function($routeProvider){
$routeProvider
.when('/',
{
...
0
votes
1answer
22 views
Where is the controller placed using $routeProvider?
With ng-controller="myController" you know exactly what DOM element is associated with the controller, because it's put directly into your HTML:
<div ng-controller="myController">
with ...
0
votes
0answers
41 views
angularjs html5 hash url
I am using server side google oauth in angular.js,
Suppose my redirect url is localhost:8000/redirect. To remove # in angularjs I am using
$locationProvider.html5Mode(true);
But, when i visit the ...
0
votes
0answers
34 views
Google Maps Wont Work in AngularJS after routing
I am writing an app that has a Google Maps Embed. This Embed showed before I did some routing but now it wont work. Is this a common issue with AngularJS? If not, which I assume it isn't, can someone ...
-1
votes
1answer
42 views
Routing in AngularJS
I am new to angular and trying to implement Routing in one of my sample application,but its not working.Can somebody guide what i am doing wrong.Here's the link of my sample app.
<!DOCTYPE ...
0
votes
1answer
17 views
Show form using custom directive - AngularJS
I have a button with ng-click function. When I click the button, it should show the form which is coded in a templateUrl using a custom directive.
Which function should I use to get the screen ...
0
votes
1answer
49 views
angular $location,$route lifecycle events fired off twice when browser encodes url
using angular 1.2.10
UPDATED: issue is also occurring in latest legacy(1.2.21) and beta
versions(1.3.0-beta.17
I provided a simplified example that demonstrates the issue I am encountering ...
0
votes
2answers
44 views
Angular Route & pagination in angularJS
I'm doing a pagination in angular-ui-bootstrap
searchapp.config(function ($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true);
$routeProvider
.when('/search?page', {
...
-1
votes
1answer
37 views
Strore urls in a separate file
I am working on Angular Routing and have URLs hardcoded directly in my javascript file. However, I would need to keep these URLs in a separate file, where should I keep it preferably? I can't map them ...
0
votes
1answer
48 views
AngularJS $routeChangeSuccess callback arguments
I'm new to AngularJS and am confused by the documentation regarding event listeners.
The documentation lists the following for the $routeChangeSuccess event:
$routeChangeSuccess Broadcasted after ...
0
votes
0answers
30 views
fetching the selected dropdown value in AngularJs
I have a dropdown menu which I coded using Bootstrap and I populate the data form the scope. How do I fetch the selected value from the controller whenever there is a change in the dropdown field.
...
0
votes
0answers
22 views
Google Maps is not displaying correctly
I have created an app that uses Google Maps, the map showed up before I did my routing. But after routing it wont display. Here is my code for the map.
JS:
(function() {
mapController.$inject = ...
0
votes
1answer
35 views
Updating the data in the angularjs service and controllers
I have a angular service called 'NoteBooksService':
app.factory('NoteBooksService', function() {
var permanentStorage = window.localStorage;
// Initializing the local storage if no data ...
-1
votes
1answer
34 views
Angular JS: how to change view in ng-view
I have navbar,sidebar and container. for each item in navbar have different sidebar.
Ex: - If i click Nav A, it have sidebar A, B, C. - and if i click Nav B, it have sidebar D, E, F and for each ...
1
vote
0answers
33 views
getting an error : Argument 'ctrl' not defined in angular js
my index.html file has the following :
<script src="scripts/controllers/form/DashboardCtrl.js" />
<script src="scripts/controllers/chart/morrisChartCtrl.js" />
my app.js file is as ...
0
votes
0answers
16 views
Is there a 'standard' way to get to the values in $$route?
I am currently using $route.current.$$route to get at some "non-standard" parameters I am attaching to route objects via the $routeProvider. Non-standard because they're not the three properties ...
0
votes
1answer
26 views
AngularJS Routing for Google Maps
Im having trouble getting my second view to show up in my app. What the app is supposed to do is list locations, when you click on a location it is supposed to route to a different view with a Google ...
-1
votes
1answer
35 views
POST 404 Not found.. Angular js
here i'm sending data through $http.post to data/user.php
app.factory('loginService',function($http){
return{
login:function(data,scope){
var ...
0
votes
0answers
45 views
innerHTML removed when angularjs reloads the ngView
EDIT
If I put the data into a global object, I can check the global object for content. If the global object already has data, kill the function, don't run another AJAX request and inject HTML from ...