How to Print a page or DIV using AngularJS

Last Reply on Feb 25, 2015 02:09 AM By Mudassar

Posted on Feb 25, 2015 02:09 AM
Product Date Time
juice 2015-02-25 14:00:00
cheese 2015-02-25 07:00:00
CHIPS 2015-02-25 16:00:00
     

i have the above table that is displayed on a web page. i want to have a button that when its clicked it must call a function to print out just the table. how do i achieve this? do i have to send this data to a text file or something first? but i need to do it in angular js.

i have a function that displays the above table as follows 

function Report($http) {
    var self = this;
    self.$http = $http;
    self.GetReport = function () {

        var result = Ajax.Get(self.$http, {
            url: GetReportjson,
            success: function (data) {
                self.DisplayReport = data;

            }

        }).error(function () {
            alert(" error!");
        });


    }

 

Posted on Feb 25, 2015 02:09 AM

Refer

http://stackoverflow.com/questions/22189544/print-a-div-using-javascript-in-angularjs-single-page-aplication