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.
1
vote
0answers
24 views
breacrumb directive for angular-ui-router
This is a simple directive that creates breadcrumbs on the fly for Angular.js pages using angular-ui-router
...
1
vote
0answers
23 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)
...
-1
votes
1answer
54 views
Javascript - Which is faster? [closed]
I'm quite fond of jQuery, and I'm trying to learn AngularJS right now.
Which is faster from the two codes below:
jQuery:
...
3
votes
0answers
34 views
Getting hex colours from a image
I am trying to get the hex colours from an image. The problem I am having for some reason randomly the code causes high CPU usage, which times out the browser and I am not sure how to optimise the ...
-1
votes
0answers
33 views
Movie rating application
Please tell me if this app meets production app requirements. What can be improved in code, naming conventions or project.
Application is similar to tinder. It gets movies from server and shows ...
0
votes
0answers
20 views
Shortcut finder website
This is a website and is written in angularJS, nodeJS/Express, JavaScript, HTML, CSS. With this app you can search for the keyboard shortcuts for an action you are looking for.
The full project can ...
0
votes
0answers
29 views
Remove cards on click
I am using materialisedcss and angularjs for designing my website.I have series a JSON data(from Rest) which will be displayed in the form of cards as shown below.
There will be two options which ...
0
votes
0answers
13 views
Generating a list of menus with AngularJS
Some days ago, I decided to start learning a JS framework in order to gain skills and become more useful at work. I choose Angular for the purpose, and started learning it by building up my "...
5
votes
1answer
77 views
Particle text directive
Directive that shows text as particles on a canvas. Looking for a general review. Plunker here.
image.service.js:
...
3
votes
1answer
62 views
Using chartJS in Angularjs to plot IOT data
I am a Javascript and AngularJS beginner.
Below is the code inside my chartController. What this does is get IOT data from a back-end call and display it in my front-end with a chart. There are two ...
0
votes
1answer
42 views
Communication to Child Controller
This is a simple AngularJs application with two nested controllers. We need to pass data from the parent to the child Controller.
The first thing you find when googling for a solution would be this, ...
2
votes
1answer
66 views
Displaying a table using DataTables and AngularJS
I am using DataTables to format and display a table. I started the project using AngularJS with a PHP backend but I needed to inject some Vanilla JS and JQuery code in order to use DataTables.
Is ...
0
votes
1answer
41 views
Car dealership landing page
Please give feedback on what I could do better next time. This is an Angular 1.x landing page I made for a pretend car dealership.
Here is what it looks like.
Here is the app.js:
...
4
votes
1answer
52 views
Handling two datepickers in a form with angularjs
Here's I am using simple form with angularjs. Everything works fine. I am having watchgroup for EndDateFrom & EndDateTo datepickers. When it's defined I am logging the value to console. I am ...
5
votes
2answers
83 views
JavaScript filter() on JSON object?
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, ...
3
votes
1answer
79 views
Performance problem with Angular and rendering a grid
I have a big problem with performance with a web application using AngularJS. I currently have a grid that renders an array of objects. It looks something like this.
...
1
vote
1answer
98 views
Angular2 Route Interceptor
I have made a route interceptor service that has an API to hook into every event that the router broadcasts, and pass in iteratee, a function that will be invoked ...
4
votes
1answer
93 views
Making multiple http request Angular2
I need to get some ids from contacts and contactgroups to be able to collect the data. My example works but i dont know if this is the way to go.
...
1
vote
1answer
126 views
Angular4 MultiSelect Component
I wrote an Angular 4 app and a part of it was a multiselect component. The multiselect component acts like a basic HTML select but gives you the ability to select more than one option, typeahead, and ...
3
votes
0answers
112 views
Publishing angular-cli component library to npm or like
I've found a lot of blog posts that seem to suggest publishing a library TypeScript (as source) and all to npm or to a private repository. It feels like we should be doing some transpiling first and ...
0
votes
0answers
28 views
Multiple generic transclusion angularjs
I would like to get some feedback if this is okay or not. It works perfectly by the way.
The first thing that pops to my mind is why does clonedTranscludedContent ...
3
votes
0answers
206 views
Angular UI Datepicker Popup with Default Time
I need to set date and time (12 hours 0 minutes) via Angular UI DatePicker Popup.
plunker
I had two issues:
1. When page was loaded:
Input had value 17-March-2017 12:00:00.000. It's right.
But ...
1
vote
1answer
27 views
How to refactor / re-architect the components/state here in ui-router app [closed]
https://plnkr.co/edit/bOZW1a9u62W1QA6cYjYj?p=preview
My goal has been to separate the Dashboard states from the Feed state.
...
3
votes
0answers
21 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 ...
4
votes
0answers
34 views
Angular component for a system to store student test scores
I am designing a system and in it there is a view where teachers can see a summary of test data on students. Here is the component of it:
...
3
votes
1answer
86 views
Handling combinations of optional parameters for an Angular filter pipe
This is a simple implementation of an ng2 filter pipe, which can currently take 2 optional facets: <string>status and ...
1
vote
1answer
83 views
ToDo App in AngularJS
I have written a todo list app. I want to understand how to improve it.
Here's what I'm trying to understand:
My problem is when user clicks on task to edit, because it passed by reference, so if ...
5
votes
1answer
548 views
Angular 2 clock with RxJS Observable
I'm fairly new to Angular 2 and I started off with creating a clock for my app. I tried to stick to the official documentation tutorial.
Folder structure:
The CSS file is still empty and the HTML is ...
1
vote
1answer
35 views
Taking objects from literal with many objects
I have data returned from an API coming back in a response: response.data
...
1
vote
0answers
28 views
Nodejs Read and replace into file
I wrote a function to read and replace words by words written in a form in angularjs. I would like to know your opinions to optimize it
Knowing that I have to perform the changes in two files.
...
-1
votes
1answer
85 views
AngularJS calendar directive
Is adding CSS to template via <style> the right approach?
How should I structure the application?
Plunker link to the code
...
2
votes
0answers
51 views
Struggling to unit test Angular, was this module the best approach?
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 ...
1
vote
1answer
77 views
Dynamically set angular directive template
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 ...
0
votes
1answer
32 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:
...
1
vote
0answers
21 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
45 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 ...
1
vote
1answer
354 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
71 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 ...
3
votes
2answers
123 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
70 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
50 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
19 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
320 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
46 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 ...
2
votes
0answers
237 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
216 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:
<...
0
votes
0answers
225 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 ...
2
votes
1answer
52 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
1answer
120 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
406 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 ...