code: function insertfontSmiley(str) {
  
                      var a = str.split(' ');
                      angular.forEach(icons, function (icon) {
                          for (var i = 0; i < a.length; i++) {
                              if (a[i] === icon.text) {
                                  a[i] = '<i class="icon-emoticon" title="' + icon.text + '">' + '&#x' + icon.code + '</i>';
                              }
                          }
                      });
                      return a.join(' ');
                  }
docs: FUNCTION insertfontSmiley
  @description
  Coverts the text into font emoticons
  
  @param  {string} str
  
  @return {string}