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.

AngularJS is an open-source JavaScript framework for building CRUD centric AJAX style web applications. Its goal is to shim the browser to augment the HTML vocabulary with directives useful for building dynamic web-apps.

Angular ships with directives which add 2-way databinding, DOM control and unrolling, code-behind DOM, form validation, and deep-linking.

Angular's Philosophy

  • Angular philosophy encourages developers to create their own directives, turning the HTML into a DSL suited to building their kind of app. The result significantly reduces the amount and complexity of JavaScript needed to build web applications.
  • The Angular philosophy is that UI is best described in declarative form (HTML), and that behavior is best described in imperative form (JavaScript) and that the two should never meet.

Notable features

  • Teach your browser new tricks by adding behavior to HTML tags/attributes
  • Controllers provide code-behind DOM with clear separation from the view
  • 2-way data binding without the need to extend or wrap the model objects
  • Dependency injection assembles the application without 'main' method
  • Promises / futures remove many callbacks from code when communicating with server
  • Form validation
  • Strong focus on testability

Bits

Community

Getting Started

Presentations

Recent

Video Tutorials

  • egghead.io - Growing collection of short AngularJS screencasts

Who is using

Developed by Google

202 questions
60
votes
2 answers

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 user).
Michal Charemza
  • 1,320
  • 1
  • 10
  • 16
59
votes
4 answers

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? Isn't it one or the other?
Natalie
  • 727
  • 1
  • 5
  • 7
49
votes
10 answers

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 .NET platforms using XAML and .NET languages. In…
Kelly Sommers
  • 599
  • 1
  • 4
  • 3
40
votes
3 answers

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…
mg1075
  • 597
  • 1
  • 5
  • 9
36
votes
4 answers

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)?
WTK
  • 471
  • 1
  • 4
  • 6
35
votes
6 answers

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 JavaScript should only be used to enhance…
21
votes
1 answer

Why sending a file is so difficult using angular?

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 server using multer with no problem. Is very simple.…
cauchi
  • 1,192
  • 2
  • 13
  • 22
16
votes
4 answers

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 want to use npm and node-tools for the front-end,…
15
votes
1 answer

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 birth is today, that field will be outlined and…
Bobo
  • 253
  • 1
  • 2
  • 6
13
votes
1 answer

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 currently register a listener to each type of event…
vak
  • 301
  • 1
  • 2
  • 6
12
votes
5 answers

Server side C# MVC with AngularJS

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 many cases. Set up the application initially using…
Ryan Langton
  • 355
  • 2
  • 3
  • 7
11
votes
2 answers

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 projects which are pure mobile web, using Angular +…
MikaelW
  • 641
  • 5
  • 12
10
votes
4 answers

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 and does not retrieve latest result immediately.…
Gene
  • 251
  • 1
  • 2
  • 8
10
votes
2 answers

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 in the early stages of development. Here's the…
Ovid2020
  • 111
  • 1
  • 1
  • 6
10
votes
1 answer

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" notion, so I won't even go there. (See…
Nick Saunders
  • 201
  • 1
  • 3
1
2 3
13 14