AngularJS ng-list 指令

AngularJS 教程 · 2019-04-01 19:58:36

AngularJS 实例

转换用户的输入为数组:

<div ng-app="">

<input ng-model="customers" ng-list/>

<pre>{{customers}}</pre>

定义和用法

ng-list 指令将字符串转换为数组,并使用逗号分隔。

ng-list 指令还有另外一种转换方式,如果你有字符串数组希望在输入框中显示,你可以在 input 上使用 ng-list 指令。

ng-list 属性值定义了分隔符。

语法

<element ng-list="separator"></element>

<input>, <select>, <textarea>, 和其他可编辑元素支持该指令。

参数值

描述
separator 可选,定义分隔符,默认为", "

点击查看所有 AngularJS 教程 文章: https://codercto.com/courses/l/36.html

查看所有标签

Wikis For Dummies

Wikis For Dummies

Dan Woods、Peter Thoeny / For Dummies / 2007-7-23 / USD 24.99

Corporations have finally realized the value of collaboration tools for knowledge sharing and Wiki is the open source technology for creating collaborative Web sites, as either a public site on the In......一起来看看 《Wikis For Dummies》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换