▼ 概要
$location.path
が効かない。
ngDialog.open(
plain: true
scope: innerScope
template: '<kz-temp></kz-temp>'
preCloseCallback: ->
$scope.config.cardId = ''
$location.path("#{$scope.config.listTypePath}/#{card.board_slug}")
)
けれども下記のようにすれば治る。
ngDialog.open(
plain: true
scope: innerScope
template: '<kz-temp></kz-temp>'
preCloseCallback: ->
$scope.$apply( ->
$scope.config.cardId = ''
$location.path("#{$scope.config.listTypePath}/#{card.board_slug}")
)
)
▼ ちなみに
ngDialog
のpreCloseCallback
はfalse
を返すとダイアログが閉まらない。
Provide either the name of a function or a function to be called before the dialog is closed. If the callback function specified in the option returns
false
then the dialog will not be closed.