By click on button "push" I need to open new window and pass to it HTML content to display it.
Here is view that display HTML:
Here is controller definition:
var test = angular.module('test', []);
test.controller('testController', ['$compile', '$scope','$window', function($compile, $scope, $window) {
$scope.openWindow = function() {
$window.open('to-print', 'width=500,height=400');
};}]);
Here is HTML content:
<div ng-app="test" id = "content" ng-controller="testController">
<label>Entar Name:</label>
<label>Michael</label>
<br/>
<br/>
<label>Entar Age:</label>
<label>25</label>
<hr/>
<button ng-click="openWindow()">push!</button>
</div>
And the HTML I want to display inside opened window is:
<label>Entar Name:</label>
<label>Michael</label>
<br/>
<br/>
<label>Entar Age:</label>
<label>25</label>
Here is fiddle.
How can I implement it?