Commit 461aaa508098d48e7645c90d423e68476b219bd3
1 parent
9e273998
Exists in
master
and in
38 other branches
Improve truncate function
Showing
4 changed files
with
5 additions
and
4 deletions
Show diff stats
bower.json
src/app/components/noosfero-activities/activity/create_article.html
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | <a ng-href="/{{vm.activity.target.article.profile.identifier}}/{{vm.activity.target.article.path}}">{{vm.activity.target.article.title}}</a> |
13 | 13 | </div> |
14 | 14 | <div class="lead small"> |
15 | - <div ng-bind-html="vm.activity.target.article.body | limitTo: 50"></div> | |
15 | + <div ng-bind-html="vm.activity.target.article.body | stripTags | truncate: 100 : '...'"></div> | |
16 | 16 | </div> |
17 | 17 | </div> |
18 | 18 | </div> | ... | ... |
src/app/components/noosfero-articles/blog/blog.html
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | <div ng-repeat="child in vm.article.children | orderBy: 'created_at':true"> |
12 | 12 | <div class="page-header"> |
13 | 13 | <a ng-href="/{{vm.profile.identifier}}/{{child.path}}"><h4 ng-bind="child.title"></h4></a> |
14 | - <div ng-bind-html="child.body | limitTo: 500"></div> | |
14 | + <div ng-bind-html="child.body | truncate: 500: '...'"></div> | |
15 | 15 | </div> |
16 | 16 | </div> |
17 | 17 | </div> | ... | ... |
src/app/index.module.js