title: How to write Angular Controller inside Experirment JavaScript in Optimizely
body: <p>I have tried writing angularJS controller inside experimental javascript of variation in <strong>optimizely</strong>. it does not seems to work.</p>
  
  <p>Basically i would like to insert HTML snippet like this </p>
  
  <pre><code>&lt;div ng-app="myApp"&gt;
          &lt;div ng-controller="MainController"&gt;firstApp&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and an controller for this like below:</p>
  
  <pre><code>var myApp = angular.module("myApp", []);        
  myApp.controller("MainController", function($scope, $window) {
      alert("Angularjs call function on page load");
  });
  </code></pre>
  
  <p>i have tried few ways and its not working, Is there any way to make it work</p>
  
  <p>Plnkr code: <a href="https://plnkr.co/edit/owonSOoCyd9EsaFPTj1Y?p=preview" rel="nofollow noreferrer">Demo</a></p>