AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Controller (MVC) capability, reduce the amount of JavaScript needed to make web applications functional. These type of apps are also known as Single-Page Applications.

learn more… | top users | synonyms (3)

1
vote
0answers
29 views

Angular MVC structuring and code usage

I use the following code which run OK with very simple Angular UI that run intro page with form and when you click on button it navigate to another simple form to create data. since this is my first ...
0
votes
1answer
29 views

Abstracting out two lines of code in Coffeescript

I am currently working on refactoring two methods that exist in directives into a service. This is method one: ...
0
votes
0answers
13 views

Refactoring two similar methods into a single Angular service

I am trying to create a service for two similar-but-still different methods: Method one is this: ...
2
votes
0answers
20 views

Angular 2 tagging module with RxJS

I'm currently developing a small Angular tagging module which will enable me to populate an array from a text input, pretty much like Selectize to give an example. I'm using a BehaviorSubject and ...
0
votes
0answers
55 views

Call multiple services from angular2 component

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

Angular UI-Router Repetitive templateProvider Using $rootScope

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 ...
2
votes
2answers
43 views

SQL LIKE search in Angular filter objects

I made this AngularJS 1.x filter, to search using a the same SQL LIKE syntax. Right now only the percentage symbol (%) is ...
2
votes
2answers
59 views

Angular filter based on properties

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? ...
4
votes
0answers
40 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 ...
0
votes
0answers
17 views

An Object Oriented Attempt to Render Different Cards based on their Source Type

So I'm working on a test project to learn Angular 1.x better. I have this as a Factory that gets required by the main.js. There are different cards that are rendered differently depending on the ...
3
votes
1answer
114 views

AngularJS recursive function call with $timeout

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: ...
1
vote
0answers
33 views

Angular spinner combined with a response interceptor

So using angular-spinner angular-spinner github i have created a directive that connects with a factory that is using a ...
1
vote
0answers
50 views

Flattening nested Observables in Angular 2

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 ...
1
vote
0answers
73 views

Django REST custom methods for generic 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: <...
3
votes
0answers
301 views

Audio player in Angular 2

I just built an audio player in Angular 2 using a player component and a player service. It's all working fine, I just feel like there is a much better way to do this. Should the audio object be in ...
0
votes
0answers
109 views

AngularJS factory for Angular material $md-Toast notifications

If you are writing an Angular 1.5 App and incorporating elements of Angular-Material you can use this factory to create many customizable toasts with $mdToast ...
0
votes
0answers
74 views

Angular Websocket factory

I have the next factory that uses Stomp over SockJS: ...
2
votes
1answer
44 views

AngularJS apply filters on data previously filtered

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 ...
2
votes
0answers
51 views

Progress bar/loader with AngularJS

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: ...
-1
votes
1answer
90 views

Convert all dates in an array to date format

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 ...
3
votes
0answers
74 views

Prevent search changes from spamming history

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

Validating search parameters in an Angular $scope

I am using the following function to make a specific filter passing the $scope.searchParams in this way: ...
1
vote
0answers
32 views

CRUD operation in controller for different objects

I am working on AngularJS project. Our project contains lot of controllers and each controller having more functions. I want controllers should be clean and simple. What are the ways to modify the ...
1
vote
0answers
31 views

Microsoft Office 365 Addin Angular Form

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 ...
3
votes
1answer
373 views

Angular directive link vs controller?

I have a very simple directive <my-card> that lists out some data. Example Usage ...
3
votes
1answer
54 views

Display captions based on video time

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 ...
3
votes
0answers
30 views

Dynamically displaying different controllers

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 ...
1
vote
0answers
72 views

Quiz MVC application

I am developing a Quiz module in which a user can create a quiz based on a large set of questions grouped on categories. But he can also repeat a certain quiz, or view it again read only. The ...
1
vote
0answers
65 views

Get a random movie based on user-provided criterion (release date, genre, etc.)

What could I do to better organize the Angular and Express code? On the other hand, is there anything that reflects a common beginner's mistake or violates a best practice? I've yet to touch up the ...
4
votes
1answer
110 views

Currency converter built with AngularJS

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 ...
2
votes
1answer
140 views

AngularJS application to display 10 search results at a time

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

Simple Todo app

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 ...
1
vote
0answers
30 views

Angular 1.x Data Connector Service

I've been writing in Angular 1.x for about a year now but I always wonder about my structure and performance as I'm self taught and in a very small team with limited time for code reviews. This ...
4
votes
1answer
57 views

javascript - create an object containing objects based on JSON data

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 "...
0
votes
0answers
154 views

A very basic inventory app with search in Angular2

So, I have been learning TypeScript and Angular2 and I came up with this: ...
1
vote
0answers
198 views

Angular 2 sortable lists

I wrote a simple and small projects that present 3 buttons, each one loads a different list to the screen on the same place but not in the same time. In my HTML, I think I can maybe use some more ...
0
votes
1answer
104 views

Angular template for a dropdown menu

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? ...
1
vote
1answer
40 views

Angular Promise trying Wrapper

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: ...
0
votes
0answers
80 views

Saving an object using a promise chain

This here is some fairly simple functionality The user has a list of objects, which they modify, or may create a new object. When the user presses 'Save/Update' the 'saveClick()' function is called. ...
0
votes
0answers
313 views

Traffic Light Logic using angular

I am pretty new to angular and have implemented a traffic light logic for practice and would just like to see if I can improve it? Any suggestions on best practices and logic setup would be great. ...
1
vote
0answers
47 views

Jasmine Unit tests for simple Angular backend interaction

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 ...
1
vote
3answers
64 views

Deriving stars from a product score

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? ...
2
votes
0answers
25 views

ReactiveX observable that uses another observable

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

Angular controller to handle showing or hiding multiple widgets

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 ...
5
votes
1answer
38 views

Summarize JS Array more efficiently

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 ...
5
votes
0answers
65 views

Baseball player statistics controller

I'm somewhat new to JavaScript and Angular and read in Crockford's book that the hoisting function declaration can lead to issues. Any pointers on how to structure my file would be much appreciated. <...
8
votes
1answer
199 views

Animate and play sounds in Simon Says 'the Angular way'

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 ...
1
vote
0answers
21 views

How to make object childs the same length as maximal child

I have such json structure: ...
0
votes
1answer
44 views

Function to ensure that at least one choice is selected

First here is my settings object below. insight, spike and ...
2
votes
1answer
49 views

Stranded messaging Angular web app - main template for all views to live within

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 ...