Use $watch for prepareDisplay in history directive