scroll to top on error or success in prefs, the angular way