setting up angular ctrl, router, factories