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
Description
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()
}