ng-fi-text

WebJar for ng-fi-text

License

License

MIT
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

github-com-leandropio-ng-fi-text
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

ng-fi-text
WebJar for ng-fi-text
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/leandropio/ng-fi-text

Download github-com-leandropio-ng-fi-text

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/github-com-leandropio-ng-fi-text/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>github-com-leandropio-ng-fi-text</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-leandropio-ng-fi-text/
implementation 'org.webjars.bower:github-com-leandropio-ng-fi-text:0.1.0'
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-leandropio-ng-fi-text/
implementation ("org.webjars.bower:github-com-leandropio-ng-fi-text:0.1.0")
'org.webjars.bower:github-com-leandropio-ng-fi-text:jar:0.1.0'
<dependency org="org.webjars.bower" name="github-com-leandropio-ng-fi-text" rev="0.1.0">
  <artifact name="github-com-leandropio-ng-fi-text" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='github-com-leandropio-ng-fi-text', version='0.1.0')
)
libraryDependencies += "org.webjars.bower" % "github-com-leandropio-ng-fi-text" % "0.1.0"
[org.webjars.bower/github-com-leandropio-ng-fi-text "0.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

ng-fi-text 0.1.0

Makes any text fits any box of any size in any ( angular ) website.


####You can see THE DEMO HERE

Installation

Important: This plugin requires angular version 1.3 or greater

Install by command line with bower

Go to your project's root directory and type:

bower install ng-fi-text

Alternative installation

Download the file from the "dist" folder of this repo, which has the newest version available, and then copy it to your project's folder.

Adding it to angular

Load the module in your application by adding it as a dependent module:

angular.module('app', ['ng-fi-text']);

Usage

Requeriments for making it work properly

ng-fi-text can be initialized in multiple divs inside a page. It only needs to be inside de app's scope.

It is very important to ensure the container div you will apply ng-fi-text have the css position set to relative or absolute, otherwise the plugin will place the fitting text in weird locations.

In case you want to bind normal text (non html)

To make it work add the ng-fi-text attribute to a div:

<div ng-fi-text="{{ angular.model }}"></div>

In case you want to bind html markup inside fi-text

Add the ng-fi-text attribute without any value and also add the ng-fi-text attribute with the current value assigned:

<div ng-fi-text ng-fi-text-html="{{ angular.model }}"></div>

Final result rotation

If you want to add a rotation to the resulting div, add the ng-fi-text-rotate with a positive value for a clockwise movement and a negative one for the contrary one.

<div ng-fi-text="'This text will be upside down'" ng-fi-text-rotate="180"></div>

Author

Leandro Bessone

License

MIT

Versions

Version
0.1.0