Copy a text from a div and download an image using a tag

I want to copy a text from a div tag.

<div id="copy">
            <p>Copy this text !</p>

any suggestion how can i do it ?

  • AND -

i also want to download image using

<a href="" download></a>

By default, the reduced version of jQuery you have available with angular does not provide DOM selectors by class or id.

If it works for you, you can work with the oposite aproach.
You may have a {{theText}} in the template in and $scope.theText in the controller.
Then you just have to update the variable content to change the text.