* Navigate to a route * @param {String} name Route name * @param {*} arg A single argument to pass to the route handler * @return {Promise }
(name, argument)
| 35 | * @return {Promise<this>} |
| 36 | */ |
| 37 | async navigate(name, argument) { |
| 38 | if (typeof this.routes[name] === 'function') { |
| 39 | await this.routes[name].call(null, this, argument); |
| 40 | return this; |
| 41 | } |
| 42 | |
| 43 | throw new Error(`No routes called: ${name}`); |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Register a route handler |
no outgoing calls
no test coverage detected