Created
February 4, 2016 17:04
-
-
Save korenyushkin/a7a18f904ec96f273543 to your computer and use it in GitHub Desktop.
Solution for Exercise 6
This file contains hidden or 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
myApp.filter('agoFilter', function() { | |
return function(date, scope) { | |
return Math.round((new Date() - new Date(date))/(1000*60*60*24)) + ' days ago'; | |
} | |
}); | |
myApp.directive('ngBold', function() { | |
return function(scope, element) { | |
element.setAttribute('style', 'font-weight:bold'); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment