Skip to content

Instantly share code, notes, and snippets.

View dhyegocalota's full-sized avatar
🎯
I build results through Software Engineering.

Dhyego Calota dhyegocalota

🎯
I build results through Software Engineering.
View GitHub Profile
@dhyegocalota
dhyegocalota / decorator
Created September 30, 2015 12:31 — forked from johgusta/decorator
Disable JIT compiler on Safari for $new
angular.module('lib.decorators', [])
.config(['$provide', function($provide){
'use strict';
var isSafari = /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);
if(isSafari) {
$provide.decorator('$rootScope', ['$delegate', function($rootScope) {
var scopePrototype = Object.getPrototypeOf($rootScope);
var originalScopeNew = scopePrototype.$new;