Getting this error when trying to run a lighning app (click on preview app) with extends="ltng:outApp"
. This is to embed the component inside VFP.
Note - The error is not reproducable when the same lightning component is embedded in VFP and previewed. I believe this started happening after winter 16 release.
- lightning is enabled in the org.
extends ltng:outApp is required to include this in a VF page.
<aura:application access="GLOBAL" extends="ltng:outApp"> <!-- Define the Design System static resource (version 0.9.0) --> <c:scoryAppCard /> </aura:application>
VF page code that embed the above lightning component -
<!-- Include a JavaScript file in your Visualforce page -->
<apex:includeScript value="/lightning/lightning.out.js" />
<div id="lightning" />
<script>
//Tell your Visualforce page to use ExposeVF Lightning app
$Lightning.use("c:scoryApp", function() {
// Write a function that creates the component on the page
$Lightning.createComponent("c:scoryAppCard",
{},
"lightning",
function(cmp) {
// do some stuff
});
});
</script>
``