<div ng-repeat="item in arr | objFilter:'name':keyword:matchCase"></div> arr = [ {name: 'A'} {name: 'B'} ] app.filter 'objFilter', -> return (input, prop, value, matchCase) -> arr = [] input.forEach (item) -> if item[prop] reg = new RegExp(value, if matchCase then '' else 'i') arr.push(item) if item[prop].match(reg) return arr
Yearly Archives: 2015
Angular Bootstrap: Why Multiple Radio Buttons Showed Up As Active
<label ng-model="pref.active" btn-radio="'choceA'"> <input type="radio" name="groupName"> </label>
The btn-radio part is a STRING–It needs a valid string.
CSS: End Long Line in Ellipsis
How to cut off long single-line text with a nice clean ellipsis?
text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
Note: there has to be a limit to the div’s width.