Created
August 27, 2019 16:41
-
-
Save hetdev/375731e6f789a4f54c9f0b1fc69409fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sendCustomEvent() { | |
const data = { | |
name: 'DataSentThoughtCustomEvent' | |
}; | |
const event = new CustomEvent('phoenix-wc-wiki-ngx-ce-data-sent-test', { detail: data }); | |
window.dispatchEvent(event); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class AppComponent { | |
title = 'phoenix-wc-wiki-ngx'; | |
sendCustomEvent() { | |
const data = { | |
name: 'DataSentThoughtCustomEvent' | |
}; | |
const event = new CustomEvent('phoenix-wc-wiki-ngx-ce-data-sent-test', { detail: data }); | |
window.dispatchEvent(event); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment