Book Image

Learning Ionic

By : Arvind Ravulavaru
Book Image

Learning Ionic

By: Arvind Ravulavaru

Overview of this book

Table of Contents (19 chapters)
Learning Ionic
About the Author
About the Reviewers

The Cordova whitelist plugin

Before we go ahead and start working with ngCordova, we are going to spend a moment on one of the key Cordova plugins – the whitelist plugin

From the Cordova documentation on the whitelist plugin:

"Domain whitelisting is a security model that controls access to external domains over which your application has no control. Cordova provides a configurable security policy to define which external sites may be accessed."

So, if you want to have more control over how your app should behave when dealing with content from other sources, you should be working with the whitelist plugin. As you may have noticed, this plugin is already added to our Ionic project.

If this plugin is not added to the Ionic/Cordova project, you can do so easily by running:

ionic plugin add cordova-plugin-whitelist

Once the plugin is added, you can update the config.xml file with the navigation whitelist – the links that your app is allowed to...