My code is as follows:
locationChangeStart:
$scope.$on(\'$locationChangeStart\', (event, next, current) => { if (this.scope.policyDirty) {