AngularJS 扩展指令 ng-readingtime
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/jiin/ng-readingtime
软件介绍
ng-readingtime 是 AngularJS 的指令,可以用来获取对指定文本的阅读时间。
使用示例
<p> Reading time: <span ng-reading-time text-to-read="text"></span> </p>
.directive('myCustomDirective', ['readingTime', function(readingTime) { return { // ... skipped code
link: function() {
scope.result = readingTime.get(text, {
wordsPerMinute: 210,
format: 'text_only'
});
}
}
}]);