Skip to content

feat: add on-cordova helper#14

Open
betocantu93 wants to merge 3 commits intoisleofcode:masterfrom
bengala-tech:on-cordova-helper
Open

feat: add on-cordova helper#14
betocantu93 wants to merge 3 commits intoisleofcode:masterfrom
bengala-tech:on-cordova-helper

Conversation

@betocantu93
Copy link
Copy Markdown

@betocantu93 betocantu93 commented Aug 19, 2021

Adds {{on-cordova}} helper for easier eventing on templates, this helper also implements the bubbles=false that you would expect from normal dom events so effectively mimicking stopPropatation() because this helper works as a stack, it adds a handler when executed and stops bubbling if any invocation passed bubbles false.

A demo is included in the dummy app, just open the console to see the order of which the event is executed. the practical use case is opening modals on top of each other and wanting to close them in order, avoiding a supposed /routes/application.js history.back() default handler

Screen Shot 2021-08-19 at 13 50 45

By the way a capacitor version is here, based on this addon: ember-capacitor-events

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

Successfully merging this pull request may close these issues.

1 participant