update source code to use decorator for defining $off on $rootScope