changed navigation to a directive implementation