GithubHelp home page GithubHelp logo

gangadharjannu / ng-mailcheck Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 866 KB

Angular port for mailcheck library

License: MIT License

JavaScript 96.16% HTML 3.84%
mailcheck angular ng-mailcheck

ng-mailcheck's Introduction

ng-mailcheck

AngularJS 1 directive for popular mailcheck library.

Features

ng-mailcheck supports all features that are supported by mailcheck library. In addition to that

  • Now user can replace existing options or extend the default options using replaceOptions option.
    • true => replace options, false => extend options
  • Works for email, search, text input types
  • Updates ngModel with email suggestion on click

Usage

  • Getting ng-mailcheck
    • Using bower
      • bower install ng-mailcheck
      • Include the script tag as <script src="bower_components/ng-mailcheck/dist/ng-mailcheck.min.js"></script> after your module declaration
    • Manual Installation
      • download ng-mailcheck.min.js.
      • Include the script <script src="path/ng-mailcheck.min.js"></script> after your module declaration
  • Put ngMailcheck module as dependency angular.module('yourModule', ['ngMailcheck'])
  • Add mailcheck as an attribute <input type="email" ng-model="email" mailcheck options="{}">
  • You can optionally pass options to mailcheck using options attribute
  • Below is the sample object for options attribute
{
    domains: [],                                // www.gmail.in
    secondLevelDomains: [],                     // gmail
    topLevelDomains: [],                        // in
    distanceFunction: function () { },          // string distance function
    templateStr: "",                            // template string for email suggestion
    replaceOptions: true                        // true=>replace options, false=>concat options
}

Demo

Play around jsbin

Tests

Run karma start to run tests. Test cases are written in app/test folder.

Thanks

mailcheck - https://github.com/mailcheck/mailcheck

License

Released under the MIT License.

ng-mailcheck's People

Contributors

gangadharjannu avatar

Watchers

 avatar  avatar

ng-mailcheck's Issues

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.