bind directive action to parent controller AngularJS
<p>I have a directive for profile update and I want to trigger update action from the parent scope.
Here what look like my code:</p>

<blockquote>
  <p>main.js</p>
</blockquote>

<pre><code>angular.module('app')
.directive('profile',{
    scope: {
        updateFromDirective: "="
    },
    template: '&lt;form&gt;&lt;input ng-model="name"/&gt;&lt;/form&gt;',
    controller: function(){
        this.updateFromDirective = function(){
            /* update here */
        };
    }
})
.controller('Ctrl', function(){
    this.updateFromController = function(){
        if(condition){
            /* how do I call updateFromDirective here ??? */
        }
    };
});
</code></pre>

<blockquote>
  <p>index.html</p>
</blockquote>

<pre><code>&lt;div ng-controller="Ctrl"&gt;
    &lt;profile updateFromDirective="updateFromController"&gt;&lt;/profile&gt;
    &lt;button ng-click="updateFromController()"&gt;Update&lt;/button&gt;
&lt;/div&gt;
</code></pre>