angular-toastr icon indicating copy to clipboard operation
angular-toastr copied to clipboard

Using extraData for ng-click with custom template

Open dgodwin1175 opened this issue 8 years ago • 0 comments

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!

dgodwin1175 avatar Jan 16 '17 02:01 dgodwin1175