background preloader

AngularJS Fundamentals In 60-ish Minutes

AngularJS Fundamentals In 60-ish Minutes

An Introduction to AngularJS Forms Validation AppDemoStore Realtime Web Apps with AngularJS and Firebase Shuffle Letters Effect: a jQuery Plugin Martin Angelov In this short tutorial we will be making a jQuery plugin that will shuffle the text content of any DOM element – an interesting effect that can be used in headings, logos and slideshows. The Code The first step is to write the backbone of our jQuery plugin. assets/js/jquery.shuffleLetters.js (function($){ $.fn.shuffleLetters = function(prop){ var options = $.extend({ },prop) return this.each(function(){ }); }; function randomChar(type){ } })(jQuery); Next we will turn our attention to the randomChar() helper function. function randomChar(type){ var pool = ""; if (type == "lowerLetter"){ pool = "abcdefghijklmnopqrstuvwxyz0123456789"; } else if (type == "upperLetter"){ pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; } else if (type == "symbol"){ pool = ",.? We could have used a single pool string for all types of characters, but this will do for a better effect. The Plugin In Action Now lets write the body of the plugin! assets/js/script.js Done by Martin Angelov Tutorials jQuery

Build Apps with AngularJS This guide gets you started building Chrome Apps with the AngularJS MVC framework. 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. Template laid out. Woot!

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 .$broadcast(), . jQuery Validation Plugin | Form validation with jQuery JSbooks - free javascript books jmcunningham/AngularJS-Learning

Related: