Skip to content

Instantly share code, notes, and snippets.

@mssobhan
Last active January 8, 2016 06:10
Show Gist options
  • Save mssobhan/47f5593dc10dc5763cf4 to your computer and use it in GitHub Desktop.
Save mssobhan/47f5593dc10dc5763cf4 to your computer and use it in GitHub Desktop.
$scope.substr = function(string, start, end) {
return string.substr(start, end);
}
$scope.split = function(string, nb) {
var array = string.split(',');
return array[nb];
}
/*
{{split(string,0)}}
{{substr(string,0,4)}}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment