创建读取AngularJS更多链接 [英] Create read more link in AngularJS

查看:136
本文介绍了创建读取AngularJS更多链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建更多的文字链接。如果有超过3行段落中的这个环节应该是可见的,并点击该IT展展出的所有线路上。

I want to create a link with read more text. if there are more than 3 lines in a paragraph this link should be visible and clicking on this it show display all the lines.

推荐答案

我想要做同样的事情,所以我创造了一个指令。看看这里:<一href=\"https://gist.github.com/doukasd/0744566c5494ebc8643f\">https://gist.github.com/doukasd/0744566c5494ebc8643f

I wanted to do the same thing, so I created a directive. Have a look here: https://gist.github.com/doukasd/0744566c5494ebc8643f

用法为pretty简单:

Usage is pretty simple:

<p data-dd-collapse-text="100">{{veryLongText}}</p>

其中100是要指定的字数限制。

Where 100 is the character limit you want to specify.

更新: DD-文本崩溃

这篇关于创建读取AngularJS更多链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆