Simple service

In this lab you will create a simple service.

  • Create a new app
  • Create a new service – MathService using angular CLI
  • Add the following methods
    • getRandNumber()
    • setRandLimit(low_limit:number,high_limit:number) 
    • add2Nums(a:number, b:number)
  • Create 2 components to use the service:
    • set a different limits
    • get and print 2 numbers and add result
  • Inject the service as singleton and as different instances and check the results