Questions tagged [angular.js]
Code written using version 1 of the AngularJS open-source JavaScript framework. Use 'angular-2+' for code using later versions.
354 questions
1
vote
1
answer
85
views
2
votes
1
answer
509
views
Is returning promise form angular service bad?
What is the problem when I return a promise from angular service instead of Observable?
If it's a matter of any manipulation or side-effect, that I can easily do ...
2
votes
1
answer
85
views
CSV-simplified: A small open source project
I'm working on a small open source project called CSV-simplified for a course I'm taking (Bloc), and I'm looking for some feedback and potential collaborators. I don't actually know an programmers, so ...
3
votes
1
answer
107
views
Create objects corresponding to whichever field has value from among a list of fields
I have to create a form, which enables users to move stock of items to different statuses. The form will show the current stock(quantity) in a given status and then 5 input fields corresponding to 5 ...
2
votes
1
answer
98
views
show/hide components
The following code is used to show/hide components in an AngularJS app:
...
2
votes
1
answer
4k
views
Script to load controllers dynamically for AngularJS
I would like to hear your thoughts, idea's or feedback on the following code.
Ive added to code to github.
https://github.com/redbullzuiper/angularjs-dynamic-controllers
Usually when you attach a ...
0
votes
1
answer
77
views
Deep custom AngularJS Filter
I need to filter projects using a searchbar, it should filter all properties of the projects with a few exceptions. It's working, but it's extremely slow, where can I make optimizations?
The "_" is ...
2
votes
3
answers
116
views
Collecting a list of documents from a factory for an AngularJS controller
With this controller I'm injecting myFactory and using Array.push() to add the array ...
1
vote
1
answer
109
views
Chaining three promises in Angular.JS
I have demonstrated promise chaining where promise's p1,p2,p3 has to be resolved synchronously.
The code below is using angular.js 1, and here P3 is resolved then P2 and then P1.
...
2
votes
0
answers
1k
views
AngularJS Null coalescing operator filter
I am relatively new to AngularJS and am coming from a PHP background.
One of the new features for PHP7 was the Null coalescing operator.
In short, it checks if a value is set and if it is then it ...
2
votes
0
answers
249
views
AngularJS application for working with the Facebook API (using the cordova-plugin-facebook4 plugin)
I'm creating an application with AngularJS, and packaging it up with the Phonegap build.
I'm using the facebook API (phonegap cordova-plugin-facebook4) for user authentication and getting a user's ...
0
votes
1
answer
69
views
Managing JS objects while preserving references
Scenario
I have foo:
{
name: 'Mr. Foo',
value: 4
}
I receive bar from the server:...
3
votes
2
answers
616
views
Splice from Array if index matches
This code loops through an array called $rootScope.watchlist (uses AngularJS). It gets the current iteration of the loop to access that x iteration through ...
3
votes
1
answer
637
views
Returning the results of four $resource calls as a JSON array in AngularJS
Title pretty much says it. I need a way to elegantly handle multiple $resource calls in AngularJS. Right now, I just calling each other call on the ...
1
vote
1
answer
146
views
Tying the enablement of one checkbox to another using AngularJS and jQuery
I'm new to AngularJS, coming from a jQuery background and I have a situation I've solved but only by including jQuery in an AngularJS function. Something just doesn't feel right doing this and I was ...
4
votes
1
answer
2k
views
Step by step wizard
I'm currently working on creating a step by step wizard in Angular and twitter-bootstrap. I've actually got it to work as intended but as I'm looking to advance my skills I'd like to hear if you have ...
3
votes
3
answers
343
views
Use counter for ajax loader
I was using a Boolean var for indication of loading so my code looked like this:
(this example is in angularjs but i think it can be relevant for any ajax call handlers)
...
0
votes
1
answer
484
views
Generating a list of menus with AngularJS
Some days ago, I decided to start learning a JS framework in order to gain skills and become more useful at work. I choose Angular for the purpose, and started learning it by building up my "...
5
votes
1
answer
1k
views
Using chartJS in Angularjs to plot IOT data
I am a Javascript and AngularJS beginner.
Below is the code inside my chartController. What this does is get IOT data from a back-end call and display it in my front-end with a chart. There are two ...
4
votes
1
answer
1k
views
Displaying a table using DataTables and AngularJS
I am using DataTables to format and display a table. I started the project using AngularJS with a PHP backend but I needed to inject some Vanilla JS and JQuery code in order to use DataTables.
Is ...
4
votes
1
answer
167
views
Handling two datepickers in a form with angularjs
Here's I am using simple form with angularjs. Everything works fine. I am having watchgroup for EndDateFrom & EndDateTo datepickers. When it's defined I am logging the value to console. I am ...
2
votes
1
answer
4k
views
Performance problem with Angular and rendering a grid
I have a big problem with performance with a web application using AngularJS. I currently have a grid that renders an array of objects. It looks something like this.
...
3
votes
0
answers
6k
views
Angular UI Datepicker Popup with Default Time
I need to set date and time (12 hours 0 minutes) via Angular UI DatePicker Popup.
plunker
I had two issues:
1. When page was loaded:
Input had value 17-March-2017 12:00:00.000. It's right.
But ...
3
votes
0
answers
303
views
AngularJs: Preventing multiple $q.get() per url
I've wrote a pretty useful method to prevent multiple requests per single get url. There is a well known pattern - to store promise and return it for each next ...
1
vote
1
answer
481
views
ToDo App in AngularJS
I have written a todo list app. I want to understand how to improve it.
Here's what I'm trying to understand:
My problem is when user clicks on task to edit, because it passed by reference, so if ...