Skip to main content

All Questions

5 votes
1 answer
97 views

Angular directive to fetch resources to fill a table

I created a directive that solves my immediate problem, but I'm trying to find ways to make it more reusable. My immediate problem was, I have a table and needed to fill in one of the columns with ...
2 votes
1 answer
551 views

Paginated AngularJS posts application

I have made a small application that displays a posts JSON in the form of cards, with the help of AngularJS and Twitter Bootstrap 4. The application has an interface for pagination and there are ...
3 votes
3 answers
300 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) ...
2 votes
1 answer
323 views

Laravel Single Page Application Using Angular Js

I have created a Laravel Single Page Application using Angular Js 1.3.14 by learning tutorials in the websites. index.php: ...
2 votes
1 answer
121 views

AngularJS - Making Factory and Controllers DRY

The following code works, but: The service makes multiple API calls, the functions are very similar with a lot of code duplication. The same is true for the controllers- very similar code with only ...
3 votes
1 answer
623 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 ...
3 votes
0 answers
295 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
63 views

Displaying available destinations using Angular.JS

I wonder to know if there is any bad smell on my practice for i18n on Angular. I put the I18n translating function on Angular controller (because I don't know how to put it on HTML template file) And ...