Skip to main content

All Questions

Tagged with
0 votes
1 answer
384 views

Communication to Child Controller

This is a simple AngularJs application with two nested controllers. We need to pass data from the parent to the child Controller. The first thing you find when googling for a solution would be this, ...
LocalHorst's user avatar
10 votes
1 answer
225 views

Baseball player statistics controller

I'm somewhat new to JavaScript and AngularJS, and read in Doug Crockford's book that hoisted function declarations can lead to issues. If you have any pointers on how to structure my file, those would ...
dusk's user avatar
  • 101
2 votes
3 answers
11k views

AngularJS controller to fetch and display employee data from database

This is the code for an AngularJS controller that I've written: ...
cst1992's user avatar
  • 151
1 vote
1 answer
80 views

Angular Box Color Exercise

I have completed an exercise where there are 4 different color boxes and 1 main box below them that is blank, when you click on one of the colored boxes, the main box changes to the color of the box ...
WinchenzoMagnifico's user avatar
3 votes
1 answer
60 views

Controllers for interacting with a vacation service

I have a controller called VacationController; in this controller, I retrieve a list of vacations which will be displayed in a grid. In the grid, I have the option to create a new vacation through a ...
DAG's user avatar
  • 199
2 votes
1 answer
155 views

Handling success and failure when retrieving product information

I've got an Angular controller where I have two functions that are repeated inside two functions: ...
Jonathan Solorzano's user avatar
2 votes
1 answer
571 views

AngularJS to-do list controller

I am new to Angular. Am I following best practices here? I understand controllers should not do too much. My controller seems to have a lot of logic here. Can I do anything to improve it? It is just a ...
asdf's user avatar
  • 217
0 votes
1 answer
50 views

updateBuildChart method with a lot of dependencies

I've some refactoring issue with one method. This method has a lot of dependencies ...
Viktor's user avatar
  • 181
3 votes
1 answer
103 views

Using one service ($http) on all the controllers

I have recently started working on angular.js and I like it. I have decided to use a single controller per view. I use the json data from the backend. As my work is progressing, my codes are getting ...
Thomas Sebastian's user avatar
5 votes
1 answer
857 views

AngularJS trivia game - separating controller from directive

I am creating a trivia game (purely for learning purposes) using AngularJS, NodeJS and MongoDB. My concern is related to the way I am organising the code in AngularJS. So far the game is functional, ...
Roco CTZ's user avatar
  • 153
5 votes
1 answer
33k views

Developing an alert notification in AngularJS

I'm studying Angular and want to develop my own notification alert. This is what I done, I like it and it's working like a charm but I think that it can be improved: Do I need to use it in conduction ...
Thales P's user avatar
  • 153
4 votes
1 answer
92 views

Is this approach correct when testing an Angular controller?

I'd like someone to review these tests to make sure I'm along the right lines in Angular testing. Note - They do all pass (great) but I feel like I'm struggling to understand the finer points of ...
Katana24's user avatar
  • 327
14 votes
2 answers
8k views

AngularJS Todo List - too much controller logic?

I am starting an angular app and I was wondering if I am on the right track with this. I worked on my last angular app when I was just a youngun who didn't understand the important of designing the ...
evwill's user avatar
  • 143