خرید بک لینک

Vote count: 0

I have this HTML, I caot change it:

<div>How much is 100 * X {{100 | myFilter}}</div>

This is the Filter:

X=3
app.filter(function(){
   retu function(val){
       retu val*X
   })
})

Now I want to Change X:

X=5

And I want the HTML to rerun this filter and update all the values that affected by this filter and update the value

I try to do it using:

$rootScope.$apply()
and
$rootScope.$digest()

But it didn't work. I searching for solution that will work, without change the source HTML. I don't search for an answers to create a directive or controller.

Please wait before downvote, If I didn't explain it clearly, please comment me. I will try to explain better.

asked 1 min ago

- - , .

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 4 اسفند 1394 ساعت: 1:25

صفحه بندی