Created
March 26, 2013 05:19
-
-
Save johncblandii/5243328 to your computer and use it in GitHub Desktop.
A basic AngularJS directive with support for Windows 8 animations.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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