history.replaceState + history.state object + beforeunload event can be a cool approach too. Reply. Taufik Nurrohman. Permalink to comment # July 14, 2020. CMIIW, it will be enabled to all pages. AngularJS can declaritively listen to native DOM events by using ng-on. It supports all styles of events (lowercase, camelCase, kebab-case, ... beforeunload, etc. If a library is missing a feature, like declarative event or property bindings, does it automatically fail those tests? Not necessarily. If a library omits a non.