0
votes
2answers
42 views

Multiple AngularJS apps on page

I'm a noob in AngularJS, therefore sorry for stupid questions. What I'd like to do is to use the same application in two (or more) places on a page. For that I've created two HTML elements and have ...
1
vote
1answer
41 views

AngularJS routing with id parameter ends in white page

var app = angular.module('application', [ 'ngRoute', 'ui.bootstrap' ]); // configure our routes app.config(function($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); ...
1
vote
4answers
36 views

AngularJS AppCtrl wait for HTTP event to success

I'm all new to AngularJS and need some help, I have a "AppCtrl" and from there I have a HTTP webservice call - and need the webservice call response accessible in my other controllers. ...
0
votes
1answer
29 views

Scope inheritance fails with multiple-named views?

It breaks when moving from (Plnkr): .state('home', {url: '/home', template: '<pre>{{parentProp}}</pre>', controller: function ($scope) {$scope.parentProp = ['home'];}}) ...
0
votes
1answer
31 views

Dynamically switch ng-include between controllers

I have the following bit of code for my navigation that I want to update dynamically between pages. <nav ng-include="menuPath"></nav> Here is my app and routing set up var rxApp = ...
0
votes
1answer
21 views

AngularJS adding content to the routing for a back button

.when('/football', { templateUrl : 'assets/pages/football/home.html', controller : 'footballController' }) .when('/football/teams', { templateUrl : 'assets/pages/football/teams.html', ...
0
votes
2answers
28 views

AngularJS load in controllers that are in separate files

app.config(function($routeProvider) { $routeProvider // route for the home page .when('/demo', { templateUrl : 'assets/pages/home.html' }) ...
0
votes
1answer
53 views

Angularjs $scope value updated in second controller not visible in view

I have one html file and a controller assigned via $routeProvider .when('/page/:pageId', { templateUrl: 'xxxx.html', controller: 'PageCtrl' }) and in the ...
0
votes
1answer
27 views

Passing parameters to the route on button click

I am new to AngularJs. I have a search box with a button which hits the route defined in the config of Angular application. <div class="search-block clearfix"> <div class="input-group"> ...
0
votes
1answer
47 views

How to pass $scope data between two partial files in angularjs

How can I pass data in two partial html files using angularJS, totally weird cant get through it. I have one index file [fine.], I login and reach view5 [partials/blog.html] which is written in ...
1
vote
1answer
57 views

Angular JS deep linking will refresh view

I'm going to try my best to explain this problem. I am also new to Angular so bear with me. I have two routes that use the same template... ExampleApp.config(['$routeProvider', ...
0
votes
1answer
46 views

Angularjs initialize $on in other controller?

i have a normal navbar with a menuController, this is the parent. in this menuController is a method 'sendData()' with a broadcast method and a location call "$location.path('/page2')" which ...
0
votes
1answer
34 views

Loading the partial files after the http call inside the controller

I am having a controller and a partial file. The partial file tries to access a variable which was set by the controller. But the issue here is that the controller populates the scope object with the ...
0
votes
1answer
84 views

Passing javascript variables from controller to partial file in AngularJs

I am new to AngularJs. I have put a url value in the scope variable inside a controller. This value should be used in the partial file corresponding to the controller inside a javascript function. How ...
0
votes
1answer
55 views

Set radio button state based on a value received from REST in AngularJS

What I would like to achieve is set a radio button's state according to the data retrieved from the server in AngularJS. What makes this more special is that I need to show a div based on a condition ...
0
votes
4answers
129 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
1answer
40 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 ...
1
vote
2answers
50 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
55 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
2answers
100 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
0answers
32 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 ...
1
vote
1answer
183 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
282 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
109 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
3answers
42 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
1answer
98 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: ...
0
votes
1answer
1k views

Authentication in passport.js , used with angular js

I came to know the use of authenticate method in passport.js from the below link http://passportjs.org/guide/authenticate/ In my project I have the below code: app.post('/login', function(req, res, ...
0
votes
1answer
187 views

view model(scope) not binding to the view(html) when routing using angularjs ngRoute

Here is my Index.cshtml, and I have 3 controllers. The MainController, View1Controller and View2Controller. <!DOCTYPE html> <html> <head> <script ...
0
votes
0answers
54 views

Problems with returning to a previous rendered view in angularjs

I am having issues with something which might imply I am missing something conceptual. I am using a view with a controller which populates from a couple of different services(asynchronous). ...
3
votes
2answers
307 views

Single page app, permalinks and ngView?

This is my current setup, with each column being represented by a controller: <navbar></navbar> [column1] [column2] [column3] <footer></footer> Additionally each column has ...
5
votes
4answers
12k views

AngularJS: Multiple views with routing without losing scope

I'm trying to implement a classic list/details UI. When clicking an item in the list, I want to display an edit form for that item while still displaying the list. I'm trying to work around Angular's ...
4
votes
2answers
4k views

AngularJS: Resolving not in RouteProvider but in Controller?

I saw some sample code here Delaying AngularJS route change until model loaded to prevent flicker And straight away I though this was the right way to go, I need to have my controller LOAD only when ...
1
vote
1answer
875 views

method overloading \ overriding in AngularJS

I have a scenario, i which I have a share button, I have a container controller, called metaCtrl, which is on the html tag. And also inner controllers. I have a share button, that calls the ...
0
votes
1answer
568 views

Sharing a webservice's data across controllers in AngularJS

I have 2 big issues with an Angular app, I'm completely stuck and hoping someone out there can help me. My method of sharing data from a web-service out to multiple controllers is flawed and I don't ...
1
vote
1answer
538 views

.config .run and 2 x config, where to put changeroute .. appctrl, config, run or what?

I wanted to find out the different to .config and .run functions in angularjs. I was using my .config for setting up routes of course but i did have some $on for watching route change starts and ...
1
vote
2answers
101 views

AngularJS partials with URLs in directives - best practice?

I quite like how angular-ui has created ui-routes, which provides named routes (among other things). Though likely a simple directive to write—a wrapper for ui-view—I am not sure if it is best ...
0
votes
1answer
355 views

ngController method called twice

I've got an angularjs app with a nav bar inside my index.html page like that : <div class="navbar navbar-inverse navbar-fixed-top" ng-controller="NavCtrl"> <div ...
0
votes
2answers
183 views

How to set a model for a single view in Angular JS?

I've got a controller in Angular JS. In this controller i've got a $scope.users property : it's an array of users. This controller is used by two views: /users and /users/:id. I've seen that the ...
1
vote
1answer
352 views

AngularJS memory leak with ng-switch? Can someone solve this?

I've built a custom routing method for angularjs and I use this to control ng-switch within my app in order to create multi level deep linking. http://plnkr.co/edit/beAm3WRomMafKzx1SoSZ?p=preview ...
2
votes
1answer
2k views

angularjs Directive not reacting to attribute change

I have a chat directive that I use to place a chatroom in on the page. mod.directive('chat', function () { return { templateUrl: '/chat', replace: true, scope: { chatID:'@chat', ...
0
votes
1answer
1k views

AngularJS: service query returning zero result

my app.js looks like var app = angular.module('pennytracker', [ '$strap.directives', 'ngCookies', 'categoryServices' ]); app.config(function($routeProvider) { console.log('configuring ...
0
votes
1answer
657 views

How to show one item from array in angularjs?

So im writting front-end for one simple app, and im stuck on one thing. There is a news list page which should take user to single news page. All news are in one array, which is sitting in the news ...