摘要:
interface Date{ addHours(h:number); addMinutes(m:number); format(str):string } interface String{ trim():string; solrFormat():string; } interface Array { clear(); remove... 阅读全文
摘要:
angular.module('app').filter('trustHtml', ($sce) => { return (html) => { if(typeof(html)=="object"){ return html; } return $sce.trustAsHtml(html||""); } }); request({'url'... 阅读全文
摘要:
Install the latest version of NodeJS from their website (e.g. 6.X.X). Open the Node.js command prompt as administrator. Run: npm cache clean Run: npm 阅读全文
摘要:
angular.module('app').directive('ScrollTrigger', () => { return { restrict: "A", link:function ($scope,$element,$attrs,$controller) { function debounce(fn, delay) { ... 阅读全文
摘要:
function debounce(fn, delay) { // 持久化一个定时器 timer let timer = null; // 闭包函数可以访问 timer return function() { // 通过 'this' 和 'arguments' // 获得函数的作用域和参数 let context = this; let ... 阅读全文
摘要:
index.js test.js 运行 阅读全文
摘要:
function copyTextToClipboard(text) { var copyFrom = $(''); copyFrom.text(text); $('body').append(copyFrom); copyFrom.select(); ... 阅读全文
摘要:
效果如下 ally and horifffffffffffffffffffffffffffally. ally and horifffffffffffffffffffffffffffally. ally and horifffffffffffffffffffffffffffally. // <![C 阅读全文