anchor interface pattern: onHashchanged event handles the app state