Skip to content

Instantly share code, notes, and snippets.

@simpluslabs
Created February 8, 2019 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simpluslabs/014f68ec8fa78bf1159ff5dba4598425 to your computer and use it in GitHub Desktop.
Save simpluslabs/014f68ec8fa78bf1159ff5dba4598425 to your computer and use it in GitHub Desktop.
import { LightningElement } from 'lwc';
export default class LinkToAnotherCmp extends LightningElement {
raiseEvent(event){
let txtInput = this.template.querySelector(".txtInput");
const v = txtInput.value;
const textChangeEvent = new CustomEvent('txtChange',{
detail : {v},
});
//Fire Event
this.dispatchEvent(textChangeEvent);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment