You need to sign in to do that
Don't have an account?

Hi, Lightning Component inside Visualforce page throwing weird error.
Hi There is a Visual force page calling lightning compoent throwing error.
Uncaught SyntaxError: Invalid or unexpected token throws at https://c.XXXX.visual.force.com/apex/CS_PD_PageLayoutComponent?id=0010E00000HZkI6QAL&tour=&isdtp=p1&sfdcIFrameOrigin=https://XXXX.lightning.force.com&sfdcIFrameHost=web&nonce=b92faed0849d7bbb9f9
Here is a code
<apex:page standardController="Account" showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0">
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<apex:includeScript value="/lightning/lightning.out.js" />
<apex:includeScript value="{!URLFOR($Resource.svg4everybody + '/svg4everybody-master/dist/svg4everybody.js')}" />
<div id="lightning" />
<script>
$Lightning.use("c:CS_CP_PortfolioDashboardApp", function() {
// Write a function that creates the component on the page
$Lightning.createComponent("c:CS_CP_PortfolioDashboard_HeaderContainer",
{ SalesforceId : '{!Account.Id}', AccountName: '{!Account.Name}', JobTitle : '{!Account.Job_Title__c}'},
"lightning",
function(cmp) {
// do some stuff
});
});
</script>
</html>
</apex:page>
Uncaught SyntaxError: Invalid or unexpected token throws at https://c.XXXX.visual.force.com/apex/CS_PD_PageLayoutComponent?id=0010E00000HZkI6QAL&tour=&isdtp=p1&sfdcIFrameOrigin=https://XXXX.lightning.force.com&sfdcIFrameHost=web&nonce=b92faed0849d7bbb9f9
Here is a code
<apex:page standardController="Account" showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0">
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<apex:includeScript value="/lightning/lightning.out.js" />
<apex:includeScript value="{!URLFOR($Resource.svg4everybody + '/svg4everybody-master/dist/svg4everybody.js')}" />
<div id="lightning" />
<script>
$Lightning.use("c:CS_CP_PortfolioDashboardApp", function() {
// Write a function that creates the component on the page
$Lightning.createComponent("c:CS_CP_PortfolioDashboard_HeaderContainer",
{ SalesforceId : '{!Account.Id}', AccountName: '{!Account.Name}', JobTitle : '{!Account.Job_Title__c}'},
"lightning",
function(cmp) {
// do some stuff
});
});
</script>
</html>
</apex:page>