fix #2040 - $rootScope.moment = window.moment. Fixes to applying spell