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
1
vote
2
answers
115
views
How can I tell when the Angular2 online documentation (or any website) changes?
I'm trying to keep up-to-date with the latest-greatest from Angular2, in part by carefully reading the official online documentation. Is there a way to be notified or at least to figure out relatively ...
0
votes
1
answer
71
views
REST API crossresource operations structure
I'm wondering what's best practice in next use case:
I'have a view that displays data for 3 resources User, Company, and CompanyType (chosen in select, can be added dinamicaly so it's not enum).
What ...
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 ...
0
votes
1
answer
97
views
How should I balance memory with network latency on a paginated table?
A web application I'm working on has a tool that queries a database and returns up to several thousand rows. When considering pagination, at what point does it make more sense to get the entire result ...
0
votes
0
answers
248
views
Socket.io takes time to load up, what to do while the page is connecting...?
For a real-time forum app I'm working on currently.
It takes about 1-5 seconds for the sockets on my node.js server to connect and deliver the first payload, which is some database results from mongo....
3
votes
0
answers
79
views
How to wireup the Edit Functionality of a Entity and make REST API when it contains Dropdown Values
I am having a scenario wherein we have a Product Entity or a Front End Module which can be Added, Edited and Deleted.
Now Product ( when added or edited) can contain a Dropdown called as ...
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.
...
0
votes
1
answer
3k
views
When do I use square brackets around routerLink in Angular2?
In Angular 2 (currently 2.0.0-rc.6), routerLink is used as a directive to indicate a path we wish to follow in our routing, e.g. in response to clicking a link.
However, in the documentation both of ...
6
votes
1
answer
245
views
Globally interesting state in angularjs
I've created maybe five services like RoleService, AuthService, etc. Each of them has some state (e.g., RoleService.role, AuthService.isLoggedIn) affecting a lot of controllers and some other services ...
0
votes
2
answers
919
views
Scalable Angular SPA Architecture
I am developing an Angular SPA and I am currently in the design phase. I have created a sample architecture which I am planing to use in my SPA but I would get some feedback because I want the ...
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 ...
5
votes
1
answer
872
views
Different type of MEAN Stack Architectures
I am reading a book (Getting MEAN by Simon Holmes) about MEAN Stack which talks about different architectures that can be used while developing an app in MEAN Stack and I got a little confused with ...
0
votes
1
answer
1k
views
Is Angular 2 ready for production use or should I use AngularJS 1? [closed]
I want to learn AngularJS but on the website I see a button with the text Try the new Angular 2.
Is Angular 2 ready for production use or should I learn and use AngularJS 1?
-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 ...
0
votes
1
answer
102
views
Recommended strategy for changing javascript UI table library?
tl;dr - On an existing angularjs grid library, am moving to another.
Is it better to wipe out as much code as possible and in a sense code from scratch to the same featureset, or work around what's ...
0
votes
1
answer
858
views
Is it a Good Idea to use REST API from Javascript Code
I am Developing a E-Commerce Web Application as a part of my learning using Spring Hibernate and AngularJs.
I have written some Rest API's Controllers in Spring and then from the Web Component i am ...
3
votes
4
answers
791
views
Unit of Work AngularJS
I am writing an application in Angular JS (1.5), and I need to be able to track a model for changes (updates/deletes/additions). For example, I have an ng-model that holds an array of user pets. This ...
0
votes
0
answers
120
views
AngularJS: cost of deep watching infrequently changed object trees
I am working on a complex widget with a "preferences" object tree with 50-100 objects and 3-5 properties in each object. Each property is watched by Angular and controls how some aspects of the data ...
2
votes
1
answer
634
views
Separate codebase for responsive website and mobile apps?
I made a simple responsive single page web app (about 5 views) to replace our old jsf web application using angularjs+bootstrap. Now looking into frameworks like ionic, cordova and trigger.io.
what I ...
0
votes
0
answers
266
views
Is passing controllers to another controller a good practice in AngularJS?
I have a register page that uses text inputs as well as an avatar input. There's another part in the website where the avatar input is also used, but it's used alone this time. So I'd like to make it ...
2
votes
1
answer
511
views
Structuring a Game with Angular.JS [closed]
For a GameJam I'm trying to code a simple web-based text adventure game with sprites and small animations in AngularJS. I'm a little new to Angular and am having some trouble figuring out how to ...
2
votes
2
answers
295
views
Web App Authentication's Architecture Related Query
I have a web app that makes use of node.js in the backend and angulajs on the front end.
Let's say I have a user who has the ability to login via multiple systems; I must allow multiple logins.
I ...
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 ...
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 ...
3
votes
1
answer
1k
views
REST is not appropriate for business applications because of necessary to distribute business logic accross layers. REST alternative required!
I have Spring+Java Server Faces (Facelets) application for which I would like to create Single Page Application (SPA) version, e.g. using AngularJS (which is the best and most popular GUI framework). ...
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 ...
2
votes
3
answers
267
views
Can one html page with web services replace current server-client technology?
I have everything I need in 2 services in form of REST api's, is it a good idea or even possible to replace my existing asp.net app by writing ONE single html page (embedded with Angular templates) ...
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 ...
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!</...
5
votes
1
answer
4k
views
Is there any reason to use id= or name= on AngularJS directives?
I have just noticed that I am coding stuff like this:
<input type="text" ng-model="userName" id="userName" name="userName" />
And it occurs to me that I have access to the data though ng-data. ...
2
votes
1
answer
305
views
Code smell in AngularJS custom directive
In the below code.
<!DOCTYPE html>
<html ng-app="app10" ng-cloak>
<head>
<title>Custom directives</title>
<style>
[ng\:cloak], [ng-...
0
votes
2
answers
95
views
Where should my service do it's data fetch?
I have an angular service that fetches data that will be used by multiple controllers. I only want to fetch the data from the db once and then have the service store the data in an object which ...
-1
votes
2
answers
854
views
Angular JS vs Modern MVC frameworks
I might be wrong for some things here, but here is what I recently though about.
Modern frameworks MVC such as ASP.NET MVC 5, CakePHP, Java Spring etc. has their logic clearly separated into Models ...
1
vote
0
answers
1k
views
In what situation will AngularJS caching the DOM element be useful when using ngRepeat?
I think one of the things a developer faces when using ngRepeat, is that the when the i has the same value in an array, as in ng-repeat="i in myCtrl.arr", then:
angular.js:13236 Error: [ngRepeat:...
0
votes
0
answers
73
views
HTML Encoding - XSS protection
My general rule for web development is that the server encodes HTML tags in any user-generated input when it is first submitted to prevent XSS.
However recently someone suggested that instead of ...
-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 ...
1
vote
4
answers
1k
views
How and where to test if the JSON request objects generated by the front-end is valid
We have built a complex Angular application that sends multiple HTTP request to a REST service that is also built in house.
Since both the frontend and the backend is being developed in parallel, ...
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
1
answer
1k
views
Accessing data from private API (with Basic Auth credentials) using Angular JS
I have been tasked with connecting an existing Angularjs app to a third party service via API using Basic Auth credentials I got from the third party website.
I am not as experienced with Angular and ...
1
vote
2
answers
154
views
Software design for Client side form validation
So Im using the MEAN framework to build my web app. Like all other apps it requires a login & registration.
My Approach so far has been:
Every major function of my app has its own AngularJS ...
1
vote
1
answer
1k
views
Pros and Cons of odd iframe 'architecture'
I'm in the process of experimenting with ways of breaking up a large (and growing project). Currently, we're working with a big Angular application with what will soon be a large number of components.
...
0
votes
1
answer
733
views
Is pure RESTful required for Angular JS / Backend running on same web server?
I am developing an application with Sprintboot + REST + Angular. While I am working on the REST API, I am trying to design as RESTful as possible. I'm encountering certain pages where the Angular UI ...
2
votes
3
answers
2k
views
if ngModel is for changeable element and ngBind is for unchangeable element, couldn't they just both have the same name?
Is it true that ngBind and ngModel are very similar: bind the model (the data) the either static text element or changeable element, such as text input box, select element, or textarea.
In that case, ...
1
vote
1
answer
2k
views
JavaScript & AngularJs Modules Implementation technique and structure
So Im building an app and I'm trying to implement the structure of the app so that its robust and scalable in future.
My app is mostly divided into JavaScript Modules (revealing pattern):
// filter....
6
votes
1
answer
1k
views
In SPA what happens in terms of memory and performance when user hops across all the pages?
Imagine a humongous web aplication built using Single Page Application framework such as AngularJS. With its each route it downloads a couple of HTML template files. Each of these template files ...
0
votes
1
answer
566
views
If AngularJS already takes care of the MVC, would using ReactJS be needed if it is just the View part?
I heard that AngularJS is becoming quite popular, and at the same time ReactJS is also. But if AngularJS already takes care of MVC with 2 way binding between model and view, would ReactJS actually be ...
0
votes
1
answer
3k
views
AngularJS and NodeJS required version
I am new to the world of Javascript and their frameworks, and I feel a bit lost with this. I am trying to follow the official toutorial of AngularJS. In one of the first sections, it reads
Install ...
-3
votes
1
answer
296
views
Is it better to have a single, more general directive or multiple type based directives in Angular?
Is it considered good practice to have:
Single, general directive that has multiple data-* parameters and serial data is binded from controller
Single, general directive that has config and serial ...
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? ...
2
votes
3
answers
291
views
Angular JS style guide when declaring variables
I'm new to Angular JS and working on a project with "legacy" Angular JS code. The code is about a year or half a year old. I often see stuff like this:
var _link;
_link = "http://localhost";
Or:
var ...