refactor: introduce base class for AngularJS controllers