added missing .isRetina property

This commit is contained in:
jpmnteiro
2016-03-29 13:54:48 +01:00
parent 8527f0915c
commit 1604efc165
2 changed files with 8 additions and 0 deletions
@@ -10,6 +10,11 @@ myApp.controller('TestController', ($log: angular.ILogService,
$log.info(`Result: ${result}`);
}
// '.isRetina' examples
if(screenSize.isRetina) {
$log.info("Retina screen detected")
}
// '.is(...)' examples
var res = screenSize.is(["xs", "sm"]);
fnCallback(res);
+3
View File
@@ -8,6 +8,9 @@ declare namespace angular.matchmedia {
interface IScreenSize {
// Returns a value indicating if the current device has a retina screen
isRetina: boolean;
is(list: Array<string> | string): boolean;
// Executes the callback function on window resize with the match truthiness as the first argument.