Depending on whether you're using Angular, another framework, or none at all, there are a few different ways to install Ionic.
Using Ionic in Angular
When using Ionic in an Angular project, install the latest
@ionic/angular package from
npm install @ionic/[email protected] --save
Each time there is a new Ionic release, the
Using Ionic from a CDN
Ionic can also be included from a CDN by adding a script tag!
It's recommended to use unpkg to access the Framework from a CDN. To get the latest version, add the following
<script> tag inside the
<head></head> element in an HTML file:
<script src="https://unpkg.com/@ionic/[email protected]/dist/ionic.js"></script>
With this it's possible to use all of the Ionic components without having to install anything.
This does not install Angular or any frameworks. This allows use of Ionic components without a framework.
Ionicons from a CDN
Ionicons is packaged by default with the Ionic Framework, so no installation is necessary if you're using Ionic. Want to use Ionicons without Ionic Framework? Place the following
<script> near the end of your page, right before the closing
</body> tag, to enable them.
<script src="https://unpkg.com/[email protected]/dist/ionicons.js"></script>