Skip to content

An AngularJS filter for replacing emoji codes with high-definition emoticons (Retina friendly).

License

Notifications You must be signed in to change notification settings

chanthus/angular-emoji-filter-hd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AngularJS Emoji Filter HD

=========

An AngularJS filter for replacing emoji codes with actual high-definition emoticons (Retina friendly). (heavily inspired by Angular-Emoji-Filter)

Installation

This module is available via NPM or bower, install it with this command:

Via bower

bower install https://github.com/chanthus/angular-emoji-filter-hd.git

Demo

See this plunker

Usage

  • Add cts.emoji as a dependency
  • Add ngSanitize as a dependency (belongs to AngularJS)
  • Apply the filter within ng-bind-html: <div ng-bind-html="message | emoji"></div>

Example

<html>
    <head>
        <meta charset="utf-8">
        <link rel="stylesheet" href="emoji.min.css">
        <script src="angular.min.js"></script>
        <script src="emoji.min.js"></script>
    </head>
    <body ng-app="app" ng-controller="AppCtrl">
        <div ng-bind-html="message | emoji"></div>
    </body>
</html>
angular.module("app", ["cts.emoji","ngSanitize"]).controller("AppCtrl", function ($scope) {
    $scope.message = "Animals: :dog: :cat: :snake: People: :smile: :confused: :angry: Places: :house: :school: :hotel: :poop:";
});

License

The AngularJS Emoji filter HD is released under the MIT license as detailed in the LICENSE file that should be distributed with this library; the source code is freely available.

The filter was adapted by me from the work of dbaq. The resources come from emoji codes website

About

An AngularJS filter for replacing emoji codes with high-definition emoticons (Retina friendly).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 73.4%
  • CSS 26.2%
  • Other 0.4%