Skip to content
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 opened this issue Feb 19, 2014 · 0 comments
Closed

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

bradgreens opened this issue Feb 19, 2014 · 0 comments

Comments

@bradgreens
Copy link

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()
}
@IgorMinar IgorMinar self-assigned this Feb 19, 2014
@IgorMinar IgorMinar modified the milestone: 1.2.14 Feb 19, 2014
khepin pushed a commit to khepin/angular.js that referenced this issue Feb 19, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants