background preloader

Angular

Facebook Twitter

How to Create a Simple Modal Dialog Directive in Angular.js · Adam Albrecht. 12 Dec 2013 Modals are Easy I’ve used a dozen or so modal / lightbox plugins over the years, almost exclusively jQuery-based.

How to Create a Simple Modal Dialog Directive in Angular.js · Adam Albrecht

But you know what I didn’t realize until fairly recently? Modals are easy to build yourself from scratch. So let’s make one in the Angular fashion. The Requirements I want to be able to create a modal with the following HTML: <modal-dialog show='modalShown' width='750px' height='90%'><p>Modal Content Goes here<p></modal-dialog> And I’d like it to have the following features: Toggle it by setting a single $scope variable to true or false (above, the variable is modalShown) Optionally specify the height and width as either a px or % value. The Directive Code This is a fairly simple directive, with a link function that’s only a few lines long.

The Template The template is also fairly basic. The CSS I’m not going to spend any time going over this, but I will say that the following will only work in modern browsers (specifically the translate function). Triggering the Modal. AngularJS — Superheroic JavaScript MVW Framework. Apprendre Angular en un jour, le guide ultime · VF svp. Source: Ultimate guide to learning AngularJS in one day par Todd Motto Qu’est-ce qu’AngularJS ?

Apprendre Angular en un jour, le guide ultime · VF svp

Angular est un framework MVC/MVVM côté client, développé en JavaScript, ce qui est obligatoire pour faire une application moderne à page unique (ou même un site internet). C’est un grand bond vers le futur de HTML et vers ce que HTML5 apporte. C’est également un grand bol d’air frais dans le monde des applications web modernes.

Cet article est une vue de bout en bout, issue de mon expérience, et contient des conseils et astuces glanés au travers de mon utilisation d’Angular. Terminologie Angular a une courbe d’apprentissage assez courte qui consiste principalement à appréhender la terminologie et la “pensée MVC”. Vous avez probablement déjà entendu parler de MVC. Modèle structure donnée représentant une entité de l’application, généralement transmise en JSON. Vous pouvez accéder à cette information de deux façons. Vue La vue est simple, c’est votre HTML et/ou la sortie générée. Contrôleur Résultat:

Développer une application REST avec Spring MVC & Angular.js. 31 juil. 2012 Aujourd'hui plus que jamais, le Javascript a le vent en poupe.

Développer une application REST avec Spring MVC & Angular.js

On le trouve même côté serveur - ce que je trouve personnellement d'une absurdité étourdissante, mais passons. En ce moment, la mode est aux frameworks MVC côté client ; là, j'y crois déjà un peu plus. Mais il en sort environ un par semaine, et il est difficile de faire son choix, malgré la pléthore de comparatifs qui fleurissent sur le net (ici, là, ou encore là-bas). Thoughtworks, de son côté, estime que la peinture n'est pas encore sèche et qu'il vaut mieux attendre un peu avant de se lancer dans ce genre d'aventure en production. Pourtant, dans le tas, il y en a un qui m'a fait de l'oeil : Angular.js.

AngularJS–Part 1. This is an introduction to AngularJS and is mainly meant as a internal reference for our development team.

AngularJS–Part 1

More posts on the topic will follow. AngularJS is one of the most popular Open Source JavaScript frameworks. It is developed by Google and has a huge community surrounding and supporting it. We use AngularJS to migrate the MS Silverlight based client of our complex enterprise application to HTML5/CSS/JavaScript. Several factors were deciding in the choice of the framework. We have been developing a lot of infrastructure on our own in the past. Base on our experience with Silverlight we also wanted to avoid a proprietary or closed source solution.

AngularJS seems to have the biggest and most active community. AngularJS is extremely simple to start with. To start coding with angular we need nothing else then download the angular.js file (stable branch, uncompressed) from here and use a text editor like Notepad++, Vim or Sublime to name just a few. Gabriel N. Java EE 7 with Angular JS – Part 1. Today’s post will show you how to build a very simple application using Java EE 7 and Angular JS.

Java EE 7 with Angular JS – Part 1

Before going there let me tell you a brief story: I have to confess that I was never a big fan of Javascript, but I still remember the first time I have used it. I don’t remember the year exactly, but probably around mid 90’s. I had a page with 3 frames (yes frames!