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
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
22 votes
1 answer
15k views

Here is a simple reusable AngularJS factory I came up with to initialize Google Maps Asynchronously, which somehow does not seem ...
Dmitri Zaitsev's user avatar
21 votes
1 answer
15k views

This is my first angular code. I've been working with jQuery for a while, so I don't have the same approach. I'm looking for advice and code improvement. The following code has 3 directives: ...
Elfayer's user avatar
  • 313
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
14 votes
2 answers
8k views

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
14 votes
2 answers
296 views

I decided that since I was learning AngularJS and Bootstrap, I'd be remiss not to post a FizzBuzz, but FizzBuzz bores me, so I've extended it. My version of FizzBuzz is configurable, and allows you ...
Nick Udell's user avatar
  • 5,247
12 votes
2 answers
2k views

We record software builds from our build machine into a database and for practice purposes I'm building a little web dashboard for it. The API is REST (WebApi) and provides access to query for ...
ChrisWue's user avatar
  • 20.6k
11 votes
1 answer
769 views

I have been learning AngularJS and have written my first app. It's a Hangman AI which learns words and guesses the solution based on the words it knows. Please look over my code and provide some ...
Tom Hanson's user avatar
11 votes
1 answer
5k views

What do you think about this directive? For each input, it traverses the DOM towards the root and if it finds an element with the class ...
maaartinus's user avatar
  • 13.7k
11 votes
1 answer
835 views

I am trying to build a food search app. I am using Angular and Spring. I am currently using the yelp API, but it's done on the Java side. I think what I have achieved is really bad design. It works, ...
OPK's user avatar
  • 285
10 votes
1 answer
252 views

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
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
10 votes
1 answer
7k views

In AngularJS, I currently have a directive and 2 services which permit me to bind the window resize event, and broadcast it to my application. I would like to know if you could see anything that ...
Niflhel's user avatar
  • 203
9 votes
1 answer
945 views

I have created this little dropdown directive in Angular. The idea is that you create a nav element with a ul inside. The directive prepends a chevron and toggles ...
superluminary's user avatar
9 votes
1 answer
659 views

I am a newbie coder and I'm trying to learn good coding habits. I'm making a Simon Says game challenge from Free Code Camp in Angular JS. Codepen I have an array that keeps random integers between ...
Sharon Choe's user avatar
9 votes
1 answer
7k views

I am using Telerik's Kendo UI suite for a project, and was excited when they announced compatibility with Angular, but as I got a lot of code written I realized that they hadn't yet made the widget ...
Ciel's user avatar
  • 333
8 votes
1 answer
2k views

I am trying to convert hex to rgb, and rgb to hex. My current code doesn't seem optimal, and there is an issue with 0's in the hexadecimal. What do you think about the overall quality of this code? ...
Josue Espinosa's user avatar
8 votes
3 answers
514 views

I am working on a project in Angular where I have a number of similar data objects. When you click on anyone of them it's state and amount of data shown will change. All of the objects start in the ...
EasilyBaffled's user avatar
8 votes
1 answer
662 views

I have the same functionality in two controllers and I want to refactor to place it in a shared method that both controllers can access. I was thinking on creating a separate service called "Camera" ...
tribet's user avatar
  • 491
8 votes
1 answer
12k views

While trying to create an "admin" backend (to allow for CMS like functionality) to a site using AngularJS on the frontend, I came across an issue with routes. In order to allow the admin to create ...
Patrick Evans's user avatar
7 votes
2 answers
7k views

This is a question about whether my coding style follows AngularJS best practices. One of the selling points to Angular is directives. Directives allow you to create custom DOM with elements or ...
Doug T.'s user avatar
  • 263
7 votes
2 answers
633 views

I am trying to learn AngularJS as a start to my revival of learning, I think that I am getting the hang of it so far, but would like to see what I can do differently with some super simple ...
Malachi's user avatar
  • 29.1k
7 votes
1 answer
47k views

I have two different arrays: ...
JulieMarie'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
7 votes
2 answers
197 views

To illustrate some algorithmic problems I found while writing this code review, I needed to include a live demonstration, which I implemented using a Stack Snippet with Angular.js. The demonstration ...
200_success's user avatar
7 votes
2 answers
6k views

I wrote a little factory to dynamically load assets in angular resolve. Is it well structured and can it be made prettier? ...
emc's user avatar
  • 73
7 votes
1 answer
22k views

I'm experimenting with angular directives, and as a proof of concept I wanted to create a basic tab control. I'd like to know if anything can be changed to be more fluid, or if I'm doing things "right"...
Mitchell Lee's user avatar
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
7 votes
1 answer
1k views

I have learned the question of solving Angular app optimization for search engines, and was frustrated that the most recommended option is prerendering HTML. After some time spent, I suggested to ...
Saike's user avatar
  • 833
7 votes
1 answer
765 views

I'm considering releasing a library as a bower module. Are there issues with code quality, missing test cases, that need to be addressed first? Perhaps it's not a good candidate for public release. ...
marfarma's user avatar
  • 171
7 votes
1 answer
2k views

My AngularJs app is currently working fine. I'm working on modularity, refining my code design, and making it more readable. I have a app.js file that contains the ...
inspired's user avatar
  • 323
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
7 votes
1 answer
699 views

I am interested in getting some feedback on the code for my TicTacToe game, implemented with AngularJS, particularly with respect to the AI logic, which is printed below. (The full code base is ...
clayreed'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
6 votes
1 answer
2k views

Things that I'm not sure about: Whether this works in all use cases - alongside routing and within templates etc Am I polluting the scope with all these variables? This seems to be the easiest way to ...
Patrick's user avatar
  • 161
6 votes
2 answers
150 views

I'm a beginner at coding and the past days I tried to write the famous "Conway's Game of Life" in Angular.js. Right now I'm done with the code and the game works. But if the size of the ...
user avatar
6 votes
2 answers
7k views

In the spirit of Google's angular.js Style Guide, I set out to define my angularjs controllers as classes, complete with instance functions. I ran into trouble, however, when trying to access ...
Gil Elad's user avatar
  • 191
6 votes
1 answer
916 views

I have tried to simulate a cart (only partially completed). I just wanted to see how the code upto this point can be enhanced. I am trying to learn about the usage of ...
dreamer's user avatar
  • 161
6 votes
1 answer
232 views

I've got a goal and that goal is to become an Angular expert. So what better way of learning than to create an online store for pies, right? I've just finished the registration part and would like ...
Chrillewoodz's user avatar
6 votes
1 answer
107 views

This is an object exposed to the view and is being used on directives within the same view. The directives need to track changes on the ctrl.filters.applied object. ...
Wiley Marques'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
6 votes
1 answer
3k views

I wrote this as a convenient way to batch together multiple, repetitive AJAX calls. I was working in angular at the time, so I use the $q service, but I'm sure it ...
Chris's user avatar
  • 163
6 votes
1 answer
211 views

Could you please offer some suggestions about my self learning project? It is really hard-coded, but I have no idea what to do next. I'm using angular (only few ...
outoftime's user avatar
  • 1,769
6 votes
1 answer
3k views

I have created a script for going a multiple select option in Angular without using a select box that you have to hold control in order to select multiple items. ...
qwertynl's user avatar
  • 161
6 votes
2 answers
36k views

I'm building a web interface for a home monitoring sensor array, and fetching JSON from the backend framework. I want to start putting statistics together for monitoring different areas of the home, ...
Jon Mitten's user avatar
6 votes
1 answer
685 views

My friend and I are working on a bare-bones chat web app, using Angular on the front end. He's using Swampdragon for some of the real-time stuff. My task that I set out to achieve was to get the chat ...
Brendan's user avatar
  • 61
5 votes
1 answer
3k views

I'd like to be able to define Angular constants in terms of other constants. It's not possible to inject dependencies into Angular constant services. When I want ...
jcarpenter2's user avatar
5 votes
1 answer
703 views

I'm new with Angular promise and I would like to know how to improve my code. I have a service which preload media or data by calling an API. The media API return an array of urls to preload. ...
Tib's user avatar
  • 153
5 votes
1 answer
4k views

As usual I'm wondering if there is a better way to do: (The code extends a angular service) ...
Whisher's user avatar
  • 153
5 votes
1 answer
128 views

I am working on a project for Udacity, where I should use CSV files to display data on fake corporate dashboard. Structure of the data I am working on is like this: I am using AngularJS for this ...
TheFullResolution's user avatar

1
2 3 4 5
8