Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Brandon BrownCourses Plus Student 7,737 Points
Having trouble with two fill in the blank quiz questions on Angular JS Stage 5 Extending Inputs.
I cant find any definitions in the video transcript. I have even entered things like $render, $apply, $digest, $viewValue and get no luck...
Going first from model to view, and second from view to model, what are the two arrays NgModelController provides for transforming data?
This method on NgModelController is what we call when data has changed via the view (ie. our plugin) and we want to update the value attached to the model:
Matthew Goodrich1,989 Points
The answer accepts $formatters and $parsers in that order. $formatters (model to view) and $parsers (view to model) .
Chris Shaw26,650 Points
This question is tricky but does offer a clue which was talked about in the video, the clue by the way is transforming. In AngularJS there's two types of transform arrays:
- the first is
- the second is
AngularJS will always execute
$formatters hence that's the answer the question is looking for, if that seems confusing in any way don't worry as you can find much more information at the following link.
Daniel RamCourses Plus Student 14,808 Points
But you gotta read the question. Going from Model to View is $formatters and going from View To Model is $parsers. It was intentionally done to reinforce the concept I think.
Seth Scoville2,496 Points
I don't think that was even discussed in the preceding video, was it? This course has been a complete mess.
ellie adam26,376 Points
I had same problem but I passed by switching them around.
$formatters and $parsers