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
const wordPlural = (word, amount) => { | |
word = word.toLowerCase() | |
if (amount === 1) { | |
return word | |
} | |
return pluralize(word) | |
} | |
const pluralize = word => { |
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
/** | |
* @ngDoc Directive | |
* @name app.Directive.onKeyEnter | |
* @module app | |
* | |
* @description | |
* this directive triggers callback function when enter key is pressed | |
* | |
* @author Mohan Singh <mslogicmaster@gmail.com> | |
* |
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
app.service("UrlService", ["$location", function($location) { | |
// refernce to service for callbacks | |
var __service = this, | |
parts = { | |
"queryvars": {} | |
}, | |
absUrl = $location.absUrl(), | |
// extract and parse url | |
elements = absUrl.split("?"); |