Giter Club home page Giter Club logo

ng-lettering.js's Introduction

ng-Lettering.js

ng-Lettering.js is an AngularJS <span> injector for radical Web Typography.

This is a rework of the original jQuery plugin which can be found here: https://github.com/davatron5000/Lettering.js.

Grab it with Bower: bower install ng-Lettering.js

Include it in your AngularJS application

var myApp = angular.module( 'myApp', [ 'ngLettering' ] );

Apply it to your text

<span data-lettering="letters">This is a sentence</span>

<span data-lettering="words">This is a sentence</span>

<div data-lettering="lines">
	This<br/> 
	is<br/> 
	a<br/> 
	sentence
</div>

ng-lettering.js's People

Stargazers

Aton B avatar  avatar Cha avatar Zach Wolfe avatar Ilya avatar

Watchers

Miguel Ortega avatar Patrick Marabeas avatar

ng-lettering.js's Issues

lettering not working in ng-repeat

Hi,

I am data-lettering in ng-repeat but it is not working. mouse over any word it should bold word, but it is taking whole sentence as bold. please help.
Sample code

<script> var myApp = angular.module( 'myApp', [ 'ngLettering' ] ); myApp.controller('myCtrl',function($scope){ $scope.data=["abcd","hello word","i am feeling not well"]; }); </script>
{{value}}

Thanks and Regards,
Anumesh Y.

How to make it work with {{bindings}}?

The output of this:

<div data-lettering="letters">hello {{total}}</div>

.. is this:

<div data-lettering="letters">
  <span class="char1">h</span>
  <span class="char2">e</span>
  <span class="char3">l</span>
  <span class="char4">l</span>
  <span class="char5">o</span>
  <span class="char6"> </span>
  <span class="char7">{</span>
  <span class="char8">{</span>
  <span class="char9">t</span>
  <span class="char10">o</span>
  <span class="char11">t</span>
  <span class="char12">a</span>
  <span class="char13">l</span>
  <span class="char14">}</span>
  <span class="char15">}</span>
</div>

So it seems the spans are added before AngularJS has time to replace {{total}} with its value. Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.