Tagged Questions
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
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
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
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:
...
0
votes
1answer
104 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
60 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
38 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). ...
1
vote
1answer
442 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
450 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
314 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
95 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 ...
4
votes
2answers
3k 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 ...
0
votes
0answers
93 views
can't connect json file
I tried to learn the Tutorial / step_08 at http://docs.angularjs.org/tutorial/step_08
But I could not connect the JSON to the Template and the main HTML page.
I've included the code I wrote - I'd be ...
0
votes
1answer
283 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
165 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 ...
0
votes
0answers
92 views
Share data between controllers using permalinks?
I would like to share data between controllers using permalinks, rather than signals or factories.
Given a single page application, with three controllers (Ctrl1, Ctrl2, Ctrl3), and a predefined ...
3
votes
2answers
229 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 ...
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 ...
1
vote
1answer
320 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
...
4
votes
4answers
9k 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 ...
0
votes
1answer
361 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 ...