chore($sniffer): make msie variable public

The msie variable is a global variable used within the ng core which contains the
version number for the current Internet Explorer browser that is rendering the
application. Other modules outside of the ng core could make use of this variable
instead of having to rollout duplicate detection code. This code makes it easy to
reuse this simple property within the $sniffer service.
This commit is contained in:
Matias Niemelä 2013-11-02 13:25:38 -04:00
parent 952fea69fb
commit 974b6d4a5b
2 changed files with 6 additions and 1 deletions

View file

@ -83,7 +83,8 @@ function $SnifferProvider() {
csp: csp(),
vendorPrefix: vendorPrefix,
transitions : transitions,
animations : animations
animations : animations,
msie : msie
};
}];
}

View file

@ -333,4 +333,8 @@ describe('$sniffer', function() {
});
});
});
it('should return true for msie when internet explorer is being used', inject(function($sniffer) {
expect($sniffer.msie > 0).toBe(window.navigator.appName == 'Microsoft Internet Explorer');
}));
});