Installing Mobiscroll in your Ionic app
1. NPM/CLI Install (Recommended):
You can use the CLI or directly grab Mobiscroll for Angular from NPM for your Ionic apps.
2. Manual Install:
Download Mobiscroll and manually install it in your app. You will find a step-by-step guide in the documentation. By manually installing Mobiscroll, the private npm registry issue with Ionic Pro won't occur.
Deploying your app to Ionic Pro & Ionic View if you used the CLI installation method
While Ionic Pro does not work with private npm registries at the moment, Mobiscroll can be definitely deployed to it.
This is the common error that you will see:
npm ERR! code E404
npm ERR! 404 Not Found: @mobiscroll/angular-trial@xxx
To solve it do the following:
Instead of using
mobiscroll config ionic you can use
mobiscroll config ionic-pro . The difference between the two commands is when configuring for ionic pro, the package will be downloaded and the reference in
package.json will point to the downloaded tgz instead of the npm package. The drawback in this case is that whenever you'd like to update Mobiscroll to the latest version, you'll need to re-run
mobiscroll config ionic-pro instead of just calling
npm install like you normally would do.
This is what happens in the background when calling
mobiscroll config ionic-pro, which of course you can do manually as well:
- If you used NPM or CLI installation, you will have to export Mobiscroll before deployment. Make sure to run:
npm pack @mobiscroll/angularthe a new package file:
mobiscroll-angular-xxx.tgzwill get generated in the root folder.
- In the
package.jsonlook for the following line
"@mobiscroll/angular": "^xxx"and change it to
NOTE: This is a known limitation of Ionic Pro at the moment that will be hopefully solved soon. We urge you to reach out to them as well and ask for this feature 😉