Added resolve function to routes to load data and defer view rendering until data arrived.