Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Math.random function to generate a number between 20 and 100 and then use the ngSwitch directive to display a letter grade based on this

  1. Use Math.random function to generate a number between 20 and 100 and then use the ngSwitch directive to display a letter grade based on this class grading policy.
    1. add implements OnInit to the AppComponent class
    2. add variable x in the AppComponent class
    3. add ngOnInit(){ this.x = Math.floor(Math.random()*10);}
    4. add {{x}} in the app.components.html file
    5. You should see numbers from 1-9 when you refresh the page
    6. Change formula in #c to generate numbers from 20 to 100.
    7. Change {{x}} in #d to ngSwitch directive

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

discuss different sources of numerical data;

Answered: 1 week ago