Created
July 13, 2015 16:29
-
-
Save bennewton999/d93600b99de5aad8a2b1 to your computer and use it in GitHub Desktop.
Simple responsive date for AngularJS
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
<span>{{fare.book_by_date | date:checkDate()}}</span> |
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
$scope.checkDate = function() { | |
console.log($window.innerWidth); | |
if ($window.innerWidth > 1024) { | |
return 'longDate'; | |
} else { | |
return 'shortDate'; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sure, the break point can be whatever you want.