GithubHelp home page GithubHelp logo

wisdomofgod / angular-directive Goto Github PK

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

some angular-directive, base on angular1.x passwordInput cardInput autoComplete pagination

JavaScript 78.52% HTML 12.73% CSS 8.75%

angular-directive's Introduction

angular1.x部分指令

所有指令只需要在index.html文件中引入即可使用(注:需在app.module之后引入)

文件说明:directives文件夹下是所有指令代码 styles文件夹下是部分样式代码

#autoComplete ##输入框匹配内容下拉框指令 (不含输入框) 用法: 在template页面中

	其中complete-data 对应搜索后的 下拉列表源数据
		complete-query 对应展示字段(如 mobile , name)等
		success 对应下拉列表选择后的回调函数,即通知控制器选择结果

#passwordInput ##密码输入框指令 仿支付宝支付密码输入框 方格个数可配置 用法: 在template页面中

	其中password-data 用来存储用户输入的密码
		password-len 表示密码长度(如支付密码6位)

#cardInput ##分隔输入框指令 输入指定位数后自动换到下一个输入框 作用于输入卡号等场景 用法: 在template页面中

	其中ng-model 对应用户输入的卡号
		len 对应卡号按多少位分割(如4位)
		size 对应输入框个数( 卡号长度 = len * size)

#pagination ##分页(使用了部分bootstrap样式,这里不再另外引入) 用法: 在template页面中

	其中totalItems 对应总条数
		totalPages 对应总页数
		firstText 对应第一页的文字(如:首页)
		lastText 对应最后一页的文字
		nextText 对应下一页的文字 (如:>)
		previousText 对应上一页的文字
		ngRows 每页显示条数
		ngPage 当前页数
		ngChange 当发生页面跳转时,控制器接受的函数
		
	ngChange 接受一个参数 表示要跳转到的页数

angular-directive's People

Contributors

wisdomofgod avatar

Watchers

James Cloos avatar  avatar

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.