Skip to content

Instantly share code, notes, and snippets.

@augustl
Created January 3, 2013 19:37
Show Gist options
  • Select an option

  • Save augustl/4446363 to your computer and use it in GitHub Desktop.

Select an option

Save augustl/4446363 to your computer and use it in GitHub Desktop.
$scope.addTab = function () {
var popupTemplateUrl = "/angular/templates/new-tab.html";
var popupTemplate = document.createElement("div");
popupTemplate.setAttribute("ng-include", "\"" + popupTemplateUrl + "\"");
var popup = $compile(popupTemplate);
var popupElement = popup($scope);
console.log(popupElement.get(0));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment