ched
January 16, 2015, 1:33pm
1
I am trying to modify Angular’s built in validation according to the official documentation (https://docs.angularjs.org/guide/forms , pretty at the bottom). They even provide a plunkr: http://plnkr.co/edit/HqFMyiD9z2KA2f2aW56p?p=preview .
However, if I just copy the code into my project, I’m getting “Cannot read property ‘email’ of undefined”. Basically I’m just replacing
`var App = angular.module('form-example-modify-validators', []);`
with
var App = angular.module('ionicApp', ['ionic', 'firebase', 'ngCordova'])
What am I doing wrong here?
you dont need to change the app module .
just add the directive and use it.
ched
January 17, 2015, 4:09pm
3
Well this is exactly what’s not working: I added the directive to my var App = angular.module('ionicApp', ['ionic', 'firebase', 'ngCordova'])
and it throws the error.
ched
January 18, 2015, 12:00am
4
I believe the reason the ionic run block in the module definition. Appears as if it wasn’t firebase. Can anyone confirm this?
hi,
i open a codepen with directive check this out.
make sure you use ionic new beta (14).
http://codepen.io/itamarCohen/pen/QwvweK?editors=101
1 Like
ched
January 18, 2015, 3:29pm
6
Upgrading to the new beta did the job.
Thanks a lot for that hint and taking the effort to provide a codepen, I really appreciate it!
1 Like