Skip to content

Instantly share code, notes, and snippets.

@bennewton999
Created July 13, 2015 16:29
Show Gist options
  • Save bennewton999/d93600b99de5aad8a2b1 to your computer and use it in GitHub Desktop.
Save bennewton999/d93600b99de5aad8a2b1 to your computer and use it in GitHub Desktop.
Simple responsive date for AngularJS
<span>{{fare.book_by_date | date:checkDate()}}</span>
$scope.checkDate = function() {
console.log($window.innerWidth);
if ($window.innerWidth > 1024) {
return 'longDate';
} else {
return 'shortDate';
}
};
@bennewton999
Copy link
Author

sure, the break point can be whatever you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment