Open analubarreto opened 3 years ago
@analubarreto you're right — anytime you want to use a method like Aviator.setRoutes
or Aviator.navigate
you should import it first, like
import Aviator from 'aviator';
import CampaignsTarget from 'route_targets/campaigns_target'
Aviator.setRoutes({
'/campaigns': {
target: CampaignsTarget,
'/': 'index',
'/add': 'add'
}
});
Hope this helps!
I'm pretty sure I should import something from somewhere before using Aviator.setRoutes, but you don't seem to have put it in the docs!