Update loadOnDemand.js

Removed rootScope.safeApply