Sector 8

Health Calculator Using Angular JS

A simple example of using angular js to return calculations based on a persons sex, age, height, weight and activity level.

Please note, this is not to be used as any kind of dietary tool and is just a working example of using the angular JavaScript library.

Edit Details:

  • Your age is required!
  • Your sex:
  • Your height is required!
  • Your weight is required!

Results:

Age
{{statistics.user_age}}
Sex
{{statistics.user_sex}}

Height

cm metres inches feet
{{statistics.user_cm}} {{statistics.user_mt | number:2}} {{statistics.user_in}} {{statistics.user_ft | number:1}}

Weight

kg lb stone
{{statistics.user_kg | number:0}} {{statistics.user_lb | number:0}} {{statistics.user_st | number:1}}

Your Body Mass Index

BMI BMI Prime BMI Rating
{{statistics.user_bmi}} {{statistics.user_bmi_prime}} {{statistics.bmi_rating}}

Metabolic Rates:

Harris-Benedict equation
BMR Daily kilocalorie requirements
{{statistics.user_bmr.hb | number:0}} {{statistics.user_rki.hb | number:0}}
Mifflin-St Jeor equation
BMR Daily kilocalorie requirements
{{statistics.user_bmr.msj | number:0}} {{statistics.user_rki.msj | number:0}}