Angular js : How to make make ajax call for directives to create options
<p>I created directives for form controls. 
There are some controls those will have options from ajax[API] call.</p>

<p>I am stuck here how to make ajax call over directives.</p>

<pre><code>    function selectControlDir()
    {
        return {
            transclude: true,
            restrict: 'E',
            scope: {
                data: '=data'
            },
            template: "&lt;div ng-transclude&gt;&lt;/div&gt;&lt;label&gt;{{data._text}} &lt;/label&gt;&lt;select type='text' name='{{data._attributeName}}' id='{{data._attributeName}}' &gt;\n\
&lt;option ng-repeat='ans in data._answerOptions'&gt;{{ans._promptText}}&lt;/option&gt;&lt;/select&gt;"
            ,
            link: function (scope, element, attrs)
            {
                //console.log("scope.data.QuestionData", scope.data.QuestionData);
            }
        };
    }
</code></pre>

<p>Plunker for complete code 
<a href="http://plnkr.co/edit/Op1QDwUBECAosPUC7r3N?p=preview" rel="nofollow">http://plnkr.co/edit/Op1QDwUBECAosPUC7r3N?p=preview</a></p>

<p>Here I want to make api call for Year (on page load).
on year change update options of Make.</p>