disconnectOutlet (options) public
Disconnects a view that has been rendered into an outlet.
You may pass any or all of the following options to disconnectOutlet:
-
outlet: the name of the outlet to clear (default: 'main') -
parentView: the name of the view containing the outlet to clear (default: the view rendered by the parent route)
Example:
App.ApplicationRoute = App.Route.extend({
actions: {
showModal: function(evt) {
this.render(evt.modalName, {
outlet: 'modal',
into: 'application'
});
},
hideModal: function(evt) {
this.disconnectOutlet({
outlet: 'modal',
parentView: 'application'
});
}
}
});
Alternatively, you can pass the outlet name directly as a string.
Example:
hideModal: function(evt) {
this.disconnectOutlet('modal');
}
Parameters:
-
options
Object|String - the options hash or outlet name
Please login to continue.