Angularjs filter causing $digest iteration loop -
i know it's been inquire lot of time, can't figure out how prepare it.
i have filter takes user id (message.author) argument , homecoming values user.
html:
<span>{{message.author | userfullname}}</span>
filter:
.filter('userfullname', function (userservice) { homecoming function (userid) { userservice.get(userid).then(function(user) { homecoming user.surname + " " + user.lastname ; }); }; });
it works if author actual user object , homecoming fullname without using userservice, prefer have id store in message object.
angularjs angular-filters
No comments:
Post a Comment