All Questions
Tagged with controller javascript
24 questions
2
votes
0
answers
91
views
Retrieve file and other input fields from JavaScript to send to ASP.NET Core
I am currently developing an e-commerce website where users can upload their photos to customise their products. The use case begins when the user selects a product from our website (e.g. shirt). ...
2
votes
0
answers
68
views
Controller to execute AJAX requests for a client
I have been developing this structure or pattern (I don't really know how to call it). It's my first time doing something like this, and I'm a bit worried about the future, if it becomes unmanageable.
...
0
votes
1
answer
398
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, ...
10
votes
1
answer
238
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 ...
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:
...
1
vote
1
answer
84
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 ...
8
votes
2
answers
3k
views
Sails.js controller method for an admin to update a user account
I am new to Sails.js, Node.js, and web application development in general. My current understanding is that well-written controllers should be "skinny" meaning they should be as simple as possible, ...
3
votes
1
answer
62
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 ...
2
votes
1
answer
165
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:
...
2
votes
2
answers
86
views
Controller method to validate and save
I have built RESTful web services. The services endpoints have a similar logic:
If the input validation succeeds, do a database operation and return the result.
If the db operation fails, return the ...
2
votes
1
answer
581
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 ...
3
votes
1
answer
162
views
Django view and template for a virtual zoo
I have a Django view and template that work together, but I think I probably did things in a crappy way. I basically have many dynamic values that I want to display on the page, and in two different ...
0
votes
1
answer
54
views
updateBuildChart method with a lot of dependencies
I've some refactoring issue with one method.
This method has a lot of dependencies
...
1
vote
1
answer
117
views
Adapting new design pattern with post handler
I'm currently using this pattern in my JavaScript code. Somewhere in my code I use Dnianas.Post.init. init fires and it will ...
2
votes
1
answer
520
views
Handling callbacks when doing async programming and dealing with scope
I'm using HapiJS to create a little backend for my side-project. In grabbing RSS feeds, I want to loop through my list of website URLs, grab the correct RSS links in the ...