ng-emphasis
An AngularJS directive that puts emphasis on words within a string of text give one or more search terms. Simply include ng-emphasis in your HTML element and watch the magic happen.
Install
Bower
bower install ng-emphasis
Usage
Require ng-emphasis in your application
angular;
Style up ng-emphasis however you like
Add an HTML element that uses ng-emphasis
Put emphasis on your words!
You'll get this inside your DOM
Put emphasis on your words!
Put emphasis on your words!
Try bind it to a list of items in scope
angular;
{{ user }}
John Sara Mel Jo
Demo
See it in action |Config
Configure the directive by injecting the configuration provider ngEmphasisConfigProvider
.
angular;
setCssClass()
Sets the CSS class to use in the directive template. If not configured, ngEmphasis will default to ng-emphasis as the CSS class name.
ngEmphasisConfigProvider;