5

I wanted to make input mask, in case CNPJ.

Then I saw it here.

https://github.com/assisrafael/angular-input-masks/

But not getting to implement.

See the excerpt from my code, in which case it did not work.

<html>
<head>
    <meta charset="utf-8">
    <script src="angular.js"></script>
    <script src="js/masks.min.js"></script>

    <script>
        angular.module('ui.utils.masks');
    </script>

</head>
<body ng-app>
    <ul>
        <li><a href="teste.html">Teste</a></li>
    </ul>

    <div>
        <label>CNPJ:</label>
        <input type="text" ng-model="cnpj" ui-br-cnpj-mask>
    </div>

</body>
</html>

What is missing to work?

1
  • angular.module('app',[''ui.utils.masks'']) now declare ng-app='app' Commented Jan 23, 2015 at 22:05

1 Answer 1

7

Declare module like below.

angular.module('app',['ui.utils.masks'])

And then change ng-app on HTML like below.

ng-app="app"

This would help you. Thanks.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.