Join the Stack Overflow Community
Stack Overflow is a community of 6.5 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

In below sample piece of code, how do i assign data returned from expression {{(results | filter: myFilter)}} to data attribute instead of results.

 <img ng-json-export-excel data="results" src=../dl.png/>

Below are my trials that didn't work.

data="{{(results | filter: myFilter)}}"
data="results | filter: myFilter" 

Please advice.

Thanks, Reddy.

share|improve this question

Do the filter work in js as follows.

$scope.filteredResults = filter1Filter(results, myFilter);

Now in HTML you can do like this:

<img ng-json-export-excel data="{{filteredResults}}" src=../dl.png/>

This might help you. All the best.

share|improve this answer
    
Yes, that is one of the solution that hit me but I would like to take advantage of expressions and do it on html page itself. It is possible? – Reddy yesterday
1  
Doing it in HTML page greatly reduces performance. Better to do it in js. – Sai yesterday
1  
Read this article. This may help you link – Sai yesterday

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.