Streaming live at 10am (PST)

Custom attributes for angular 2


#1

As it stands, trying to attach an angular 2 attribute such as (click)="doSomething()" using the custom attribute function doesn't work; name: (click) appears to be illegal. Is there/has anyone found a work around for this?


#2

I think something changed in Webflow about a month ago.

I develop AngularJS app's as well... and what "use to work"
- now seems to have some issues.

Maybe I'm doing something wrong...
- but that doesn't make sense... because it use to work.

I have so much work on my plate
- that I haven't had time to dig into the problem.

I've just been manually changing the html after the export.


#3

Hi @Will_Tian, at the moment the "Click" attribute is restricted for security reasons, but there is a way to monitor the click, take a look at the accepted solution for that here: https://forum.webflow.com/t/google-analytics-event-tracking-for-buttons-in-webflow/8084/8

Now that post above is for Google link tracking, but the same javascript custom code to monitor the element for the click and then do something applies, you just need to trigger the "something" from the custom code put in the Footer of the site.

Does that help?


#4

This topic was automatically closed after 60 days. New replies are no longer allowed.