Sha256: 84ad34a837d3eeadd4d6e204b37b507964b65cefe20c4bdc51f60fae253f4a63
Contents?: true
Size: 492 Bytes
Versions: 2
Compression:
Stored size: 492 Bytes
Contents
/** @module ember */ import { get } from 'ember-metal'; /** Returns the current URL. Example: ```javascript function validateURL() { equal(currentURL(), '/some/path', "correct URL was transitioned into."); } click('#some-link-id').then(validateURL); ``` @method currentURL @return {Object} The currently active URL. @since 1.5.0 @public */ export default function currentURL(app) { let router = app.__container__.lookup('router:main'); return get(router, 'location').getURL(); }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
discourse-ember-source-3.5.1.1 | dist/es/ember-testing/lib/helpers/current_url.js |
discourse-ember-source-3.5.1.0 | dist/dist/es/ember-testing/lib/helpers/current_url.js |