Get current path with dynamic segment in ember.js -
i wondering how can current path in ember dynamic element ? know there
@get('currentpath')
in applicationcontroller give me "user.show" , able retrive path "/users/1". know can window.location.href there other ("the ember") way ?
regards piotr
i'm not sure if qualifies ember way it's not listed in docs, controller's target object contains both reference document.location
, property called lastseturl
.
this.get('target').location.lastseturl; // "/foo/1"
Comments
Post a Comment