app.js代码
1 var faceApp = angular.module('faceApp', ['ngRoute', 'faceApp.services', 'faceApp.filters', 'ngDialog','ngFileUpload', 'checklist-model']); 2 faceApp.config(function ($httpProvider, $compileProvider) { 3 4 5 //$compileProvider服务用来延迟注册directive 6 faceApp.compileProvider = $compileProvider;
directive.js代码
1 .directive('multiselectDropdown', [function() { 2 return function(scope, element) { 3 // Below setup the dropdown: 4 element.multiselect({ 5 buttonClass: 'btn btn-small', 6 buttonWidth: '200px', 7 nonSelectedText: '全部',//没有值的时候button显示值 8 includeSelectAllOption: true, 9 selectAllText: '全选',//全选的checkbox名称 10 maxHeight: 200 11 }); 12 } 13 }]);