MojierをAngularJSでつかうやーつ
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
release
source
.gitignore
LICENSE
README.md
gulpfile.js
main.js
package.json

README.md

angular-mojier(もじゃー)

AngularJS module adapting mojier

Demo

http://sashimizakana.github.io/angular-mojier/

Installation

  • Download release/mojier.js
  • After loading AngularJS
<script src="mojier.js"></script>
angular.module('app',['sakana.mojier']);

You can also use npm(and browserify).

npm install angular-mojier
var mojier = require('angular-mojier');
angular.module('app',[mojier]);

Service

angular.module('app',['sakana.mojier']).controller('ctrl',function(mojier){
  var emoji = mojier.get('smile');//U+1F604
  mojier.findAlias(emoji);//smile
  this.aliases = mojier.getAllAliases();//array of the all emoji aliases
});

Filter

<input ng-model="text"><!-- Thank you :smile: -->
{{text|mojier}}<!-- Thank you (U+1F604) -->

Prefix and suffix

$filter('Thank you :smile:','<span class="emoji">','</span>');
//Thank you <span class="emoji">(U+1F604)</span>

Lisence

MIT


Demoみてね