Custom register form with angularjs + Meteor

0

I'm learning AngularJS + Meteor recently, and I'm doing this tutorial:

link

At this exact step, I'm having trouble customizing the registration form.

The directory that is suggested transforms into the policy with simply an email and password, with a default layout. It's completely impossible for me to use this design and poverty of inputs in my actual application (which I'm doing using the basics of the tutorial).

I need to give classes for inputs to customize, and I need to add the inputs in the collection users (using accounts-password), how do I do this? The documentation teaches you how to add using METEOR, but how do I use Meteor + angle?

I need to know the fields: Email, full name, cell phone, date of birth, etc etc, the html of these fields I know how to do with their inputs, but how to play these inputs in the collection user? (using package accounts-password)

link

    
asked by anonymous 05.07.2016 / 08:42

2 answers

0

Remember that if

Accounts.createUser(novoUser); //

If it is done in a client folder, the new user will be saved and the login will be done automatically, since if it is saved in a file on the server, the newUser will only be saved in the collection

    
18.08.2016 / 14:14
2

When it comes to the Collection "users" Meteor offers a special schema that contains default fields like password, username, emails (an array of emails), createAt, service and PROFILE (which is what you are looking for). In the profile object you can add data of your will like name, age etc. At the Meteor documentation link you will find more details:

link

Just set a 'newUser' in your controller, for example.

<input type="text" ng-model="$ctrl.novoUser.profile.nome">
<input type="text" ng-model="$ctrl.novoUser.profile.idade">
<input type="text" ng-model="$ctrl.novoUser.password">


Accounts.createUser(novoUser); //no seu método salvar

I hope I have helped.

    
13.08.2016 / 05:04