Angularjs自定义一个可输入的下拉框组件(代码示例)


当前第2页 返回上一页

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

//可输入select框

angular.module("controllers")

.directive("insertSelect", [function () {

    return {

        restrict: 'AE',

        templateUrl: 'template/common/insertSelect.html',

        scope: {

            modelData: '=modelData',       

            optionList: '=optionList',    

            placeholder: '=placeholder',    //placeholder 可由引入页面传入

        },

        link: function ($scope, $elem) {

            //

        },

        controller: ["$scope", function ($scope) {

  

        }]

    }

}]);

页面引入 insertSelect 组件

1

2

3

4

<insert-select model-data="formData"

               option-list="successCodeList"

               placeholder="'请选择'">

</insert-select>

更多编程相关知识,请访问:编程教学!!

以上就是Angularjs自定义一个可输入的下拉框组件(代码示例)的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

angularjs的内存溢出怎么处理

angularjs和vue.js有什么差异?简单对比

bootstrap与angularjs区别

谈谈angularjs中providers之间的差异

angular和angularjs间有什么关系

在vue中怎么定义自定义组件

angularjs是什么?为什么用angularjs

angularjs“路由”的简介及用法介绍

eclipse中如何配置angularjs插件的方法

angular与angularjs的简单比较

更多相关阅读请进入《angularjs》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...