+ Start a Discussion
Joseph DindingerJoseph Dindinger 

Embed Lightning App into Classic Layout?

Hi everyone, just starting to really get into Lightning development, and I can't figure out if this is possible.

Built a Lightning App that we are embedding in the custom Lightning Opportunity detail page.  It works well, so we were thinking it would be great to put that same app/component into the classic layout by embedding it in a VF page.  It doesn't seem to work, giving some type of cross-domain issue.  Does anybody know if it is possible? 

Here is the code of the VF page I'm trying to embed into the Opportunity layout:
 
<apex:page standardController="Opportunity">
    <apex:includeLightning />
    <apex:includeScript value="/lightning/lightning.out.js" />
    <div id="lightning" />

    <script>
        $Lightning.use("c:controlPanelApp", function() {
          $Lightning.createComponent("taf_myapp:controlPanel",
          { recordId : "{!Opportunity.Id}", sObjectName : "Opportunity" },
          "lightning",
          function(cmp) {
          });
        });
    </script>
</apex:page>

Thank you!