Last active
March 1, 2018 04:34
-
-
Save jbro-io/4693374 to your computer and use it in GitHub Desktop.
This is a Visualforce component used to render Knockout.js HTML comment tags.
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
<apex:component layout="none"> | |
<apex:attribute name="statement" | |
description="The Knockout containerless statement to insert." | |
type="String" | |
required="false" | |
/> | |
<apex:attribute name="close" | |
description="Flag that determines whether this is an opening or closing statement for Knockout." | |
type="Boolean" | |
required="false" | |
default="false" | |
/> | |
<apex:componentBody> | |
<!--knockout opening tag--> | |
<apex:outputPanel layout="none" rendered="{!NOT(ISBLANK(statement))}"> | |
<apex:outputText value="<" escape="false"/>!-- ko {!statement} --<apex:outputText value=">" escape="false"/> | |
</apex:outputPanel> | |
<!--knockout closing tag--> | |
<apex:outputPanel layout="none" rendered="{!close}"> | |
<apex:outputText value="<" escape="false"/>!-- /ko --<apex:outputText value=">" escape="false"/> | |
</apex:outputPanel> | |
</apex:componentBody> | |
</apex:component> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment