Set scope in app controller, instead of view. Fixes #1108