freco write an angular service that takes a number as an input from the html page and calculates its square root or cube root using service. display the answer on the page.
Answers
Answered by
4
AngularJS – Services. Services are single oriented objects or just similar to a javascript function to carry out a specific task.
Angular enables us to apply these services with the help of controllers, service, filter or directive as well.
Whenever we wish to use service with these components, we will have to locate and define the service name along with the associated component.
In this way, component directs the angular to load that definite service in the application. This method of inducting service is known as dependency injection.
Similar questions
Math,
6 months ago
Math,
6 months ago
Accountancy,
6 months ago
Environmental Sciences,
1 year ago
Math,
1 year ago
Math,
1 year ago