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
0 votes
1 answer
331 views

Is adding CSS to template via <style> the right approach? How should I structure the application? Plunker link to the code ...
Nagesh's user avatar
  • 21
3 votes
1 answer
158 views

As a development team we've recently started to transition from MVC to Angular. None of us have had prior experience with it so a lot of creating the new client was very much trial and error. I've ...
Novastorm's user avatar
  • 139
0 votes
1 answer
4k views

I have recently upgraded to AngularJS 1.5 and as the title says, I want to use different templates depending on a value in the ...
Backer's user avatar
  • 103
0 votes
1 answer
58 views

I am currently working on refactoring two methods that exist in directives into a service. This is method one: ...
theGreenCabbage's user avatar
1 vote
1 answer
4k views

This is my first Angular2 component, which makes two api calls: the first call provide the input for the the second one. The following is my attempt at this code. ...
Shan's user avatar
  • 11
1 vote
1 answer
355 views

I am developing an application that has different configurable versions - "a1" and "a2". The version name is initially being set from the database as "a1" in the $rootScope. I reference the version ...
John Spiteri's user avatar
3 votes
2 answers
3k views

I made this AngularJS 1.x filter, to search using a the same SQL LIKE syntax. Right now only the percentage symbol (%) is ...
Zorgatone's user avatar
  • 426
2 votes
2 answers
154 views

I wrote a Angular filter to use filters based on properties that handles some specific properties differently. Is there a way to improve or use some built-in Angular filter to avoid extra code? ...
m.rufca's user avatar
  • 208
5 votes
1 answer
117 views

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 ...
mdegges's user avatar
  • 151
4 votes
1 answer
3k views

I have created a recursive function call in AngularJS and just wonder if is there a better way to solve this problem? The code works perfectly. My code is the following: ...
Embrioka's user avatar
  • 323
2 votes
0 answers
845 views

I'm new to Observables. I'm using them to check if the user is logged in or not in the constructor of my root page. I have nested many Observables in order to do this, and they are working fine, but ...
Karim's user avatar
  • 21
2 votes
0 answers
2k views

I'm intern and work on a project where I develop DRF API that need to interact with mobile app written by my colleague with Ionic framework. We are creating new user. My view method is following: <...
Ilia_Mochalov's user avatar
2 votes
1 answer
91 views

I have a $scope.users that I use to show a table and I need to apply a filter with multiple options, Here is the $scope.users ...
AndreFontaine's user avatar
2 votes
1 answer
2k views

Here is my code to add a progress bar on every HTTP request. Can someone please point out to me whether I am doing it right or not? Template for loader: ...
atul's user avatar
  • 121
3 votes
1 answer
12k views

I'm returning an array containing dates (and other things) from an API, then looping through the array on the front end to convert them into dates The backend uses Node.Js and queries a mySql ...
Geraint's user avatar
  • 273
3 votes
0 answers
96 views

This is my solution to my SO question. My requirements are: use links inside of the angular app when following a link with the same path (i.e., differing in the <...
maaartinus's user avatar
  • 13.7k
0 votes
1 answer
94 views

I am using the following function to make a specific filter passing the $scope.searchParams in this way: ...
AndreFontaine's user avatar
2 votes
0 answers
85 views

This is my first time making an Office 365 Addin and wanted advice on my current form structure. I'm particularly looking for advice on best partices for constructing directives and how to properly ...
greg's user avatar
  • 1,027
3 votes
1 answer
3k views

I have a very simple directive <my-card> that lists out some data. Example Usage ...
cuserjuicer's user avatar
3 votes
1 answer
133 views

I need to display a "caption" from a video but I cannot use built in captions provided by a vtt file for my situation. I created an array that stores the key,value pair (time, caption). I traverse ...
Colton Williams's user avatar
3 votes
0 answers
65 views

I have here a simple webapp for displaying different D3 demonstrations: The idea is - the user can select one of many modules in the control bar at the top, and the corresponding controls for that ...
dwjohnston's user avatar
  • 1,358
5 votes
1 answer
3k views

I am fairly new to AngularJS and I am trying to improve my knowledge of this JavaScript Framework by building small real-world web-apps. In this case, I have built a currency converter app with ...
CodeWalker's user avatar
3 votes
1 answer
1k views

I am working on an angular application. I have written a controller for a page which gets 10 objects from an api. On clicking the next button, it gets the next 10 objects and so on. I have also added ...
doctorsherlock's user avatar
1 vote
1 answer
192 views

I'm writing a todo app as a test. Having never done Ionic nor Angular apps before, I am not sure if I am following best practices here. What I have done is try to keep my controllers thin by placing ...
dan-klasson's user avatar
4 votes
1 answer
123 views

Based on JSON data I receive, I am trying to track a team's home and away games. The JSON data is stored in $scope.gameSchedules and has "team1" for home games and "...
devdropper87's user avatar
1 vote
1 answer
292 views

I'm ashamed to ask such an elementary question but I tried to DRY up this template a couple ways and couldn't come up with anything I was satisfied with. Can you help? ...
Jason Swett's user avatar
1 vote
1 answer
104 views

Sometimes I need to repeat an execution of rejected promises several times, for example, to fetch some data over internet. There is a wrapper, which accepts Promise and tryCount: ...
Vladimir Gamalyan's user avatar
2 votes
0 answers
159 views

I have a simple Angular application that lists some object requests from a backend, allows the users to click once to edit the item, and then click again to update the object in the backend. Here's a ...
dwjohnston's user avatar
  • 1,358
1 vote
3 answers
99 views

This function derives a 'stars' rating from a product score that is retrieved from local storage. What would be the best way to refactor these else if statements? ...
ggalarza's user avatar
2 votes
1 answer
106 views

I am trying to write an Angular service that will wrap the regular Http service and automatically make authentication calls if Bearer token is not available or invalid. Here's an illustration of a ...
Igor Soloydenko's user avatar
0 votes
1 answer
80 views

I have 7 variables controlling 7 widgets showing or hiding from the frontend. I want to put them together and control all of them using one function. Here is what I have. However, I feel like even ...
catlovespurple's user avatar
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
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
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
0 votes
1 answer
79 views

First here is my settings object below. insight, spike and ...
Leon Gaban's user avatar
2 votes
1 answer
84 views

I'm making an Angular web app to solve a pain with traditional messaging my friend and I had, of sending batches of messages (on multiple different topics) to each other every few hours and not having ...
tscizzle's user avatar
  • 277
3 votes
0 answers
66 views

I want to create a simple CRUD app using angular on the frontend. I'm not really happy with the logic here, it seems a bit convoluted for fairly simple functionality. ...
dwjohnston's user avatar
  • 1,358
2 votes
2 answers
842 views

I have built the following application which searches Flickr API and returns photos. I am presenting the code: index.html ...
Unknown developer's user avatar
1 vote
1 answer
116 views

I am putting together a couple code samples for prospective employers and would love some feedback. I am still pretty junior so I am not sure what constitutes a good code sample and the do's and dont'...
HolyMoly's user avatar
  • 169
2 votes
3 answers
125 views

So I have following piece of code which basically validates five date fields in angular service. But the catch is that there may be one to five field(s) visible on the screen based on some other ...
user avatar
1 vote
2 answers
151 views

I wrote the following code for a coding challenge I was given and it received the following criticism: it was quite a beginner attempt using Angular. ...
Unknown developer's user avatar
5 votes
1 answer
736 views

I wrote the following code in Angular as to accomplish a technical test for a UK job. My impression was that it is very neat and well object oriented. To my big surprise, they rejected it. Could ...
Unknown developer's user avatar
2 votes
1 answer
252 views

I have several lists that contain Part objects with a partNumber and quantity. When the user ...
mhodges's user avatar
  • 216
1 vote
1 answer
1k views

I've a sample code to create a simple menubar here which works, but I'm not sure if that's the best way to code it. Can somebody please validate if there is a better way to do the same? In short I'...
devak23's user avatar
  • 133
2 votes
1 answer
127 views

I've been reading about AngularJS services and factories, and how you should strive for a thin controller, but as the project I've been working on grows it seems more and more impractical with as ...
Alex's user avatar
  • 123
3 votes
0 answers
730 views

Being a newbie into AngularJS, I have overlooked the importance of client side logging until some non-reproducible client-side errors occurred and I realized that they were not logged. My web ...
Alexei's user avatar
  • 1,796
4 votes
1 answer
157 views

We have the following validation function: ...
invernomuto's user avatar
4 votes
1 answer
358 views

I am new to AngularJS. Here is my basic code for implementing Tabs with Pane. Eventually, each tab-pane will have a form and a ui-grid that will display data from the DB. Can I use separate ...
Naresh Raj's user avatar
2 votes
0 answers
206 views

I have to make a user creation wizard, there are 3 steps to achieve the insertion of a new user, so every step I have have a validation function to enable the next step. As a first step for the ...
invernomuto's user avatar
4 votes
2 answers
2k views

I am new to AngularJS and I thought of trying something simple: a notification factory that is useful for displaying actions alert messages like "Save successfully!" or "Validation errors: ...". The ...
Alexei's user avatar
  • 1,796

1
2
3 4 5
8