Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use constant for ng-remote-validate attribute? #29

Open
rebers opened this issue Mar 15, 2016 · 1 comment
Open

Use constant for ng-remote-validate attribute? #29

rebers opened this issue Mar 15, 2016 · 1 comment

Comments

@rebers
Copy link

rebers commented Mar 15, 2016

Hi there,

this does not seem to work:
<input type="email" class="form-control" required ng-model="order.account.email" ng-remote-validate="[AFTERCARE + '/misc/email']" ng-remote-method="POST">

My project has AFTERCARE assigned to the $rootScope and print this out works, but inside the attribute it throws an error (ReferenceError: AFTERCARE is not defined).

Any idea?

@rebers
Copy link
Author

rebers commented Mar 15, 2016

Solved this like that:
<input type="email" name="email" autocomplete="off" class="form-control" ng-class="{ 'is-loading': checkout.email.$pending }" required ng-model="order.account.email" ng-remote-validate="{{ AFTERCARE.API_ENDPOINT }}/misc/email" ng-remote-method="POST">

Seems wrong to me, but works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant