refactor client side + add dynamic url for angular with index route