I got a problem. I try to append some properties of the $scope object in a jQuery event handler. Here is my code:
.controller('dashboard', ['$scope', function($scope){
$( window ).resize(function(){
$scope.device = ($(document).width() > 768) ? 'desktop' : 'mobile';
});
}]);
But it seems like the device variable does not append on the $scope of the dashboard controller. What's wrong with my code? Thanks :D