从外部调用Angular 1.5组件控制器功能

时间:2018-04-14 20:06:02

标签: angularjs

self...

如何调用此控制器外的self.loadshotlist_comp(_translate) 函数? 显然我已经使用了路由,因此html上没有import {COLORS} from '../../constants/StylesConstants'; class SearchController { constructor($log, $state) { this.buttonRipple = COLORS.buttonRipple; this.showDescription = false; $log.log('$state.params'); $log.log($state.params); } show(index) { this.showDescription = index; } } export const Search = { template: require('./Search.html'), controller: SearchController };

0 个答案:

没有答案