If a view is attached to `modal@` for a state we are entering, we mark the state as a modal view (so that the application controller can set the modal as visible at the appropriate time) and then remove the `templateUrl` and add a `templateProvider`. - `templateProvider` is an injectable function which returns a promise resolving to the content of the template. This allows us to prefix the template with the dismiss button (and presumably, more in the future).

The reason we want the cancel button in the view instead of just outside of it is so that we can use a state-relative link  (`ui-sref='^'` means to transfer to the parent state) which requires that we be rendering from within the view.