AngularJS Wait for function with timeouts to complete before proceeding

I'm building a webapp using AngularJS, and trying to create a transition animation. When a button is pressed, the content is to fade out over 200ms, change to new content, and then fade back in again over 200ms. Below is the function called by ng-click on the button.

However, when the function is called, the content immediately changes, then fades out. Clicking on the button again toggles back and forth between the fading in and out animations. fadeIn() and fadeOut() are shown below.