Alec Fenichel
Alec Fenichel

Reputation: 1317

Ember.js Route with Wildcard Path

How can I make a route that servers all paths? I tried this.route('main', {path: '/*'}); with no luck. I can't use dynamic segments because I want /random, /random/random, etc. to all route to main. Thanks.

Upvotes: 0

Views: 534

Answers (1)

kiwiupover
kiwiupover

Reputation: 1780

You can setup a catch all route like this.

Router.map(function() {     
  this.route('main', {
    path: '/*path'
  });
});

Upvotes: 1

Related Questions