Debuginfo

思考とアウトプット

2014-05-19から1日間の記事一覧

AngularJSでng-showをコールバック等で使うときは$applyを使う

下記のようなViewがあって、 <div ng-show="showPicture"> picture here! </div> そのオンオフをFactory側で行うときは、$scopeのスコープ外なので$apply()をしないと反映されない。 Creator.initialize($scope.loginStatus.userID, function(){ $scope.showPicture = !$scope.showPicture; $s…