Edit in JSFiddle

var myApp = angular.module('myApp', []);

myApp.directive('demo', [function () {
  return {
    template: '<div id="anymod-aklnr"></div>',
    link: function (scope, ele, attrs) {
      AnyMod.render()
    }
  }
}])

myApp.controller('myCtrl', [function () {
  Anymod.render()
}])
<div ng-controller='myCtrl'>
  <div demo></div>
  <div id="anymod-dmkdn"></div>
</div>

<!-- AnyMod -->
<script id="AnyMod-script">
  (function (m,o,d,u,l,a,r,i,z,e) {
    u[m]={Project:o,rq:[],Opts:r,ready:function(j){u[m].rq.push(j)}};function j(s){return encodeURIComponent(btoa(s))};z=l.getElementById(m+'-'+a);r=u.location;
    e=[d+'/page/'+o+'/'+j(r.pathname)+'/'+j(r.host)+'?t='+Date.now(),d];e.map(function(w){i=l.createElement(a);i.defer=1;i.src=w;z.parentNode.insertBefore(i,z);});
  })('AnyMod','8PP6M2','https://cdn.anymod.com/v2',window,document,'script',{});
</script>
<!-- /AnyMod -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>