You will not have access to the scope until the LinkingFunction which is returned by your compile function. The compile function creates the html template. The scope is then combined with the template during the LinkingFunction.
I'm not exactly sure what you are trying to do but I would use the standard template or templateUrl object on the linking function as opposed to diving down into the compile function. Somethig like this:
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)
}
}
});
You can find more info here about how directives are constructed: https://github.com/angular/angular.js/wiki/Understanding-Directives