Hi Steven.
Usually I use a simple service to group this kind of utilities.
Then combine them in a 'utils' module. Something like this:
(function () {
'use strict';
angular
.module('utils', [
'utils.date'
]);
}());
(function () {
'use strict';
angular
.module('utils.date')
.service('dateTools', dateTools);
/* @ngInject */
function dateTools(dependencies) {
var service = {
fromYYYYDDMM: fromYYYDDMM
};
return service;
}
function fromYYYDDMM(someString) {
return resultingDate;
}
}());
Split out to different files of coarse. This makes it easy to reuse them in
every project you might need those.
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.