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
9
votes
1
answer
10k
views
Create an AngularJS front end for a Microservices application
I want to create a Microservices application, in which every microservice is responsible for its own part of the front end. At the same time, I want to create the front end in AngularJS as a Single ...
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
vote
2
answers
2k
views
What is the best way to create dynamically a DOM?
I know that there are plenty answers to this question on stackoverflow, but I can´t find one that give me an answer that can help me to solve a question that came out after read a lot of Javascript, ...
9
votes
1
answer
814
views
Is obtrusive JavaScript required to support a feature of AngularJS?
I'll start by saying I'm just learning about AngularJS, and I was reading this article, which seems to advocate for obtrusive JavaScript as the right thing:
http://www.ng-newsletter.com/posts/angular-...
1
vote
1
answer
1k
views
How does AngularJS manage scope in ng-repeats?
I have a table that has around 60 rows and 20 columns. Each cell has a directive with an isolated scope. I use 2 nested ng-repeats to generate the table (one for rows and one for columns), but I'm ...
3
votes
1
answer
579
views
How do I create a modal service with AngularJS?
I'm trying to make a service that's polymorphic based upon what mode is specified in the URL. If the char param in the route is set to 'p', I want to use a PresentMode service. If the char param is ...
1
vote
1
answer
95
views
Is having a parent controller to manage a set of tabbed sections an anti-pattern for an angular application?
A lot of times, I have long forms that I divide into multiple tabbed sections. Each section is managed by it's own controller and there is a parent controller that manages the whole view. I use ui-...
3
votes
1
answer
313
views
AngularJS directive as components
I am in a project where we want to componentify a lot of "information boxes".
These boxes (lets say they are mostly different types of tables) should easily be included into different pages and even ...
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 ...
6
votes
1
answer
1k
views
Functional programming pattern for async JavaScript code
I have adopted a pattern in one of my projects that I really like and I suspect it's likely to be something standard. I'd like to describe it here and see if you guys can tell me how other ...
2
votes
1
answer
659
views
NodeJs website webapp architecture
I would like some advice on how best to architect a website comprising the following:
tool
a landing page, open to the public, main marketing tool
the main website/app, that people can access only if ...
10
votes
1
answer
1k
views
How to avoid module dependency chain nightmare caused by transitive dependencies?
Many (most?) AngularJS folks seem to advocate for breaking AngularJS apps up into many modules.
Brian Ford in his blog already states that packaging by layer (controller, service, etc.) is a "silly" ...
2
votes
1
answer
4k
views
Server side or client side mvc: which approach imposes less load on the server?
Which is the best approach when developing a dynamic web app with multiple views and dynamic content. regarding server load and responce times:
use a server side mvc (such as Sailsjs or ASP.NET MVC) ...
1
vote
0
answers
290
views
Is one of these the more "Angular" way of communicating with a directive?
I am working on a project where I would like to encapsulate a directive library and distribute it to other developers to use. I would like to keep the changes to the model within this encapsulated ...
2
votes
0
answers
57
views
Angular UI's $StateProvider [duplicate]
I was thinking of using Angular UI, and specifically its $StateProvider, which makes it easy to create nested views, in my next application. Until now, I have been using vanilla Angular's ngInclude ...
1
vote
1
answer
111
views
SPA Applications: AJAX to fetch templates or build from strings
I'm working on a large angular application and I'm currently using a factory class that builds HTML templates from strings. We don't have to worry about mobile support for the application and I'm ...
2
votes
1
answer
413
views
In AngularJS, why do we use scope instead of $scope in the directive link?
Just curious why whenever I see an example of a directive using a link, the parameter for scope is scope and not $scope?
This is always biting me because I'm so used to typing $scope, my brain auto-...
4
votes
1
answer
24k
views
Using ng-init to initialize data in Angular controller
Recently I came across the following in one of our projects. In one of our MVC views they are passing model data to an Angular controller through ngInit directive.
In xxx.cshtml:
<div ng-...
2
votes
1
answer
581
views
What is the "best practice" for converting an external API's data structure?
When an API's data structure does not fit well with an angular app, I am trying to determine the best-practice in my specific design and implementation for converting it to a usable structure.
I was ...
3
votes
1
answer
1k
views
Cross browser client side storage
I am developing an angularjs app. The app has to run in current FF, IE, Chrome and on iOS/Android via Phonegap.
I am looking for a solution to store data in the client.
Phonegap offers a web sql api,...
0
votes
1
answer
116
views
Ideal & idomatic javascript interface for RESTful API
I am trying to write an angular service to interface with a RESTful API.
For sake of simplicity, lets assume the API is
+ Company
|___+ Department
| |____ Person
|
|____ Person
Notice how person ...
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 ...
1
vote
1
answer
225
views
Would it be the right software engineering system to move from AngularJS-based to jQuery-based or hybrid implementation for webapp?
I am presently working on an AngularJS-based chat webapp, and it polls the server for updates, and then renders them in what is pretty much a straight shot in AngularJS. The result looks appropriate ...
1
vote
0
answers
893
views
AngularJS directive architecture: Where to put parameters?
I'm using a charts-Plugin (Morris.js) in my AngularJS application. I'm building a directive for each type of chart.
The plugin is called like this:
new Morris.Line({
// ID of the element in which ...
1
vote
1
answer
2k
views
AJAX or web sockets for client-server communication?
I recently took a course on AngularJS, and quite frankly I loved the concepts of a website that fetches json to handle subsequent requests, however I still feel like Javascript is far too slow for ...
1
vote
2
answers
24k
views
How to structure REST api service that accepts POST parameters in the body
Everything I've read says to pass parameters to a REST service in the URI, whether by template, or query string:
https://www.myapp/my/login/api/authenticate/ganders/mypassword
or
https://www.myapp/...
1
vote
2
answers
526
views
Using AngjularJS with Twitter Bootstrap
I want to refactor an OLD legacy application and give it a new feel... so, I want to use Twitter Boostrap for the UI... I've also been playing around a lot with AngularJS... is it common place to use ...
0
votes
2
answers
825
views
Javascript, JQuery and now AngularJS What is happening? [closed]
I have been away from computers for about 3 years and starting to get back into programming. Lots has changed in resources and help sites available on the web especially the evolving StackExchange ...
3
votes
2
answers
2k
views
Why don't we completely de-couple frontend JS frameworks and backend APIs? [closed]
Whenever we implement a frontend framework in the likes of Backbone, AngularJS etc. there's an integration process involved with the backend technologies like NodeJS, Rails, Yii etc. (like setting up ...
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://...
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 ...
6
votes
3
answers
3k
views
Dividing responsibilities between client and server
I'm working on a Web app that uses node.js on the server and AngularJS on the client. I'm new to Angular, but enables writing client-side applications that can be more self-contained than some other ...
9
votes
1
answer
9k
views
Suggested setup for angularJS development in Visual Studio 2013 [closed]
I am starting with AngularJS. The back end will be Web API (which is new to me as well) and I'd like to use just one IDE, so I'm trying to figure out how to setup a project in Visual Studio 2013 for ...
1
vote
1
answer
6k
views
Global variables in javascript
I don't consider myself a highly skilled javascript developer, but I thought I got one thing right for sure: don't create global variables unless you really have to.
I've been learning angularjs ...
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 ...
2
votes
6
answers
8k
views
How can I team up two MVC frameworks without having them fight each other? [closed]
I'm creating a CRUD-based web project, and am thinking about using a server side MVC framework (such as CodeIgniter or Laravel) in tandem with a client side MVC framework (such as AngularJS). Is this ...
3
votes
0
answers
522
views
Reducing code complexity for an interface between angular and d3
I'm playing around with different ways of integrating d3 and angular, in the context of learning both of these frameworks, and am hoping for some input:
My client application receives a JSON array ...
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 ...
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 ...
7
votes
2
answers
6k
views
Decoupling Server and Client using REST API
I was thinking about how I can decouple a web-application completely into a server-side and a client-side component. I want to decouple the app to the extent that I can host both components on ...
1
vote
0
answers
829
views
scaffolding a multi-angular-app portal with usersystem
I'm trying to find the best way of developing a portal that a user can log in to and then be presented with a range of different apps (angular). They should share the same api-backend.
I think that ...
1
vote
1
answer
912
views
How should my AngularJS "wizard" be structured?
For brevity's sake, consider the following scenario:
Part of my application is a wizard for bringing on new clients and it's a dynamic page. One step contains billing information, another step is ...
7
votes
1
answer
4k
views
Should front-end integration tests make HTTP requests?
I am developing a single-page web application using AngularJS. Data for this application is consumed over a REST API which is well tested in its own right.
The Angular application has a bunch of unit ...
3
votes
1
answer
2k
views
How many Angular Controllers and/or Directives is too many?
I'm building a large, editable data table with angular, and I'm trying to figure out what the best practice is.
The table will be a couple of hundred rows, with a couple of dozen columns, so upwards ...
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 ...
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 ...
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)?
4
votes
2
answers
1k
views
Session management in a Service Oriented Architecture
Where should you manage a users session in a SOA? Should you manage it in the Web Service or in the client and why?
My application is SPA
(Considering that this will be the stacked that will be used
...
1
vote
2
answers
2k
views
Custom directive or ng-show/hide
On my form I have an icon which represents whether my entity is locked (shown by a locked padlock) or unlocked (an open padlock). At the model level, this is represented by a boolean property (...
1
vote
2
answers
285
views
What parts of functionality should be refactored into a directive?
I am creating an application from legacy code using AngularJS.
I wonder what parts of my code should be moved into a directive.
For example, iI had thought of moving a table which is used multiple ...