FAQ: Your First App - Filters II

This community-built FAQ covers the “Filters II” exercise from the lesson “Your First App”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn AngularJS 1.X

FAQs on the exercise Filters II

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Just FYI,

On the part where you create the $scope for the book price and display it.
The class=“price” will display it in the top right corner of the window and it is being blocked by the builtin web address bar.
just in case anyone missed it when they added the expression {{product.price}} to their html file.


Update: After I refreshed the page and followed the steps again. The price placed itself in the correct position. Hmmm…


Thank you! I totally missed this…

Date issue - Bug??

When the date is piped to the Date filter the Month is +1 of the input month.

i.e. new Date(‘2014’,‘03’,‘08’) returns April 8, 2014 when it should be March 08, 2014

Am I doing something wrong or missing a step. I have tried with different new Date() inputs and received the same result.

Update: looks like this is related to the new Date() object. With out a filter, it returns the wrong long data format as well.

Date | MDN

new Date(year, monthIndex ...

As we know, all index citings in JS are zero-based.

Note: The argument monthIndex is 0-based. This means that January = 0 and December = 11 .

There is some other weirdness that needs to be accounted for. This is not a simple object to immediately master the use of. If anything, it is complicated and frustrating until we iron out all the wrinkles in our approach. Expect to come back to this over and over again, so keep your hair on!

f = new Date('1995-12-17T03:24:00')
Sun Dec 17 1995 03:24:00 GMT-0700 (Mountain Standard Time)
f = new Date('1995-12-17')
Sat Dec 16 1995 17:00:00 GMT-0700 (Mountain Standard Time)
1 Like

Thank you for your explanation. I will watch out for that pitfall in the future!

1 Like