title: How to communicate between Angular DART controllers
body: <p>i have two controllers and want to "send" between them object. I have something like this:</p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>@NgController(selector: '[users]', publishAs: 'ctrl')
  class UsersController {
    List&lt;Users&gt; users;
  }
  
  @NgController(selector: '[user_logs]', publishAs: 'ctrl')
  class LogsController {
    List&lt;Log&gt; logs;
    void filterLogsFor(User user) { logs = ... }
  }
  
  class MyAppModule extends Module {
    MyAppModule() {
      type(LogsController);
      type(UserController);
    }
  }
  </code></pre>
  
  <p>My solution was simply adding LogsController to UserController as dependency and calling something like ctrl.logsCtrl.filterLogsFor(user) from template. But it won't work for some reason - i found out DI create another new object LogController which is not related to template itself - i even tried change to "value(LogsController, new LogsController())", but its same - it creates new LogsController when new MyAppModule called and then new another one for template i guess. I am clearly doing something wrong - but documentation is not helpful and angularjs seems not similar at all.</p>
  
  <p>UPDATE:
  Imagine two tables(controlers) - users and logs, every user row have link to show logs assigned to him. </p>