How to convert a jQuery plugin to AngularJS Directive. Ng-iScroll - AngularJS Modules, Plugins and Directives. AngularJS Module that enables iScroll 4.x to work using a directive Demos See demo/ Directory or Demo in JSFiddle Note: Recommended to be used with iOS or Android devices only Dependencies Reporting Issues Issues can be reported at the Github project.
Usage Include ng-iscroll.js or ng-iscroll.min.js in your html header or existing file before your application main js fileAdd 'ng-iscroll' to your Angular app's dependencies Example var App = angular.module('App', ['ng-iscroll']);Add directive ng-iscroll to the <div id="wrapper"> Example: <div id="wrapper" ng-iscroll> * Note: the 'id' and 'ng-iscroll' must on the same div element for this directive to work correctlySee demo/demo_multiple_iscrolls.htm for how to use multiple iScroll divs on the same page Options Forms: Forms within an iScroll has certain issues with editing Text values or Select boxes.
See demos/ directory for examples of both Special Thanks Thanks to the following help for submitting bugs and suggesting new features: Expanding Overlay Effect. Lisbon21°C closeLisbon21°CMon19°CTue19°CWed18°CThu17°CFri19°CSat22°CSun18°C Paris11°C closeParis11°CMon12°CTue11°CWed10°CThu9°CFri10°CSat10°CSun12°C Belgrade15°C closeBelgrade15°CMon16°CTue17°CWed15°CThu13°CFri10°CSat11°CSun12°C Moscow2°C closeMoscow1°CMon-1°CTue-2°CWed-6°CThu-4°CFri-5°CSat-6°CSun-8°C New Delhi17°C closeNew Delhi17°CMon18°CTue19°CWed16°CThu17°CFri18°CSat17°CSun17°C Tel Aviv23°C closeTel Aviv22°CMon23°CTue22°CWed22°CThu21°CFri21°CSat21°CSun24°C Cairo21°C closeCairo21°CMon22°CTue20°CWed21°CThu21°CFri21°CSat22°CSun23°C New York3°C closeNew York3°CMon3°CTue-1°CWed-2°CThu1°CFri0°CSat2°CSun3°C San Francisco15°C closeSan Francisco15°CMon16°CTue14°CWed13°CThu15°CFri15°CSat16°CSun15°C Tokyo8°C closeTokyo8°CMon7°CTue6°CWed8°CThu8°CFri6°CSat5°CSun5°C Sydney25°C closeSydney28°CMon24°CTue26°CWed27°CThu30°CFri31°CSat29°CSun29°C.
Using Promises in AngularJS Views - Mark Dalgleish. One of the lesser known yet more surprisingly powerful features of AngularJS is the way in which it allows promises to be used directly inside views.
To better understand the benefits of this feature, we’ll first migrate a typical callback-style service to a promise-based interface. Working with callbacks For now we’ll sidestep a discussion on the advantages of promises compared to callbacks, and focus soley on their mechanics. As a working example, let’s take a look at an example service with a single ‘getMessages’ function. This admittedly contrived service’s ‘getMessages’ function takes a callback, then waits two seconds (using Angular’s $timeout service) before passing an array of messages to the callback function.
If we use this example service inside a controller, it looks like this: Upgrading to promises If we instead wanted our ‘HelloWorld’ service to expose a promise-based API, it would look something like this. Wiring up the view. Plunker. Twitter Bootstrap Navbar as AngularJS component. You all know Twitter Bootstrap, don’t you?
It’s the awesome library to make your web application looks pretty good without spending many hours on CSS. We are using Bootstrap based design in our current project that also uses AngularJS and as we are planning to have many new pages, we decided that’s the earlier we introduce some components to our UI the better. And, what shouldn’t be a surprise, navigation bar natually became the first candidate. Overview So in this post I am going to show how externalize Twitter Bootstrap Navbar into a separate, flexible AngularJS component. Basic setup To start from the basics, I’ve prepared three pages that use the same navigation bar. Next step will be adding AngularJS and converting three pages into one small application. Problem On each page we have very similar html fragment rendering navbar element. 01. 02. 03. 04. 06. 07. 08. 09. 10. 11.
Angular ui - How to integrate AngularUI to AngularJS.
AngularJS Sticky Notes. Activity Indicators. Transclusion examples. Various UI Elements. Tables. Transitions/Animations/Effects. Accordion. Templating.