A bit of a mess, but I separated nav into its own directive and controller.