The basic premise is that I'm trying to access the element's value attribute after it compiles and copy it into a variable. For example: if vm.datasource.data['+ i +'].HolidayName compiled into "Christmas" I want to grab that value and store it in a variable.
Is it possible to copy the compiled value into a variable?
var link = function(scope, elem, attrs){
setTimeout(function(){
var checkboxCellArray = elem.find('.md-checkbox-cell');
_.forOwn(checkboxCellArray, function(node, i) {
if(angular.element(node).hasClass('md-checkbox-cell')){
var element = angular.element('<p value="{{vm.selected.length}} checked. {{vm.headers[0].orderBy}}. {{vm.datasource.data['+ i +'].HolidayName}}. {{vm.headers[1].orderBy}}. {{vm.datasource.data['+ i +'].Country}}"></p>')
var compiled = $compile(element)(scope);
setTimeout(function(){
console.log(compiled);
}, 500)
}
});
}, 1000)
}