background preloader

Angular JS

Facebook Twitter

AngularJS VTECL. Best Practices · angular/angular.js Wiki. Related: Anti-Patterns Namespace distributed code You shouldn't worry about prefixing internal code, but anything you plan to OpenSource should be namespaced The ng- is reserved for core directives.Purpose-namespacing (i18n- or geo-) is better than owner-namespacing (djs- or igor-)Checkout ui-alias to remove 3rd party prefixesOnly use .

Best Practices · angular/angular.js Wiki

$broadcast(), . $emit() and . $on() for atomic events Events that are relevant globally across the entire app (such as a user authenticating or the app closing). If you want events specific to modules, services or widgets you should consider Services, Directive Controllers, or 3rd Party Libs $scope. Build Apps with AngularJS. This guide gets you started building Chrome Apps with the AngularJS MVC framework.

Build Apps with AngularJS

To illustrate Angular in action, we'll be referencing an actual app built using the framework, the Google Drive Uploader. The source code is available on GitHub. The Google Drive Uploader allows users to quickly view and interact with files stored in their Google Drive account as well as upload new files using the HTML Drag and Drop APIs. It's a great example of building an app which talks to one of Google's APIs; in this case, the Google Drive API.

Note: You can also build apps which talk to 3rd party APIs/services that are OAuth2-enabled. The Uploader uses OAuth2 to access the user's data. Key features this app uses: All Chrome Apps require a manifest.json file which contains the information Chrome needs to launch the app. A stripped down version of the Uploader's manifest looks like this: The most important parts of this manifest are the "oauth2" and "permissions" sections. FrAngular : AngularJS en français. Popular Modules - AngularJS Modules, Plugins and Directives. More AngularJS Magic to Supercharge your Webapp. Make way for another amazing article which covers more of AngularJS Due to the popularity of the previous article, Use AngularJS to power your web application, I've decided to cover more of AngularJS to make it fun and easy for all developers to play around with it.

More AngularJS Magic to Supercharge your Webapp

AngularJS is an incredible tool, but a lot of the more advanced features are hidden in deep within the documentation and others are too tricky to learn direclty. AngularJS is also a fairly new product and as a result there are many features that are yet to be discovered and blogged about. This article will cover more of the hidden gems of AngularJS and introduce new development tricks and methods to supercharge your AngularJS application. Pleaes read onwards if you wish to become an AngularJS web guru :). This page was first published on October 2nd 2012 and was last updated on January 30th 2013. This article is a sequel to the previous article titled Use AngularJS to Power Your Web Application.

AngularJS Cheat Sheet by ProLoser. AngularJs Tips and Tricks [UPDATED] ☢ DeanSofer.com. These tips were developed in AngularJs v0.10.5 v1.0.1.

AngularJs Tips and Tricks [UPDATED] ☢ DeanSofer.com

I'll keep updating this post, so check back often! I've compared a LOT of different javascript frameworks for my company's rewrite, and finally settled on AngularJS because of how rapidly I'm able to produce prototypes. In my opinion, although it's very alpha and fairly lacking on the graphical side, it's excellent for CRUD applications (meaning forms, tables and reports). I'm still trying to lean towards emphasizing reusable widgets and directives instead of just custom-coding everything for your own app. If you are still on the fence take a look at TodoMVC for an excellent unbaised comparison. Most of these tips have been moved to AngularUI - Go check it out! The companion suite to AngularJS, a collection of work by many AngularJS users with a plethora of useful utilities.

Table of Contents Serializing the Form No. 5 surprisingly painful things about client-side JS - The Sourcegraph Blog. Updated: The title of this post previously began “Why we left AngularJS: ...”, but that was removed because these points are generally applicable to single-page JS app frameworks.

5 surprisingly painful things about client-side JS - The Sourcegraph Blog

Some folks construed this post as a criticism of AngularJS specifically, but that wasn't my intent. — Quinn When we opened up Sourcegraph to the public a few months ago, it was a rich AngularJS app. The server delivered the initial HTML page and hosted JSON endpoints. AngularJS did everything else. This was an easy way to create the initial version of Sourcegraph, in the early days before we knew what it'd become. But single-page JavaScript frameworks aren’t a good fit for every site. Angular-carousel demo. Call a Directive Controller's method from Parent Controller in AngularJS. Scope isolé dans les directives AngularJS. Second sujet que j'ai traité au Meetup chez Google, il s'agit des scopes isolés dans les directives.

Scope isolé dans les directives AngularJS

Les slides se trouvent ici, et une vidéo a été mise en ligne là ; mon intervention commence par un sujet sur l'usage des services, et celui-ci est à la suite. Le scope isolé est un outil bien pratique mis à notre disposition par AngularJS pour faciliter la création de widgets. Marco da Silva : AngularJS : Change title based on Route. AngularJS is used to build single page WebApps.

Marco da Silva : AngularJS : Change title based on Route

Considering it's nature, you will only have 1 Title for your page, so even if you go to '/product' or '/about', you would see the same Title on the Browser. Not really user friendly... Where is one possible solution around this problem. On your HTML, change the title tag to include a ng-bind: API: API Reference. Loading...

API: API Reference

Welcome to the AngularJS API docs page. These pages contain the AngularJS reference materials for version 1.5.5 material-conspiration. The documentation is organized into modules which contain various components of an AngularJS application. These components are directives, services, filters, providers, templates, global APIs, and testing mocks. Angular Prefixes $ and $$: To prevent accidental name collisions with your code, Angular prefixes names of public objects with $ and names of private objects with $$.

Angular UI

L'API Promise d'AngularJS. Les services standards d'AngularJS $timeout et surtout $http renvoient tous deux des promises, qui sont très pratiques pour gérer des opérations asynchrones.

L'API Promise d'AngularJS

Cette notion de promise existe dans d'autres frameworks, comme jQuery, et AngularJS intègre une implémentation de cette API. Elle peut être utilisée par les développeurs dans l'écriture des leurs propres services pour simplifier la gestion des actions asynchrones. C'est très important de bien comprendre comment fonctionne cette API, qui est probablement la partie la plus ardue d'AngularJS, pour tirer profit de toute la puissance du service $http, et pour gérer facilement les enchaînements d'opérations asynchrones dans une application.

Décrire en français le fonctionnement de l'API de promises ne va pas être simple, car il est difficile de traduire de façon élégante les notions qu'elle recouvre sans s'éloigner des termes anglais utilisés comme noms de méthodes. Building a RESTful web service with AngularJS (and PHP) – More power with $resource. Developer Guide: Developer Guide. Loading...

Developer Guide: Developer Guide

AngularJS — Superheroic JavaScript MVW Framework.