Skip to content

Instantly share code, notes, and snippets.

@jeshan
Last active August 29, 2015 14:15
Show Gist options
  • Save jeshan/e218f884562e8ac10818 to your computer and use it in GitHub Desktop.
Save jeshan/e218f884562e8ac10818 to your computer and use it in GitHub Desktop.
angular-intro-06; filters with examples with date and currency
<!DOCTYPE html>
<html ng-app='angularApp'>
<head>
<meta name="description" content="angular-intro-06; filters with examples with date and currency">
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script>
<script src="script.js">
</script>
<meta charset="utf-8">
</head>
<body ng-controller='MainController'>
Date input: <input ng-model='date' /><br/>
Formatted date: <span>{{date | date: 'fullDate' }}</span><br/>
Amount input: <input ng-model='amount' /><br/>
Formatted amount: <span>{{amount | currency }}</span>
</body>
</html>
var module = angular.module('angularApp', [ ]);
module.controller('MainController', function($scope) {
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment