Skip to content

Instantly share code, notes, and snippets.

💭
http://www.0to1code.com/

Vishnu Kumar TheVishnuKumar

💭
http://www.0to1code.com/
Block or report user

Report or block TheVishnuKumar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View aura_component_1.cmp
<aura:component implements="flexipage:availableForAllPageTypes" access="global">
<div style="padding: 20px;background: white;margin: 10px;border-radius: 4px;height: 120px;">
<h1 style="font-size: 15px;">Aura Component: Firing Event</h1>
<c:registerEvent name="testevent" namespace="astro" aura:id="first-event"></c:registerEvent>
<lightning:button label="Fire Event From Aura" onclick="{!c.fireEvent}"></lightning:button>
</div>
</aura:component>
@TheVishnuKumar
TheVishnuKumar / lwc_streaming_demo.html
Last active Apr 17, 2019
Lightning Web Component Streaming API Demo
View lwc_streaming_demo.html
<template>
<!-- Push Topic -->
<c-lwc_streaming_api
channel="/topic/NewContactCreated"
api-version="45.0"
debug=true
onmessage={handleMessage}
onerror={handleError}
class="lwc_streaming_api-1">
</c-lwc_streaming_api>
View WireServiceDemo.html
<template>
<style>
table tr td{
padding: 10px;
border: 1px solid black;
}
</style>
<div style="background:white;padding:20px;">
<table>
<tr>
View facebooktimeline.html
<template>
<iframe
src={facebookSrc}
width="340"
height="500"
style="border:none;overflow:hidden"
scrolling="no"></iframe>
</template>
View child.html
<template>
<style>
table tr td{
padding: 10px;
border: 1px solid black;
}
</style>
<table style="background:white;">
<tr>
View template if:true and template if:false
<!--This will render if isTrue = true-->
<template if:true={showTom}>
True Part
</template>
<!--This will render if isFalse = false-->
<template if:false={showTom}>
False Part
</template>
View Rendered in VF
<apex:outputPanel rendered="{!TrueVariable}">
True
</apex:outputPanel>
<apex:outputPanel rendered="{! !TrueVariable }">
False
</apex:outputPanel>
View Aura:if and Aura:set
<aura:renderIf isTrue="{!v.TrueVariable}">
True
<aura:set attribute="else">
False
</aura:set>
</aura:renderIf>
View TomAndJerry.html
<template>
<template if:true={showTom}>
<img src="https://vignette.wikia.nocookie.net/tomandjerry/images/3/33/Tom_cat.png/revision/latest?cb=20111113021359"/>
</template>
<template if:false={showTom}>
<img src="http://pngimg.com/uploads/tom_and_jerry/tom_and_jerry_PNG56.png"/>
</template>
</template>
View Stopwatch.html
<template>
<div style="background: white;padding: 20px;border-radius: 6px;">
<div style="font-size: 20px;text-align:center;">{timeVal}</div>
<template if:true={showStartBtn}>
<lightning-button label="Start" onclick={start} style="margin-left: 145px;"></lightning-button>
</template>
<template if:false={showStartBtn}>
<lightning-button label="Stop" onclick={stop} style="margin-left: 145px;"></lightning-button>
</template>
You can’t perform that action at this time.