Skip to content

mikeries/angular-create-a-service-lab-g-416

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a Service structure

Objectives

  • Write a custom Service
  • Use the custom Service in Controller

Instructions

Let's write our own service to do some basic math.

Using the existing directory structure, we've got a controller that's trying to call a service that doesn't exist yet, named MathService. Create that service in js/app/services/MathService.js.

Our controller is trying to call MathService.sum() with an array of numbers, expecting it to return the sum of all those numbers. Create this method, then see if it displays the sum correctly!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 73.0%
  • HTML 27.0%