angularjs usage example of using the "resolve" method before displaying a controller