I'm new in Angular. I have a problem with communicate between controller.
Page layout is like this:
------------------------------------
page header "play" 00:00:00 (TimeController)
------------------------------------
page content <br><br>
ng-view
(TaskController)<br><br>
ul>li<br>
- "play" link task 1<br>
- "play" link task 2<br>
- "play" link task 3<br>
So I have two controllers TimeController and TaskController. TimeController has a timer in page header.
List of tasks is in rounting view/tasks-list.html
app.config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/', {
templateUrl: 'views/tasks-list.html',
controller: 'TaskController'
}).
The "play" is a button. When i click on it i need to run a function from TimeController. Also click on "play" in header should run the same function from TimeController.
I dont know how to do this.