LoginSignup
0
0

More than 5 years have passed since last update.

【Angular】 $location.path not working

Last updated at Posted at 2015-02-20
▼ 概要

$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}")
    )
)
▼ ちなみに

ngDialogpreCloseCallbackfalseを返すとダイアログが閉まらない。

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.

▼ 参考URL
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0