Hi. For example I have this structure:
})
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('menu', {
url: "/map",
abstract: true,
templateUrl: "templates/menu.html",
controller: 'MainCtrl'
})
.state('menu.home', {
url: "/home",
views: {
'menuContent' :{
templateUrl: "templates/gpsView.html",
controller: 'MapCtrl'
}
}
})
The main controller contains buttons etc. Now I want invoke function button.ng-click from MapCtrl. How you do that? Do you share common function in services, or do some $broadcast, $on?