Is there any way to duplicate code in Angujar JS ng-click without using a directive? This is my code I want to clone:
<div class="panel">
<div class="row">
<div class="small-5 columns">
<select ng-model="vm.playlist" ng-options="lang.name for lang in vm.playlist"></select>
</div>
<div class="small-5 columns">
<input type="text" placeholder="playlist" ng-model="vm.target"/>
</div>
<div class="small-2 columns" ng-click="rootVm.openModal()">
<img src="assets/img/mission/browse.png" ng-model="vm.icon" />
</div>
</div>
</div>
On ng-click, I suppuse that I have to call a function in my controller. So, how the code is duplicated?
If finally had to do it with a directive, how it would be?
Cheers!