I’ve done that sort of thing using AngularJS before.
From memory, I don’t think you can disable the back button, but you can pop up a ‘Are you sure you want to leave this page?’ alert.
You’d need a JavaScript function to do that. I think the relevant event is when the window unloads.