You will not have access to the scope until the LinkingFunction is returned by the compilation function. The compilation function creates an html template. The area is then combined with the template during LinkingFunction.
I'm not quite sure what you are trying to do, but I would use a standard template or templateUrl object for the binding function, rather than diving into the compilation function. Something like that:
angular.module("vtApp.directives"). directive('multirangeslider', function ($parse, $timeout, $compile) { return { restrict: 'E', replace: true, template: "<div ng-repeat='val in values'>{{val}}</div>", //Your template code scope: { values: "=", options: "=", variances: "&" }, link: function (scope, element, attrs) { scope.values = eval(attrs.variances) } } });
Here you can find more information on how directives are created: https://github.com/angular/angular.js/wiki/Understanding-Directives
source share