Allow users to select and copy text in Ionic 2 apps

In Ionic 2, the selection and thus copying of text is disabled by default. Enabling selecting and copying of content inside an Ionic 2 app is pretty simple. Here’s how

First, add this class to your app.scss file

https://gist.github.com/ae4e3480192852d512f337e5fd018baf

Now you can add the “selectable” class to individual elements in the app or to ionic elements using the ngClass attribute. This will allow your users to select and copy text from within your Ionic 2 app  ?

Selecting and copying text in an Ionic 2 app

Selecting and copying text in an Ionic 2 app

Help other people find this

Leave a Reply

Your email address will not be published. Required fields are marked *