wirecardBrasil / awesome-mask

The awesome-mask runs with Vue.js and uses the vanilla-masker to make your form awesome with masks.
MIT License
165 stars 22 forks source link

not working #17

Closed murilolivorato closed 7 years ago

murilolivorato commented 7 years ago

it shoed this errror -

Failed to resolve directive: mask 
(found in anonymous component - use the "name" option for better debugging messages.)

I instaled with npm , do I have to import ?

caioincau commented 7 years ago

Yeah, you have to import it, like the README says:

<script>
import Component from './components/Component'
import AwesomeMask from 'awesome-mask'

export default {
  name: 'app',
  components: {
    Component
  },
  directives: {
    'mask': AwesomeMask
  }
}
</script>
harshalkhandare commented 7 years ago

Gives me the same error even after doing the above. How is the import component related?

caioincau commented 7 years ago

Can you post your code? @hkhandare

caioincau commented 7 years ago

This is not a component @hkhandare , it is a directive

harshalkhandare commented 7 years ago

Hi, it's working. Thanks.