You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support onbubble-event as alternative to (^event) #3448
@manfredsteyer this is probably (?) not what you are looking for, but on-^event="x()" works today. Don't see much problem (apart from introducing yet-another-way-of-doing-things) with adding on-bubble-event="x()"
The idea for the alternative syntax is legacy html and user familiarity. For example, we're able to create components/directives that work both in angular 1 and angular 2 following the same interface. This is due to the fact that angular 1 didn't enforce any conventions (since no one knew what the best practices were for component/directives 6 years ago). So we can actually take advantage of this today
(I gave a subtle nod to a migration technique during ng-vegas)
Notice how we're using the alternative syntax but we can do this for angular 1 today using the alias scope: { data: '=bindData' }. We create a directive for each event already in angular 1 (legacy) so it does make sense to continue down that path. Doing this allows you to delete half your code (ng2 means twice as good since it's half the code?) when switching to angular 2 (now that we know what the best practices are)
changed the title [-]alternative syntax for binding to bubble-events (^event)[/-][+]Support `onbubble-event` as alternative to `(^event)`[/+]on Aug 6, 2015
Activity
pkozlowski-opensource commentedon Aug 3, 2015
@manfredsteyer this is probably (?) not what you are looking for, but
on-^event="x()"works today. Don't see much problem (apart from introducing yet-another-way-of-doing-things) with addingon-bubble-event="x()"PatrickJS commentedon Aug 3, 2015
The idea for the alternative syntax is legacy html and user familiarity. For example, we're able to create components/directives that work both in angular 1 and angular 2 following the same interface. This is due to the fact that angular 1 didn't enforce any conventions (since no one knew what the best practices were for component/directives 6 years ago). So we can actually take advantage of this today
(I gave a subtle nod to a migration technique during ng-vegas)
ng1 https://github.com/gdi2290/ng-vegas-angular2-d3/blob/master/angular1/app.js#L10
ng2 https://github.com/gdi2290/ng-vegas-angular2-d3/blob/master/app.ts#L60
essentially we can create a directive that works in both ng1 and ng2 with this example
Notice how we're using the alternative syntax but we can do this for angular 1 today using the alias
scope: { data: '=bindData' }. We create a directive for each event already in angular 1 (legacy) so it does make sense to continue down that path. Doing this allows you to delete half your code (ng2 means twice as good since it's half the code?) when switching to angular 2 (now that we know what the best practices are)mhevery commentedon Aug 6, 2015
This should be
onbubble-eventsame as(^event)[-]alternative syntax for binding to bubble-events (^event)[/-][+]Support `onbubble-event` as alternative to `(^event)`[/+]feat(PropertyBindingParser): support onbubble-event as an alternate s…
feat(PropertyBindingParser): support onbubble-event as an alternate s…
angular-automatic-lock-bot commentedon Sep 13, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.