Skip to main content

Questions tagged [angular.js]

Code written using version 1 of the AngularJS open-source JavaScript framework. Use 'angular-2+' for code using later versions.

Filter by
Sorted by
Tagged with
10 votes
2 answers
2k views

I have an app that makes calls to the Podio API. The Podio Api uses OAuth2 protocol , after user's authenticate with their podio username and password an access and refresh token is provided for ...
inspired's user avatar
  • 323
5 votes
1 answer
129 views

I wrote a module with 3 services that execute the oauth (and set the api key) for the google api and return the token object if the promise is positive. Here is the whole working module: ...
J. Doe's user avatar
  • 51
1 vote
1 answer
934 views

I'm learning how to write tests in Angular (these are my first tests in general). There are a lot of tutorials out there but each one of them has a different approach. I'm a bit confused if I'm doing ...
Baki's user avatar
  • 111
2 votes
1 answer
113 views

I'm an 'old school' programmer (C, C++), and I have step-by-step, algorithmic thinking. I'm writing some code in Angular + Django and I know that this code is ugly but I don't have any idea how to ...
Hegol99's user avatar
  • 21
3 votes
0 answers
141 views

I've created a caching service using OOP techniques combined with the revealing module pattern and the angular-cache library. New CacheDataClass objects are ...
br3w5's user avatar
  • 255
2 votes
2 answers
117 views

I call a service which returns an array of tags. The array may be empty, and if so, it just saves the tag. Otherwise, it checks if the tag is in the array. If so, then the tag is removed, otherwise it'...
Leon Gaban's user avatar
3 votes
1 answer
69 views

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
171 views

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

I decided to write a simple runnable example to try and express my concern: index.html ...
Marco Aurélio Deleu's user avatar
2 votes
0 answers
92 views

I built an app where a user has a recipe box with recipes in it - for the db, there is a user and recipe model, user has "recipeBox" property. The recipebox is an array of objects like so: User ...
devdropper87's user avatar
2 votes
1 answer
2k views

I have an AngularJS function that is used to determine which $scope associative array variable is to have data pushed into it. I would love to be able to remove the ...
Evan Bechtol's user avatar
  • 1,265
7 votes
3 answers
196 views

I have a directive called meetingList with its own isolated scope that receives a list of meetings and displays the filtered items based on some criteria. The ...
Edgar Santos's user avatar
2 votes
2 answers
310 views

I'm kinda new to javascript and have question about it. Now my practical project is growing a bit bigger. I got the following if else statement. Is it possible to refactor this ? Should i use an use ...
Greg's user avatar
  • 193
2 votes
1 answer
1k views

I took the basic layout manipulation from a jQuery plugin called flexImages. The idea is to use the directive tag and encapsulate a piece of code that will be transcluded to make up the container ...
Adam S's user avatar
  • 121
4 votes
1 answer
374 views

I created a little wrapper for one of my JavaScript libraries to enable Angular functionality. Are there any pitfalls I should be wary of with my code? ...
Anders's user avatar
  • 690
3 votes
1 answer
811 views

I've built a countdown directive for a website I'm working on, and it actually functions just fine. It simply parses a given date, splits the total time remaining until that date up into Day, Hour, ...
marked-down's user avatar
1 vote
1 answer
13k views

I have been trying out AngularJS and developing a mobile application to test out its features and I wanted to see if I could somehow refactor to make my JSON response hopefully quicker in fetching the ...
Smári Alfreðsson's user avatar
1 vote
1 answer
203 views

Wrote this an hour or so after learning some basics. Took me a while because I had to write it in a way to fit the previous structure of my page. Basically, there are three rows of data. There has to ...
Lansana's user avatar
  • 387
3 votes
0 answers
61 views

I'm trying to improve my Angular directive. I'm pretty new to CoffeeScript, so I think there may be inconsistent code. ...
user98293989823's user avatar
1 vote
1 answer
172 views

This is an accounting program (and my first attempt at a web app of any kind) where users need to get and retrieve objects from different JSON URLs and at different levels. Rails is used for the back. ...
Neven's user avatar
  • 11
7 votes
1 answer
47k views

I have two different arrays: ...
JulieMarie's user avatar
2 votes
3 answers
224 views

I have an application in which a user makes a change, and when they click Save they will be prompted to confirm, and the appropriate REST call will be made if they agree. The intial call to ...
The DIMM Reaper's user avatar
0 votes
1 answer
1k views

I have created a directive for common form fields shared across all the forms in a large AngularJS app I am re-factoring. The app has lots of forms for various data models (user, owners, victims, ...
Matthew Fedak's user avatar
3 votes
1 answer
361 views

I'm not sure whether my code looks good or not: ...
Alex Shmatko's user avatar
15 votes
2 answers
14k views

I have a REST web service that uses OAuth 2 for authenticating and authorizing requests. I have an endpoint, that when receiving the correct credentials, responds with an access token that will be ...
Matias Cicero's user avatar
7 votes
1 answer
666 views

I'm wrapping ui-select in my own directives to pre-configure and style it, as I need it for my app in different select widgets. They appear on many pages, for example ...
floriank's user avatar
  • 225
4 votes
1 answer
6k views

I am using MVC+Angular. In MVC, I created partial views for search, listing, etc. I show them using: ...
Vignesh Subramanian's user avatar
3 votes
2 answers
122 views

I'm writing and app in AngularJS and am learning about writing RESTful services. I also want to make sure that I'm understanding the MVC pattern correctly. In my code, this is my take on how I'm ...
UltraSonja's user avatar
2 votes
1 answer
589 views

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
1 vote
1 answer
49 views

In my Angular app, users click on different icons. When a user clicks on respective icon, I can show the icons gallery, as well shuffle the view. Apart from this ...
3gwebtrain's user avatar
2 votes
1 answer
2k views

I created a login service which holds a boolean based on if a user is logged in or not. ...
Sean Parsons's user avatar
4 votes
1 answer
6k views

I changed the normal way of using Angular. I'm using my controllers just to talk to my API routes and am using directives to manipulate the data and DOM as well. I am using the object literal pattern ...
Amanda Ferrari's user avatar
3 votes
1 answer
76 views

I have an array vs.tags which may contain hundreds of objects, and a smaller array coloredTags which only contains up to 3 ...
Leon Gaban's user avatar
3 votes
1 answer
409 views

I have been given a requirement to create a symbol toolbar, a toolbar where each button represents a unique symbol. This is how the toolbar would work: A user clicks inside a text field and enters ...
Sam Parsons's user avatar
2 votes
1 answer
64 views

I am showing templates in popups according to the user navigation links. It works for me, but, is this the correct way to do it? ...
3gwebtrain's user avatar
6 votes
2 answers
251 views

I have this HTML down below that creates a list with two columns, the left one containing profile information, and the right one containing checkboxes of the user feedback in a horizontal list. The ...
realisation's user avatar
1 vote
1 answer
230 views

Is there any easier/shorter/better way to do the marked part? plnkr ...
Viktor Mellgren's user avatar
26 votes
5 answers
2k views

We've been hard at work creating a browser-based GUI/Client for playing the Cardshifter TCG for the past week or so. Today, I just finished doing a pretty complicated layout for the chat lobby, along ...
Phrancis's user avatar
  • 20.5k
7 votes
1 answer
986 views

I have to two datepickers. I want achieve the following functionality: the return date cannot be selected before the selected departure date and the departure date cannot be after the selected return ...
Wild Goat's user avatar
  • 191
3 votes
1 answer
76 views

This code adds the toggle functionality for mobile devices. So, for width lower than 990px, the panel collapses, and the user can toggle to open / close it. ...
theoni.n's user avatar
1 vote
1 answer
95 views

I am using the function inputSetup to prepare an array for a multi-select directive. I am passing in an array with the existing selections (...
John Spiteri's user avatar
6 votes
1 answer
1k views

I'm trying to unit test an AngularJS service that is dependent on another service, using QUnit as my testing framework. The first test I'm writing is one to verify that my service calls another ...
Jeroen's user avatar
  • 1,441
3 votes
1 answer
70 views

I have an Array of 5 objects, some key values need to be changed based on the browser width. ie: 5 cols, 4 cols, 3 cols or 2. vs.streams is an Array which is tied to a AngularJS model. When the ...
Leon Gaban's user avatar
0 votes
2 answers
6k views

I have made a basic program using AngularJS that displays data from a JSON file, and filters it according to the user's selection (specifically FIFA 15 chemistry cards). I did plenty of CSS work to ...
alanbuchanan's user avatar
  • 1,322
2 votes
1 answer
361 views

I am learning how to implement Bootstrap modals in AngularJS. I can do it when the modal code (the actual popup window code) is on the main page, but I want to be able to display external files so ...
UltraSonja's user avatar
2 votes
4 answers
25k views

In angular, I have an input field for a user's full name. And a function called splitName which extracts the first / last name from the field. Is there a way to ...
cuserjuicer's user avatar
3 votes
1 answer
558 views

The code below doesn't seem right to me. The scenario is: User enters in a "quantity" into a form field. If the user enters in 5, the loop below should iterate 5 times. There should now be 5 new ...
jeffci's user avatar
  • 248
2 votes
1 answer
146 views

I never took an application in a Model-View-Controller architecture and have some difficulties in front-end. The following code works fine, but what can I do to make "layers" of better code and even ...
Daniela Morais's user avatar
1 vote
1 answer
78 views

I have been working the some project and I'm struggling to find the answer. Right now I'm coding with Angular and there some code that makes me write twice. There only two arrays now but if I have ...
Shaxrillo's user avatar
  • 121
2 votes
0 answers
264 views

Just looking for an initial steer on my AngularJS implementation. Background Started work on a clients new site which uses a popular CMS as the backend and AngularJS has been chosen as the client ...
John D's user avatar
  • 21

1 2 3
4
5
8