Skip to content

Instantly share code, notes, and snippets.

@johncblandii
Created March 26, 2013 05:19
Show Gist options
  • Save johncblandii/5243328 to your computer and use it in GitHub Desktop.
Save johncblandii/5243328 to your computer and use it in GitHub Desktop.
A basic AngularJS directive with support for Windows 8 animations.
var myApp = angular.module("MyApp", []);
myApp.directive("calendarDay", function () {
var linker = function (scope, element, attrs) {
element.bind("mousedown", function () {
WinJS.UI.Animation.pointerDown(element[0]);
});
element.bind("mouseup", function () {
WinJS.UI.Animation.pointerUp(element[0]);
});
WinJS.UI.Animation.enterPage(element[0], element.index());
};
return {
link: linker
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment