html2canvas is not defined

I’m developing my project using angularjs and php and need to save a certificate which will be generated at the end, Certificate with it’s contents is created dynamically but cannot do right click->save as since it is not an image,
So I used canvas for this, but it doesn’t seem to help.

I included this in head tag of my HTML file

<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.5.0-alpha1/html2canvas.js"></script>

But still it says “html2canvas is not defined”

MY HTML CODE:

<button id="btn-Preview-Image">Print</button>

My Javascript Code:

$(document).ready(function() {

            var element = $("#html-content-holder"); // global variable
            var getCanvas; // global variable

            $("#btn-Preview-Image").on('click', function() {
                html2canvas(element, {
                    onrendered: function(canvas) {
                        $("#previewImage").append(canvas);
                        getCanvas = canvas;
                    }
                });
            });
});

Source: AngularJS