Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using extraData for ng-click with custom template #218

Open
dgodwin1175 opened this issue Jan 16, 2017 · 0 comments
Open

Using extraData for ng-click with custom template #218

dgodwin1175 opened this issue Jan 16, 2017 · 0 comments

Comments

@dgodwin1175
Copy link

dgodwin1175 commented Jan 16, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant