implemented navigation as directive