angular-mojier
v1.1.0
Published
AngularJS module adapting mojier
Downloads
1
Readme
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みてね