ブラウザウィンドウのinnerWidthのスコープ変数を以下のコードを使用して設定しようとしています。これはコンソールで見たときに機能しますが、関数は$ scope変数を更新していません。どうして?
angular.element($window).bind('resize', function() {
console.log('resize', $window.innerWidth); // I can see change here
$scope.window_width = $window.innnerWidth; // no change here
});
'console.log($ scope.window_width)'とは何ですか? –