I have tried writing angularJS controller inside experimental javascript of variation in optimizely. it does not seems to work.
Basically i would like to insert HTML snippet like this
<div ng-app="myApp">
<div ng-controller="MainController">firstApp</div>
</div>
and an controller for this like below:
var myApp = angular.module("myApp", []);
myApp.controller("MainController", function($scope, $window) {
alert("Angularjs call function on page load");
});
i have tried few ways and its not working, Is there any way to make it work
Plnkr code: Demo