angularJS 自定义指令 方法属性:controller 和属性:controllerAs

    自定义指令中还能够定义controller属性,是一个function,能够在其中定义数据和方法,能够提供给该指令的link内的方法使用。javascript 示例的html:php <div ng-app="myApp"> <div ng-controller="firstController"> <div book-list></div> </div>
相关文章
相关标签/搜索