Hi Srinivasarao,
You are trying to use strings in filters that expect a number. A simple
conversion will be done automatically, but the string '$300' is not that
easily converted. A simple solution will be to use a filter that casts
everything to a number (or a NaN)
Somthing like this will do:
.filter('toNum',function () {
return function(string) {
return Number(''+string.replace(/[^0-9 /.]/g, ""));
}
})
I have put your code in a plunk
<http://plnkr.co/edit/4isGgOCV3AZ22N7qmIPk?p=preview> to demonstrate this
(Just dumping a wad of code in a msg's hardly makes a nice question, you
should read this <http://www.catb.org/esr/faqs/smart-questions.html>)
I hope this helps you a bit,
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.