Skip to content

A tld.js wrapper presented as an Angularjs directive

Notifications You must be signed in to change notification settings

Raffi-001/angular-tld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-tld

A tld.js wrapper presented as an Angularjs directive

Installation

bower install angular-tld

Usage

<script src="bower_components/tld-browserified/tld.js"></script>
<script src="bower_components/angular-tld/angular-tld.js"></script>
<script>
var app = angular.module('myApp', ['ngTld']);

app.controller('myCtrl', ['$scope', 'ngTld', function($scope, ngTld) {
    //...
}]);
</script>

<form name="myform">
    <input name="myTld" check-tld ng-model="myTld" />
    <small style="color: red;" ng-if="myForm.myTld.$error.invalidTld">Not a valid TLD :(</small>
</form>

Running the example

First run the following in terminal

cd example
bower install

Then open example/index.html in your browser

About

A tld.js wrapper presented as an Angularjs directive

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published