Join Alexander Zanfir for an in-depth discussion in this video Create a password match Angular directive, part of MEAN Stack and MongoDB: Development Techniques.
- [Voiceover] Let's learn a bit about Angular directives.…We have already used several Angular directives…such as ng model and ng repeat,…we can see what they do.…But, now let's create our own…so we can get a better feel for how they work within.…We will need to create our own custom directive…in order to use Angular to warn us on the front end…about our passwords matching or not…during the registration process.…Therefore, we don't actually need to send…our confirmed password to the server.…Angular can handle that for us…saving us some unnecessary data across the network.…
To start with, let's create a new folder in our app folder…called directives.…And, a file inside called compare to directive dot js.…Now, let's export our compare to function,…and I'll call is compare to directive.…We will also need to access the parse service…which will allow us to convert Angular expressions…into functions so that we can manually evaluate…the passwords for this directive.…
Then, we will use ng inject so that parse…is injected properly.…
- Installing and setting up your MEAN toolset
- Making an Angular post form
- Sending posts
- Displaying messages
- Creating a registration form
- Saving users
- Associating users with posts
- Authenticating users at login
Skill Level Intermediate
2. Message Posting
3. Display Messages
Save a user with Mongo13m 26s
5. Logging In
Next steps2m 5s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.