如何创建某种可从我的所有控制器访问的 utils 包?
我的主module中有这个路由代码:
'use strict';
angular.module('lpConnect', []).
    config(['$routeProvider', function($routeProvider) {
    $routeProvider.
        when('/home', {template: 'views/home.html', controller: HomeCtrl}).
        when('/admin', {template: 'views/admin.html', controller: AdminCtrl}).
        when('/connect', {template: 'views/fb_connect.html', controller: MainAppCtrl}).
        otherwise({redirectTo: '/connect'});
}]);
我想要一个可以对HomeCtrl,AdminCtrl和通用的函数MainAppCtrl。
我应该如何在 AngularJS 中做到这一点?