angular-toastr
angular-toastr copied to clipboard
Using extraData for ng-click with custom template
Hi @Foxandxss, can you give an example of how the extraData would be used to say, handle an ng-click event? For example, if I want to add a link to my template like this: <a href="#" class="link" ng-click="clickFn(data)">Link Text</a>
And I want to provide all of the variables in this link in the extradata, would it look like this: myData.LinkClass = "link"; myData.LinkFn = "clickFn"; myData.FnData = data; myData.LinkText = "Link Text";
this.toastr.error(message, title, { extraData: myData });
<a href="#" class="{{extraData.LinkClass" ng-click="what goes here??">{{extraData.LinkText}}</a>
Thanks!