radio button to self-defined directive
<p>I have a directive which makes the highcharts area-spline chart into a reusable element as such:</p>

<pre><code>angular.module('statisticsApp')
    .directive('stockchart', function ($http) {

        return {
            transclude: true,
            template: '&lt;div&gt;&lt;/div&gt;',
            restrict: 'E',
            scope: {},
            link: function postLink(scope, element, attrs) {
                // scope.country=attrs.country;
                var type=attrs.type;
                var currencies=attrs.currencies;
                var baseRestUrl="http://mydomain/background/rest/statistics";
                var realUrl=baseRestUrl + "/" + type;
                if (type == "equity") {
                    realUrl += "/" + scope.country;
                    scope.header="Equity per day - " + scope.country;                   
                }
                // alert(realUrl);
                $http.get(realUrl).then(
                    function successCallback(response){
                        var equity = response.data;
                        var arrayLength = equity.length;

                        var serie =  {
                                    name: scope.country,
                                    data: []
                                    }
                        var categories = [];
                        for ( var i = 0; i &lt; arrayLength; i+=1) {
                            var seriesName = equity[i][2];
                            var currency = equity[i][3];
                            var date = equity[i][0];
                            var amount = equity[i][1];

                            if ( currency == "EUR") {
                                serie["data"].push(amount);
                                categories.push(date);
                            } 
                        }
                        var series = [];
                        series.push(serie);

                        element.highcharts({
                            chart: {
                                type: "areaspline"
                            },
                            title: {
                                text: scope.header
                            },
                            legend: {
                                layout: "vertical",
                                align: "left",
                                verticalAlign: "top",
                                x: 150,
                                y: 100,
                                floating: true,
                                borderWidth: 1,
                                backgroundColor: (Highcharts.theme &amp;&amp; Highcharts.theme.legendBackgroundColor) || "#FFFFFF"
                            },
                            tooltip:{
                                valueDecimals : 2
                            },
                            yAxis: {
                                title: {
                                    text: 'Amount'
                                }
                            },
                            xAxis: {
                                categories: categories
                            },
                            series: series
                        });
                    },
                    function errorCallBack(response){
                        equity = ["It", "did", "not", "work"];
                    }
                );
            }
        };
    });
</code></pre>

<p>I'm trying to bind some radio buttons to remove the HTML-hardcoded currency and country.</p>

<p>in HTML I have </p>

<pre><code>&lt;div&gt;
    &lt;form&gt;
        &lt;h3&gt;Currency&lt;/h3&gt;
        &lt;input type="radio" ng-model="currency" name="currency" value="EUR"&gt; EUR&lt;br/&gt;
        &lt;input type="radio" ng-model="currency" name="currency" value="USD"&gt; USD&lt;br/&gt;
        Other: &lt;input type="text" ng-model="currency" name="currency" value=""&gt;&lt;br/&gt;
    &lt;/form&gt;
    &lt;form&gt;
        &lt;h3&gt;Country&lt;/h3&gt;
        &lt;input type="radio" ng-model="country" name="country" value="BE"&gt; BE&lt;br/&gt;
        &lt;input type="radio" ng-model="country" name="country" value="NL"&gt; NL&lt;br/&gt;
        &lt;input type="radio" ng-model="country" name="country" value="FI"&gt; FI&lt;br/&gt;
        &lt;input type="radio" ng-model="country" name="country" value="CZ"&gt; CZ&lt;br/&gt;
        &lt;input type="radio" ng-model="country" name="country" value="DE"&gt; DE&lt;br/&gt;
        &lt;input type="radio" ng-model="country" name="country" value="FR"&gt; FR&lt;br/&gt;
    &lt;/form&gt;
    &lt;stockchart country="BE" type="equity" currencies="EUR"&gt;&lt;/stockchart&gt;
    &lt;stockchart country="NL" type="equity" currencies="EUR"&gt;&lt;/stockchart&gt;
&lt;/div&gt;
</code></pre>

<p>and I would like to be able to reduce the last to lines to simply 1 line:
        
or something equally global.</p>