Gestion de la taille écran en javascript
========================================



on utilise avec ng-material la directive $mdMedia
index.html
```html
Test
test
```
le fichier app.js
```javascript
var app = angular.module("MyAppli", ["ngMaterial",]);
// add controler
app.controller('AppController', function($scope, $mdMedia) {
$scope.getInit = function() {
if (!$mdMedia('min-width: 960px')) {
/* if mobile */
console.log('mobile');
} else {
/* if not mobile */
console.log('not mobile');
};
};
// init data
$scope.getInit();
});```