mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
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:
parent
952fea69fb
commit
974b6d4a5b
2 changed files with 6 additions and 1 deletions
|
|
@ -83,7 +83,8 @@ function $SnifferProvider() {
|
|||
csp: csp(),
|
||||
vendorPrefix: vendorPrefix,
|
||||
transitions : transitions,
|
||||
animations : animations
|
||||
animations : animations,
|
||||
msie : msie
|
||||
};
|
||||
}];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}));
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue