Exposing the current state name with ui router

前端 未结 6 1556
清歌不尽
清歌不尽 2020-12-14 05:28

I\'m trying to implement a language switcher where if a user clicks on \"de\" from any given page on an \"en\" side - it takes them to that page of the \"de\" side. If I con

6条回答
  •  孤城傲影
    2020-12-14 06:21

    Use Timeout

    $timeout(function () { console.log($state.current, 'this is working fine'); }, 100);
    

    See - https://github.com/angular-ui/ui-router/issues/1627

提交回复
热议问题