Questions tagged [angularjs]
AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Controller (MVC) capability and reduce the amount of JavaScript needed to make web applications functional. These type of apps are also known as Single-Page Applications.
203 questions
2
votes
1
answer
516
views
Unit testing a Web Worker in JavaScript/TypeScript - Best Practice
I got assigned with writing unit tests for a class that instantiate a Worker inside in it's constructor. The code looks simmilar to this,
class SomeClass {
private _worker: Worker;
constructor(...
59
votes
4
answers
74k
views
Should I be using both AngularJS and ASP.NET MVC?
I started learning AngularJS and ASP.NET MVC, but am not sure why to use them both together in the same project?
Aren't they both MVC frameworks? Should I be using them both in the same application? ...
1
vote
4
answers
492
views
Is it best practice to only use still-supported languages when developing apps?
I am looking to create a multi-page web app. I had begun the construction of this web app in angularJS when I realized this was no longer being supported. I am early enough in development that it isn'...
49
votes
10
answers
32k
views
Under what conditions is the use of MVVM appropriate?
Model View View-Model was developed by Microsoft to target UI development platforms which support event-driven programming, specifically Windows Presentation Foundation (WPF) and Silverlight on the ....
36
votes
4
answers
52k
views
Should angularjs directive directly interact with services or is it considered an anti-pattern?
Which one is considered better:
having a directive that interacts with services directly
or
having a directive that exposes certain hooks to which controller may bind behaviour (involving services)?
2
votes
1
answer
2k
views
Refresh tokens by example using Angular and Spring Boot
I am designing out an app that would have an Angular frontend and Spring Boot (Java) backend.
I was considering (but not married to) the prospect of JWT-based authentication:
User logs in with ...
2
votes
1
answer
6k
views
Populate User info between services on microservices architecture
I'm working on a microservices architecture which contains a couple a REST API as a services and a SPA as an interface. In addition, there are an "special" (is not speacial at all, it just special ...
2
votes
1
answer
424
views
Implementing Business Logic in Architecture
I am currently making architecture for one application in which we have different types of user and every user has different types of functionalities to perform.
I am confuse in one point if i try to ...
2
votes
2
answers
804
views
In a JavaScript method signature what is meant by a return type of `typeof blahBlahBlah`?
I've seen an API list methods with both of the following signatures:
methodA(...) : ReturnType
methodB(...) : typeof ReturnType
I understand the first but not the second.
My question comes ...
35
votes
6
answers
7k
views
Progressive Enhancement vs. Single Page Apps
I just got back from a conference in Boston called An Event Apart.
A really popular theme amongst the speakers was the idea of progressive enhancement - a site's content should go in the HTML, and ...
11
votes
4
answers
18k
views
Better ways than traditional polling methods
I'm currently in a AngularJS/Javascript environment.
Currently the application using the polling method (i.e, to retrieve new data from server in a fixed amount of seconds).
This is quite taxing ...
16
votes
4
answers
16k
views
Where to put the Angular app in a ASP.NET Web API solution?
I'm starting a greenfield app and I want to use ASP.NET (4.6) and Angular 2. For the backend I have created a project in Visual Studio, and now I'm wondering where to put the Angular app. I really ...
7
votes
4
answers
2k
views
Clean, Modular Code vs MV* Frameworks [closed]
I've been hearing a lot about the "new" MV* frameworks. I've tinkered with KnockoutJS (I created an invoicing application), but I much prefer to write clean, modular code in raw JavaScript - ...
40
votes
3
answers
43k
views
AngularJS: structuring a web application with multiple ng-apps
The blogosphere has a number of articles on the topic of AngularJS app structuring guidelines such as these (and others):
http://www.johnpapa.net/angular-app-structuring-guidelines/
http://...
21
votes
1
answer
48k
views
Why sending a file is so difficult using angular? [closed]
I have to send a file (very large file) to a server. I'm studying what options I have and how to do it. I'm using angular + express + nodejs.
If I use a simple form, I could catch the file on the ...
-1
votes
2
answers
406
views
Achieving server-side rendering of data coming from a PHP API
I have been working on a blog application with Codeigniter 3.1.8 and AngularJS v1.7.8. It is intended to be versatile and easy to use.
The Dashboard of the application is "pure" Codeigniter, ...
1
vote
1
answer
2k
views
Node and Angular two separate applications or a single application?
I am a java developer. Since one of our developers are leaving I was handed over a project he was maintaining. He says it is a node + angular js project. But as per my understanding, backend should be ...
3
votes
2
answers
803
views
What is the right time to go for Code Refactoring, not optimization?
I've been working on a Python(Django)/JavaScript(AngularJS) based application for some time now.(I learnt all of these on the way, had previously been a Java only programmer)and have hit moments where ...
12
votes
5
answers
26k
views
Server side C# MVC with AngularJS [duplicate]
I like using .NET MVC and have used it quite a bit in the past. I have also built SPA's using AngularJS with no page loads other than the initial one. I think I want to use a blend of the two in ...
5
votes
2
answers
2k
views
Linking service and factory functions to controller $scopes in AngularJS
I'm trying to keep my controllers as thin as possible, so I keep my domain logic in services and factories.
When I need to call a function in response to a user action like a click I assign the ...
1
vote
2
answers
2k
views
Best practice for storing external text to then place in html
Sorry if I'm not explaining the question well in the title, I'm not sure of the correct lingo. Let me give you an example instead.
So this is a normal HTML file.
<span>Welcome to the site!</...
60
votes
2
answers
29k
views
Communication between nested directives
There seem to be quite a few ways of communicating between directives. Say you have nested directives, where the inner directives must communicate something to the outer (e.g. it's been chosen by the ...
0
votes
1
answer
1k
views
Displaying complex objects in AngularJS
What's the best way to display complex objects in AngularJS in your opinion?
You have some data from a service used in multiple places in an app. You need to display multiple properties, each with a ...
3
votes
1
answer
895
views
Securing a REST API based on authentication with external site
I have a website with an already-established authentication system. Once a user logs on to it, one of the features is a statistics application based on AngularJS.
The app communicates with an ...
0
votes
2
answers
81
views
Strategy for Chrome timing out on a Database cleanup job which takes a long time
I have a notifications app which sends users notifications. It uses a .NET core backend, an angular frontend and Cosmos DB. Within this I have an API endpoint function which is linked to a button used ...
15
votes
1
answer
19k
views
AngularJS Directive vs Service vs Controller
I am about to start implementing a change request on my companies internal website, that will check a bunch of fields and highlight them if they match certain guidelines. For example, if the date of ...
-2
votes
1
answer
59
views
Does Angular (or other frontend framework with auto UI update) break Single Source Of Truth since using function within template should be avoid?
I know when building an Angular app (or other frontend framework with auto UI update by change detection), using function in a template is not recommended since it will result in the function being ...
13
votes
1
answer
1k
views
Order and filter Server-Sent-Events in angular.js eventsource
I have a Client in AngularJS where I consume multiple SSE (Server-Sent-Events) in Java from the Server Side (there are multiple endpoints in different web servers in the backend). Diagram link
I ...
10
votes
2
answers
10k
views
Client-side Rendering vs JSP's for Spring MVC Front End Dev
Firstly, a note on the app I'm about to discuss: It's quite large, on the order of magnitude of a service app like Airbnb -- i.e., it's not just a static web page, it is a full web application. It's ...
4
votes
1
answer
1k
views
Separating AngularJs and Django into individual Apps?
I am building a web application using AngularJs and our web server is built in Python Django Rest Framework.
I would like to have the two projects separated and not coupled.
In my current setup the ...
-1
votes
2
answers
1k
views
How to create data driven views in AngularJS?
I am building a support web front-end for our team from where we can perform various support functions for a number of different sites at which our products run. This typically involves running some ...
2
votes
2
answers
650
views
How can I structure my angular app so that I don't end up with one huge controller and view?
I have an angular app that concentrates most of its functionality around a primary entity that has several satellite entities. The UI for this is effectively one screen, with a few tabs, one for each ...
-2
votes
1
answer
58
views
Do I need a separate backend (Express) for an Angular project if using AWS for data storage?
So, I'm working on developing my first Angular project with/for a friend of mine and I have a design question before I really get started with things.
I'm going to be storing persistent data on AWS ...
-1
votes
1
answer
3k
views
Why was Google Maps built using canvas? If it was built today, would it have rather used react/angular? Why (not)? [closed]
Google Maps' frontend is almost completely dependent on canvas.
Given that it was initially developed a long time ago, is it still the best approach to take to build such a UI? If not, what is and ...
3
votes
1
answer
1k
views
How do functional programming advocates use a framework like React or Angular?
I read this blog post recently:
The Two Pillars of JavaScript
Part 1: How to Escape the 7th Circle of Hell, which is essentially a criticism of object oriented programming, and advocacy for funtional ...
2
votes
1
answer
5k
views
Django - separation from the frontend (Templates)
Long story short, let's assume I want to create a webpage that would enable the users to sell used cars.
I am a beginner to webdev, so pardon my ignorance. Fun fact: two months ago I knew literally ...
0
votes
1
answer
3k
views
Angular header/footer, Component or Module
I have been learning angular for a while now and I understand the point of modules and components (briefly) but now I am starting my own project using the framework I am somewhat confused. When should ...
1
vote
0
answers
667
views
How to design the state tree using redux?
In the last days I have searched for a documentation on how and when is it best to use redux and how to design the state tree.
My research ended in the conclusion that there is no one correct answer.
...
3
votes
2
answers
317
views
Is it a good idea to have separate UI components make their own webservice calls?
I have few UI components in an angularjs web-application. Each display data based upon same input. One shows stats which are calculated on the basis of a time period. Other shows a chart of daily ...
-3
votes
1
answer
1k
views
Angular 5- Where should logout code sit?
I want to create Logout Functionality in Angular 5. The logout function will contain following pseudo code:
Clear local storage authentication JWT token
Redirect to login page
My question is; where ...
7
votes
2
answers
11k
views
RESTful API communication between multiple web servers
I'm trying to understand RESTful communication, but I still have a few doubts.
I have a main web application (on the right side of the Architecture) made in AngularJS, which shows data coming from ...
5
votes
1
answer
753
views
IEC 62304, Are Software Frameworks (Spring/JEE/Angular/React) considered SOUP?
Im working on the implementation of an IEC 62304 compliant development process in our company and I have a question considering SOUP (Software of unknown Provenance).
Our goal is the develop a web ...
-1
votes
1
answer
354
views
Strategy To Upgrade Frontend Javascript Code - Typescript or New Framework?
Here is my scenario. I would like advice on which path to follow, along with good reasons as to why. It would even be better if you could give an example based on experience of a similar decision but ...
-4
votes
2
answers
4k
views
What is best one between JSF and angular for java hibernate,spring,strut application?
I want to develop application using java frameworks(spring,hibernate,strut). This application has large complex operations.I want to know what is the best between JSF and angular? As well as i want ...
8
votes
3
answers
636
views
Angular View Model Validation
The view model seems to be the most appropriate place to perform validation yet Angular seems to be pushing me down the popular form validation route.
Why Model Validation?
DRY - Applying validation ...
1
vote
1
answer
752
views
How to architect a very big web application using server and / or client rendering?
I recently finished a project which contains more than 30 different pages/features. Each one with some CRUD and more subpages. Each page is totally different from another in purpose. All of it was ...
3
votes
2
answers
4k
views
What is a good method of storing test data for development and unit testing with angularjs and jasmine?
What is a good method of storing JSON data/objects for development and unit testing with angular and jasmine?
I have seen some ways of accomplishing this. However, since I am new to unit testing with ...
11
votes
2
answers
985
views
angularJS code sharing across hybrid Ionic app and regular mobile website
Ok, so in our 'innovation lab', there is currently a push to use Ionic, an hybrid app framework built on top of Cordova for native access and angularJS for the ‘web code’.
There are also some ...
2
votes
5
answers
10k
views
asp.net mvc vs angular.js model binding
So I've noticed a trend lately of .net web developers using angular.js on the client side of applications and I've become more curious as I play around with angular and compare it to how I would do ...
9
votes
2
answers
7k
views
Where should I start reading AngularJS's source code? [closed]
After reading this article I realized that I really didn't read any "serious" source code during my 3-years as a professional developer.
Recently I started a new web-project which makes heavy use of ...