I have 3 views in my router. The index view picks viewtwo as the default.
The problem is when I go to viewone or viewthree it goes through the index route! and loads the viewto before then rerouting to whichever I clicked viewone or viewthree and in my setup that causes some glitch as each view does something to the HTML that it then has to undo before leaving but something is not syncing too well (I tested it has something to do with how fast things load and javascript is applied onto it because my glitch only occurs if I click back and forth really fast).
What is the opposite of didInsertElement right before it gets destroyed?
Also why is the viewto getting loaded from the index route?
index: Ember.Route.extend({
route: '/',
redirectsTo: 'viewtwo'
}),
viewone: Ember.Route.extend({
route: '/viewone',
connectOutlets: function( router ) {
....
viewtwo: Ember.Route.extend({
route: '/viewtwo',
connectOutlets: function( router ) {
....
viewthree: Ember.Route.extend({
route: '/viewthree/:item_id',
connectOutlets: function( router, item ) {
....