Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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