Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Service Recipe docs. Typo(s) or confusing example. #6331

Closed
@bradgreens

Description

@bradgreens

The documentation Service Recipe code snippet appears to not be valid syntax and thus may be a confusing example.

On the following page http://docs.angularjs.org/guide/providers page. The Service Recipe snippet shows:

function UnicornLauncher(apiToken) {

  this.launchedCount = 0;
  this.launch() {
    // make a request to the remote api and include the apiToken
    ...
    this.launchedCount++;
  }
}

But I think it's supposed to be this:

function UnicornLauncher(apiToken) {

  this.launchedCount = 0;

  this.launch = function(){
    // make a request to the remote api and include the apiToken
    this.launchedCount++;
  }

  this.launch()
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions