Make sure ‘ErrorManagement.PageNotFound.View’ is defined on extension and refer the following code below
return Backbone.Router.extend({
routes: {
'XYX/:id': 'XYZ',
}
,
initialize: function(application) {
this.application = application;
},
XYZ: function(id) {
var application = this.application;
var list_id = JSON.stringify(id)
var model = new CDSweepstakesModel();
model.fetch({ data: { XYZ: list_id } }).done(function(result) {
if(_.isEmpty(result)){
var view = new PageNotFoundView({
application: application
});
view.showContent();
}
else{
var view = new CDSweepstakesSweepstakesView({ application: application, XYZ: result, listid: list_id })
view.showContent();
}
});
}
});