Add ui-mask in ionic project

Hi, I’m following the steps from https://github.com/angular-ui/ui-mask to install the mask in my ionic projet, but didn´t work.

First I install with bower bower install angular-ui-mask

Second I put the reference in index.html ( )

Third I set dependency in app.js
angular.module(‘starter’, [‘ionic’, ‘ui-mask’, ‘starter.controllers’])

and the error:
Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:
Error: [$injector:modulerr] Failed to instantiate module ui-mask due to:
Error: [$injector:nomod] Module ‘ui-mask’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

Does anybody knows, please?

Hi Lucas,

Did you find a way to make this work?

I manage to make it work:

First, install with bower:
bower install angular-ui-mask

Second, add this line into your www/index.html
script src=“lib/angular-ui-mask/dist/mask.min.js”

Then add this line into app.js:
angular.module(‘starter’, [‘ionic’, ‘ngCordova’,… ‘ui.mask’, …])

That’s all

1 Like