html - How to display emoji using angularJs? -
i new angularjs , using "emoji-min.js" , "emoji-min.css" display emoji in text field.
but not able display. here code:
<!doctype> <html ng-app = "app"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="emoji.min.css"> <script src="angular.min.js"></script> <script src="emoji.min.js"></script> <script> var app = angular.module("app", ["emoji"]) app.controller("appctrl", function ($scope) { $scope.message = "string including emoji codes :smiley:"; }); </script> </head> <body ng-controller="appctrl"> <textarea ng-model="message"></textarea> <p ng-bind-html-unsafe="message | emoji"></p> <pre>{{ message }}</pre> </body> </html>
please tell going wrong.
for ng-bind-html work, need have ngsanitize module injected in app.
checkout this
Comments
Post a Comment