Skip to content
This repository has been archived by the owner on May 26, 2019. It is now read-only.

URLs to the API docs updated (#2177) #2186

Merged
merged 4 commits into from
Mar 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/applications/applications-and-instances.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Every Ember application is represented by a class that extends [`Application`](https://emberjs.com/api/ember/2.16/classes/Application).
Every Ember application is represented by a class that extends [`Application`](https://emberjs.com/api/ember/release/classes/Application).
This class is used to declare and configure the many objects that make up your app.

As your application boots,
it creates an [`ApplicationInstance`](https://emberjs.com/api/ember/2.16/classes/ApplicationInstance) that is used to manage its stateful aspects.
it creates an [`ApplicationInstance`](https://emberjs.com/api/ember/release/classes/ApplicationInstance) that is used to manage its stateful aspects.
This instance acts as the "owner" of objects instantiated for your app.

Essentially, the `Application` *defines your application*
Expand Down
10 changes: 5 additions & 5 deletions source/applications/dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ Ember applications utilize the [dependency injection](https://en.wikipedia.org/w
("DI") design pattern to declare and instantiate classes of objects and dependencies between them.
Applications and application instances each serve a role in Ember's DI implementation.

An [`Application`](https://emberjs.com/api/ember/2.16/classes/Application) serves as a "registry" for dependency declarations.
An [`Application`](https://emberjs.com/api/ember/release/classes/Application) serves as a "registry" for dependency declarations.
Factories (i.e. classes) are registered with an application,
as well as rules about "injecting" dependencies that are applied when objects are instantiated.

An [`ApplicationInstance`](https://emberjs.com/api/ember/2.16/classes/ApplicationInstance) serves as the "owner" for objects that are instantiated from registered factories.
An [`ApplicationInstance`](https://emberjs.com/api/ember/release/classes/ApplicationInstance) serves as the "owner" for objects that are instantiated from registered factories.
Application instances provide a means to "look up" (i.e. instantiate and / or retrieve) objects.

> _Note: Although an `Application` serves as the primary registry for an app,
Expand Down Expand Up @@ -194,7 +194,7 @@ export default Component.extend({
## Factory Instance Lookups

To fetch an instantiated factory from the running application you can call the
[`lookup`](https://emberjs.com/api/ember/2.16/classes/ApplicationInstance/methods/lookup?anchor=lookup) method on an application instance. This method takes a string
[`lookup`](https://emberjs.com/api/ember/release/classes/ApplicationInstance/methods/lookup?anchor=lookup) method on an application instance. This method takes a string
to identify a factory and returns the appropriate object.

```javascript
Expand Down Expand Up @@ -225,9 +225,9 @@ export default {

### Getting an Application Instance from a Factory Instance

[`Ember.getOwner`](https://emberjs.com/api/ember/2.16/classes/@ember%2Fapplication/methods/getOwner?anchor=getOwner) will retrieve the application instance that "owns" an
[`Ember.getOwner`](https://emberjs.com/api/ember/release/classes/@ember%2Fapplication/methods/getOwner?anchor=getOwner) will retrieve the application instance that "owns" an
object. This means that framework objects like components, helpers, and routes
can use [`Ember.getOwner`](https://emberjs.com/api/ember/2.16/classes/@ember%2Fapplication/methods/getOwner?anchor=getOwner) to perform lookups through their application
can use [`Ember.getOwner`](https://emberjs.com/api/ember/release/classes/@ember%2Fapplication/methods/getOwner?anchor=getOwner) to perform lookups through their application
instance at runtime.

For example, this component plays songs with different audio services based
Expand Down
8 changes: 4 additions & 4 deletions source/applications/run-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ $('a').click(() => {
});
```

The run loop API calls that _schedule_ work, i.e. [`run.schedule`](https://www.emberjs.com/api/ember/2.16/classes/@ember%2Frunloop/methods/schedule?anchor=schedule),
[`run.scheduleOnce`](https://www.emberjs.com/api/ember/2.16/classes/@ember%2Frunloop/methods/scheduleOnce?anchor=scheduleOnce),
[`run.once`](https://www.emberjs.com/api/ember/2.16/classes/@ember%2Frunloop/methods/once?anchor=once) have the property that they will approximate a run loop for you if one does not already exist.
The run loop API calls that _schedule_ work, i.e. [`run.schedule`](https://www.emberjs.com/api/ember/release/classes/@ember%2Frunloop/methods/schedule?anchor=schedule),
[`run.scheduleOnce`](https://www.emberjs.com/api/ember/release/classes/@ember%2Frunloop/methods/scheduleOnce?anchor=scheduleOnce),
[`run.once`](https://www.emberjs.com/api/ember/release/classes/@ember%2Frunloop/methods/once?anchor=once) have the property that they will approximate a run loop for you if one does not already exist.
These automatically created run loops we call _autoruns_.

Here is some pseudocode to describe what happens using the example above:
Expand Down Expand Up @@ -265,5 +265,5 @@ Disabling autoruns help you identify these scenarios and helps both your testing

## Where can I find more information?

Check out the [Ember.run](https://www.emberjs.com/api/ember/2.16/classes/@ember%2Frunloop) API documentation,
Check out the [Ember.run](https://www.emberjs.com/api/ember/release/classes/@ember%2Frunloop) API documentation,
as well as the [Backburner library](https://github.com/ebryn/backburner.js/) that powers the run loop.
6 changes: 3 additions & 3 deletions source/applications/services.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
A [`Service`](https://www.emberjs.com/api/ember/2.16/modules/@ember%2Fservice) is an Ember object that lives for the duration of the application, and can be made available in different parts of your application.
A [`Service`](https://www.emberjs.com/api/ember/release/modules/@ember%2Fservice) is an Ember object that lives for the duration of the application, and can be made available in different parts of your application.

Services are useful for features that require shared state or persistent connections. Example uses of services might
include:
Expand All @@ -20,7 +20,7 @@ For example, the following command will create the `ShoppingCart` service:
ember generate service shopping-cart
```

Services must extend the [`Service`](https://www.emberjs.com/api/ember/2.16/modules/@ember%2Fservice) base class:
Services must extend the [`Service`](https://www.emberjs.com/api/ember/release/modules/@ember%2Fservice) base class:

```app/services/shopping-cart.js
import Service from '@ember/service';
Expand Down Expand Up @@ -92,7 +92,7 @@ This injects the shopping cart service into the component and makes it available

Sometimes a service may or may not exist, like when an initializer conditionally registers a service.
Since normal injection will throw an error if the service doesn't exist,
you must look up the service using Ember's [`getOwner`](https://emberjs.com/api/ember/2.16/classes/@ember%2Fapplication/methods/getOwner?anchor=getOwner) instead.
you must look up the service using Ember's [`getOwner`](https://emberjs.com/api/ember/release/classes/@ember%2Fapplication/methods/getOwner?anchor=getOwner) instead.

```app/components/cart-contents.js
import Component from '@ember/component';
Expand Down
8 changes: 4 additions & 4 deletions source/components/defining-a-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default Route.extend({
});
```

Each component is backed by an element under the hood. By default,
Each component is backed by an element under the hood. By default,
Ember will use a `<div>` element to contain your component's template.
To learn how to change the element Ember uses for your component, see
[Customizing a Component's
Expand All @@ -58,7 +58,7 @@ the Handlebars template as described above and use the component that is
created.

If you need to customize the behavior of the component you'll
need to define a subclass of [`Component`](https://www.emberjs.com/api/ember/2.16/classes/Component). For example, you would
need to define a subclass of [`Component`](https://www.emberjs.com/api/ember/release/classes/Component). For example, you would
need a custom subclass if you wanted to change a component's element,
respond to actions from the component's template, or manually make
changes to the component's element using JavaScript.
Expand All @@ -71,7 +71,7 @@ file at `app/components/blog-post.js`. If your component was called

## Dynamically rendering a component

The [`{{component}}`](https://www.emberjs.com/api/ember/2.16/classes/Ember.Templates.helpers/methods/component?anchor=component) helper can be used to defer the selection of a component to
The [`{{component}}`](https://www.emberjs.com/api/ember/release/classes/Ember.Templates.helpers/methods/component?anchor=component) helper can be used to defer the selection of a component to
run time. The `{{my-component}}` syntax always renders the same component,
while using the `{{component}}` helper allows choosing a component to render on
the fly. This is useful in cases where you want to interact with different
Expand All @@ -81,7 +81,7 @@ allow you to keep different logic well separated.
The first parameter of the helper is the name of a component to render, as a
string. So `{{component 'blog-post'}}` is the same as using `{{blog-post}}`.

The real value of [`{{component}}`](https://www.emberjs.com/api/ember/2.16/classes/Ember.Templates.helpers/methods/component?anchor=component) comes from being able to dynamically pick
The real value of [`{{component}}`](https://www.emberjs.com/api/ember/release/classes/Ember.Templates.helpers/methods/component?anchor=component) comes from being able to dynamically pick
the component being rendered. Below is an example of using the helper as a
means of choosing different components for displaying different kinds of posts:

Expand Down
2 changes: 1 addition & 1 deletion source/components/handling-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ To utilize an `event` object as a function parameter:

The event handling examples described above respond to one set of events.
The names of the built-in events are listed below. Custom events can be
registered by using [Application.customEvents](https://www.emberjs.com/api/ember/2.16/classes/Application/properties/customEvents?anchor=customEvents).
registered by using [Application.customEvents](https://www.emberjs.com/api/ember/release/classes/Application/properties/customEvents?anchor=customEvents).

Touch events:

Expand Down
2 changes: 1 addition & 1 deletion source/components/passing-properties-to-a-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ In other words, you can invoke the above component example like this:
```

To set the component up to receive parameters this way, you need to
set the [`positionalParams`](https://www.emberjs.com/api/ember/2.16/classes/Component/properties/positionalParams?anchor=positionalParams) attribute in your component class.
set the [`positionalParams`](https://www.emberjs.com/api/ember/release/classes/Component/properties/positionalParams?anchor=positionalParams) attribute in your component class.

```app/components/blog-post.js
import Component from '@ember/component';
Expand Down
6 changes: 3 additions & 3 deletions source/components/the-component-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ There are a few things to note about the `didInsertElement()` hook:
- While [`didInsertElement()`][did-insert-element] is technically an event that can be listened for using `on()`, it is encouraged to override the default method itself,
particularly when order of execution is important.

[did-insert-element]: https://www.emberjs.com/api/ember/2.16/classes/Component/events/didInsertElement?anchor=didInsertElement
[dollar]: https://www.emberjs.com/api/ember/2.16/classes/Component/methods/$?anchor=%24
[did-insert-element]: https://www.emberjs.com/api/ember/release/classes/Component/events/didInsertElement?anchor=didInsertElement
[dollar]: https://www.emberjs.com/api/ember/release/classes/Component/methods/$?anchor=%24
[event-names]: http://guides.emberjs.com/v2.1.0/components/handling-events/#toc_event-names

### Making Updates to the Rendered DOM with `didRender`
Expand Down Expand Up @@ -254,7 +254,7 @@ export default Component.extend({

### Detaching and Tearing Down Component Elements with `willDestroyElement`

When a component detects that it is time to remove itself from the DOM, Ember will trigger the [`willDestroyElement()`](https://www.emberjs.com/api/ember/2.16/classes/Component/events/willDestroyElement?anchor=willDestroyElement) method,
When a component detects that it is time to remove itself from the DOM, Ember will trigger the [`willDestroyElement()`](https://www.emberjs.com/api/ember/release/classes/Component/events/willDestroyElement?anchor=willDestroyElement) method,
allowing for any teardown logic to be performed.

Component teardown can be triggered by a number of different conditions.
Expand Down
2 changes: 1 addition & 1 deletion source/components/wrapping-content-in-a-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ We will give them the option to specify either `markdown-style` or `html-style`.

Supporting different editing styles will require different body components to provide special validation and highlighting.
To load a different body component based on editing style,
you can yield the component using the [`component helper`](https://www.emberjs.com/api/ember/2.16/classes/Ember.Templates.helpers/methods/component?anchor=component) and [`hash helper`](https://www.emberjs.com/api/ember/2.16/classes/Ember.Templates.helpers/methods/hash?anchor=hash).
you can yield the component using the [`component helper`](https://www.emberjs.com/api/ember/release/classes/Ember.Templates.helpers/methods/component?anchor=component) and [`hash helper`](https://www.emberjs.com/api/ember/release/classes/Ember.Templates.helpers/methods/hash?anchor=hash).
Here, the appropriate component is assigned to a hash using nested helpers and yielded to the template.
Notice `editStyle` being used as an argument to the component helper.

Expand Down
6 changes: 3 additions & 3 deletions source/configuring-ember/disabling-prototype-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ objects in the following ways:

* `String` is extended to add convenience methods, such as
`camelize()` and `w()`. You can find a list of these methods with the
[Ember.String documentation](https://www.emberjs.com/api/ember/2.16/classes/String).
[Ember.String documentation](https://www.emberjs.com/api/ember/release/classes/String).

* `Function` is extended with methods to annotate functions as
computed properties, via the `property()` method, and as observers,
Expand Down Expand Up @@ -90,7 +90,7 @@ islands.includes('Oahu');
### Strings

Strings will no longer have the convenience methods described in the
[`Ember.String` API reference](https://www.emberjs.com/api/ember/2.16/classes/String).
[`Ember.String` API reference](https://www.emberjs.com/api/ember/release/classes/String).
Instead,
you can use the similarly-named methods of the `Ember.String` object and
pass the string to use as the first parameter:
Expand Down Expand Up @@ -147,7 +147,7 @@ fullNameDidChange: observer('fullName', function() {
})
```

Evented functions are annotated using `Ember.on()`:
Evented functions are annotated using [`Ember.on()`](https://emberjs.com/api/ember/2.15/namespaces/Ember/methods/on?anchor=on):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, this seems to have gone the wrong way ... Mind fixing that? 😀

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one doesn't exist on release


```javascript
import { on } from '@ember/object/evented';
Expand Down
2 changes: 1 addition & 1 deletion source/configuring-ember/handling-deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Fortunately, Ember provides a way for projects to deal with deprecations in an o
## Filtering Deprecations

When your project has a lot of deprecations, you can start by filtering out deprecations that do not have to be addressed right away. You
can use the [deprecation handlers](http://emberjs.com/api/classes/Ember.Debug.html#method_registerDeprecationHandler) API to check for what
can use the [deprecation handlers](https://emberjs.com/api/ember/2.15/classes/Ember.Debug/methods/registerDeprecationHandler?anchor=registerDeprecationHandler) API to check for what
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should remain on 2.15

release a deprecated feature will be removed. An example handler is shown below that filters out all deprecations that are not going away
in release 2.0.0.

Expand Down
2 changes: 1 addition & 1 deletion source/models/creating-updating-and-deleting-records.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ this.get('store').findRecord('person', 1).then(function(tyrion) {

All of the Ember.js conveniences are available for
modifying attributes. For example, you can use `Ember.Object`'s
[`incrementProperty`](http://emberjs.com/api/classes/Ember.Object.html#method_incrementProperty) helper:
[`incrementProperty`](https://emberjs.com/api/ember/2.15/classes/Ember.Object/methods/incrementProperty?anchor=incrementProperty) helper:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should remain on 2.15


```js
person.incrementProperty('age'); // Happy birthday!
Expand Down
2 changes: 1 addition & 1 deletion source/models/customizing-adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default DS.JSONAPIAdapter.extend({
In some cases, your dynamic headers may require data from some
object outside of Ember's observer system (for example
`document.cookie`). You can use the
[volatile](https://www.emberjs.com/api/ember/2.16/classes/@ember%2Fobject%2Fcomputed/methods/property?anchor=volatile&show=inherited%2Cprotected%2Cprivate%2Cdeprecated)
[volatile](https://www.emberjs.com/api/ember/release/classes/@ember%2Fobject%2Fcomputed/methods/property?anchor=volatile)
function to set the property into a non-cached mode causing the headers to
be recomputed with every request.

Expand Down
2 changes: 1 addition & 1 deletion source/models/finding-records.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let blogPosts = this.get('store').peekAll('blog-post'); // => no network request

`store.findAll()` returns a `DS.PromiseArray` that fulfills to a `DS.RecordArray` and `store.peekAll` directly returns a `DS.RecordArray`.

It's important to note that `DS.RecordArray` is not a JavaScript array, it's an object that implements [`Ember.Enumerable`](http://emberjs.com/api/classes/Ember.Enumerable.html).
It's important to note that `DS.RecordArray` is not a JavaScript array, it's an object that implements [`Ember.Enumerable`](https://emberjs.com/api/ember/release/classes/Ember.Enumerable).
This is important because, for example, if you want to retrieve records by index,
the `[]` notation will not work--you'll have to use `objectAt(index)` instead.

Expand Down
4 changes: 2 additions & 2 deletions source/models/pushing-records-into-the-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ you want to update the UI immediately.

### Pushing Records

To push a record into the store, call the store's [`push()`](https://www.emberjs.com/api/ember-data/2.16/classes/DS.Store/methods/push?anchor=push) method.
To push a record into the store, call the store's [`push()`](https://www.emberjs.com/api/ember-data/release/classes/DS.Store/methods/push?anchor=push) method.

For example, imagine we want to preload some data into the store when
the application boots for the first time.
Expand Down Expand Up @@ -78,7 +78,7 @@ the casing of the properties defined on the Model class.

If you would like the data to be normalized by the model's default
serializer before pushing it into the store, you can use the
[`store.pushPayload()`](https://www.emberjs.com/api/ember-data/2.16/classes/DS.Store/methods/push?anchor=pushPayload) method.
[`store.pushPayload()`](https://www.emberjs.com/api/ember-data/release/classes/DS.Store/methods/push?anchor=pushPayload) method.

```app/serializers/album.js
import DS from 'ember-data';
Expand Down
2 changes: 1 addition & 1 deletion source/models/relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ include those related records in the response returned to the client.
The value of the parameter should be a comma-separated list of names of the
relationships required.

If you are using an adapter that supports JSON API, such as Ember's default [`JSONAPIAdapter`](https://www.emberjs.com/api/ember-data/2.16/classes/DS.JSONAPIAdapter),
If you are using an adapter that supports JSON API, such as Ember's default [`JSONAPIAdapter`](https://www.emberjs.com/api/ember-data/release/classes/DS.JSONAPIAdapter),
you can easily add the `include` parameter to the server requests created by
the `findRecord()`, `findAll()`,
`query()` and `queryRecord()` methods.
Expand Down
1 change: 1 addition & 0 deletions source/object-model/bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ bindings in Ember.js can be used with any object. That said, bindings are most
often used within the Ember framework itself, and for most problems Ember app
developers face, computed properties are the appropriate solution.


The easiest way to create a two-way binding is to use a [`computed.alias()`](https://www.emberjs.com/api/ember/release/classes/@ember%2Fobject%2Fcomputed/methods/alias?anchor=alias&show=inherited%2Cprotected%2Cprivate%2Cdeprecated),
that specifies the path to another object.

Expand Down
Loading