Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update & fix api doc urls #952

Merged
merged 28 commits into from Jul 25, 2019
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
44fba3c
Rewrite api urls to use new subdomain url
sivakumar-kailasam Jul 25, 2019
ecb7730
Rewrite legacy urls to use new subdomain
sivakumar-kailasam Jul 25, 2019
da1cd71
Replace legacy api urls with new subdomain urls
sivakumar-kailasam Jul 25, 2019
2d790dd
Rewrite http api urls to https
sivakumar-kailasam Jul 25, 2019
69dcd5b
Pin api urls in 3.10 docs to 3.10 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
1b74b62
Pin api urls in 3.9 docs to 3.9 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
296f29f
Pin api urls in 3.8 docs to 3.8 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
5665e6a
Pin api urls in 3.8 docs to 3.8 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
995347c
Pin api urls in 3.7 docs to 3.7 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
8c2a2c4
Pin api urls in 3.7 docs to 3.7 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
0e262c5
Pin api urls in 3.6 docs to 3.6 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
2dc70e6
Pin api urls in 3.6 docs to 3.6 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
6717d5f
Pin api urls in 3.5 docs to 3.5 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
39434d4
Pin api urls in 3.5 docs to 3.5 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
7bcdcfb
Pin api urls in 3.4 docs to 3.4 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
6c01929
Pin api urls in 3.4 docs to 3.4 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
a695423
Pin api urls in 3.3 docs to 3.3 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
6ee276c
Pin api urls in 3.3 docs to 3.3 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
c1dd9cb
Pin api urls in 3.2 docs to 3.2 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
a14c32c
Pin api urls in 3.2 docs to 3.2 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
318b01c
Pin api urls in 3.1 docs to 3.1 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
a600049
Pin api urls in 3.1 docs to 3.1 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
e1359db
Pin api urls in 3.0 docs to 3.0 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
417b815
Pin api urls in 3.0 docs to 3.0 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
de13268
Pin api urls in 2.18 docs to 2.18 api docs instead of release docs
sivakumar-kailasam Jul 25, 2019
646badc
Pin api urls in release docs to 3.11 ember api docs & 3.10 ember-data…
sivakumar-kailasam Jul 25, 2019
6afb467
Rewrite 2.16 api urls in the 2.18 docs to 2.18 api urls
sivakumar-kailasam Jul 25, 2019
3705ac4
ignore remark link rule for code block indentation
jenweber Jul 25, 2019
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Pin api urls in release docs to 3.11 ember api docs & 3.10 ember-data…

… api docs instead of release docs

we're pinning ember-data to 3.10's docs since package restructuring isn't properly represented on the api app
  • Loading branch information...
sivakumar-kailasam committed Jul 25, 2019
commit 646badc4e25f9966aa22642f7be407c9ab83b476
@@ -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://api.emberjs.com/ember/release/classes/Application) serves as a "registry" for dependency declarations.
An [`Application`](https://api.emberjs.com/ember/3.11/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://api.emberjs.com/ember/release/classes/ApplicationInstance) serves as the "owner" for objects that are instantiated from registered factories.
An [`ApplicationInstance`](https://api.emberjs.com/ember/3.11/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,
@@ -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://api.emberjs.com/ember/release/classes/ApplicationInstance/methods/lookup?anchor=lookup) method on an application instance. This method takes a string
[`lookup`](https://api.emberjs.com/ember/3.11/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
@@ -225,9 +225,9 @@ export default {

### Getting an Application Instance from a Factory Instance

[`Ember.getOwner`](https://api.emberjs.com/ember/release/classes/@ember%2Fapplication/methods/getOwner?anchor=getOwner) will retrieve the application instance that "owns" an
[`Ember.getOwner`](https://api.emberjs.com/ember/3.11/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://api.emberjs.com/ember/release/classes/@ember%2Fapplication/methods/getOwner?anchor=getOwner) to perform lookups through their application
can use [`Ember.getOwner`](https://api.emberjs.com/ember/3.11/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
@@ -1,6 +1,6 @@
## What are Engines?

[Ember Engines](http://ember-engines.com/) allow multiple logical applications to be composed together into a single application from the user's perspective, that provide functionality to their host applications. Engines are isolated, `composable applications`, they have almost all the same features as normal Ember applications, except an [Engine](https://api.emberjs.com/ember/release/classes/Engine) requires a host application to boot it and provide a Router instance.
[Ember Engines](http://ember-engines.com/) allow multiple logical applications to be composed together into a single application from the user's perspective, that provide functionality to their host applications. Engines are isolated, `composable applications`, they have almost all the same features as normal Ember applications, except an [Engine](https://api.emberjs.com/ember/3.11/classes/Engine) requires a host application to boot it and provide a Router instance.

## Why use Engines?

@@ -1,8 +1,8 @@
Every Ember application is represented by a class that extends [`Application`](https://api.emberjs.com/ember/release/classes/Application).
Every Ember application is represented by a class that extends [`Application`](https://api.emberjs.com/ember/3.11/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://api.emberjs.com/ember/release/classes/ApplicationInstance) that is used to manage its stateful aspects.
it creates an [`ApplicationInstance`](https://api.emberjs.com/ember/3.11/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*
@@ -198,9 +198,9 @@ $('a').click(() => {
});
```

The run loop API calls that _schedule_ work, i.e. [`run.schedule`](https://api.emberjs.com/ember/release/classes/@ember%2Frunloop/methods/schedule?anchor=schedule),
[`run.scheduleOnce`](https://api.emberjs.com/ember/release/classes/@ember%2Frunloop/methods/scheduleOnce?anchor=scheduleOnce),
[`run.once`](https://api.emberjs.com/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.
The run loop API calls that _schedule_ work, i.e. [`run.schedule`](https://api.emberjs.com/ember/3.11/classes/@ember%2Frunloop/methods/schedule?anchor=schedule),
[`run.scheduleOnce`](https://api.emberjs.com/ember/3.11/classes/@ember%2Frunloop/methods/scheduleOnce?anchor=scheduleOnce),
[`run.once`](https://api.emberjs.com/ember/3.11/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:
@@ -241,5 +241,5 @@ $('a').click(() => {

## Where can I find more information?

Check out the [Ember.run](https://api.emberjs.com/ember/release/classes/@ember%2Frunloop) API documentation,
Check out the [Ember.run](https://api.emberjs.com/ember/3.11/classes/@ember%2Frunloop) API documentation,
as well as the [Backburner library](https://github.com/ebryn/backburner.js/) that powers the run loop.
@@ -1,4 +1,4 @@
A [`Service`](https://api.emberjs.com/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.
A [`Service`](https://api.emberjs.com/ember/3.11/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:
@@ -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://api.emberjs.com/ember/release/modules/@ember%2Fservice) base class:
Services must extend the [`Service`](https://api.emberjs.com/ember/3.11/modules/@ember%2Fservice) base class:

```javascript {data-filename=app/services/shopping-cart.js}
import Service from '@ember/service';
@@ -93,7 +93,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://api.emberjs.com/ember/release/classes/@ember%2Fapplication/methods/getOwner?anchor=getOwner) instead.
you must look up the service using Ember's [`getOwner`](https://api.emberjs.com/ember/3.11/classes/@ember%2Fapplication/methods/getOwner?anchor=getOwner) instead.

```javascript {data-filename=app/components/cart-contents.js}
import Component from '@ember/component';
@@ -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://api.emberjs.com/ember/release/classes/Application/properties/customEvents?anchor=customEvents).
registered by using [Application.customEvents](https://api.emberjs.com/ember/3.11/classes/Application/properties/customEvents?anchor=customEvents).

Touch events:

@@ -66,7 +66,7 @@ those cases, you do not need to write any JavaScript at all. Handlebars
allows you to define templates and reuse them as components.

If you need to customize the behavior of the component you'll
need to define a subclass of [`Component`](https://api.emberjs.com/ember/release/classes/Component). For example, you would
need to define a subclass of [`Component`](https://api.emberjs.com/ember/3.11/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.
@@ -79,7 +79,7 @@ file at `app/components/blog-post.js`. If your component was called

## Dynamically rendering a component

The [`{{component}}`](https://api.emberjs.com/ember/release/classes/Ember.Templates.helpers/methods/component?anchor=component) helper can be used to defer the selection of a component to
The [`{{component}}`](https://api.emberjs.com/ember/3.11/classes/Ember.Templates.helpers/methods/component?anchor=component) helper can be used to defer the selection of a component to
run time. The `<MyComponent />` 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
@@ -89,7 +89,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 `<BlogPost />`.

The real value of [`{{component}}`](https://api.emberjs.com/ember/release/classes/Ember.Templates.helpers/methods/component?anchor=component) comes from being able to dynamically pick
The real value of [`{{component}}`](https://api.emberjs.com/ember/3.11/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:

@@ -83,7 +83,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://api.emberjs.com/ember/release/classes/Component/properties/positionalParams?anchor=positionalParams) attribute in your component class.
set the [`positionalParams`](https://api.emberjs.com/ember/3.11/classes/Component/properties/positionalParams?anchor=positionalParams) attribute in your component class.

```javascript {data-filename=app/components/blog-post.js}
import Component from '@ember/component';
@@ -123,15 +123,15 @@ Suppose you want to integrate your favorite date picker library into an Ember pr
Typically, 3rd party JS/jQuery libraries require a DOM element to bind to.
So, where is the best place to initialize and attach the library?

After a component successfully renders its backing HTML element into the DOM, it will trigger its [`didInsertElement()`](https://api.emberjs.com/ember/release/classes/Component/events/didInsertElement?anchor=didInsertElement) hook.
After a component successfully renders its backing HTML element into the DOM, it will trigger its [`didInsertElement()`](https://api.emberjs.com/ember/3.11/classes/Component/events/didInsertElement?anchor=didInsertElement) hook.

Ember guarantees that, by the time `didInsertElement()` is called:

1. The component's element has been both created and inserted into the
DOM.
2. The component's element is accessible via the component's [`this.element`](https://api.emberjs.com/ember/release/classes/Component/properties/element?anchor=element) property.
2. The component's element is accessible via the component's [`this.element`](https://api.emberjs.com/ember/3.11/classes/Component/properties/element?anchor=element) property.

The [`element`](https://api.emberjs.com/ember/release/classes/Component/properties/element?anchor=element) property allows you to access the component's DOM element.
The [`element`](https://api.emberjs.com/ember/3.11/classes/Component/properties/element?anchor=element) property allows you to access the component's DOM element.
For example, you can set an attribute using the `Element.setAttribute()` method:

```javascript {data-filename=app/components/profile-editor.js}
@@ -145,7 +145,7 @@ export default Component.extend({
});
```

The [`element`](https://api.emberjs.com/ember/release/classes/Component/properties/element?anchor=element) property will, by default, return a DOM object for the component's root element, but you can also target child elements within the component's template by passing a selector to `querySelector` or `querySelectorAll`:
The [`element`](https://api.emberjs.com/ember/3.11/classes/Component/properties/element?anchor=element) property will, by default, return a DOM object for the component's root element, but you can also target child elements within the component's template by passing a selector to `querySelector` or `querySelectorAll`:

```javascript {data-filename=app/components/profile-editor.js}
import Component from '@ember/component';
@@ -161,7 +161,7 @@ export default Component.extend({
});
```

Let's initialize our date picker by overriding the [`didInsertElement()`](https://api.emberjs.com/ember/release/classes/Component/events/didInsertElement?anchor=didInsertElement) method.
Let's initialize our date picker by overriding the [`didInsertElement()`](https://api.emberjs.com/ember/3.11/classes/Component/events/didInsertElement?anchor=didInsertElement) method.

Date picker libraries usually attach to an `<input>` element, so we will use `this.element.querySelector` to find an appropriate input within our component's template.

@@ -176,7 +176,7 @@ export default Component.extend({
});
```

[`didInsertElement()`](https://api.emberjs.com/ember/release/classes/Component/events/didInsertElement?anchor=didInsertElement) is also a good place to
[`didInsertElement()`](https://api.emberjs.com/ember/3.11/classes/Component/events/didInsertElement?anchor=didInsertElement) is also a good place to
attach event listeners. This is particularly useful for custom events or
other browser events which do not have a [built-in event
handler](./handling-events/#toc_event-names).
@@ -201,8 +201,8 @@ There are a few things to note about the `didInsertElement()` hook:

- It is only triggered once when the component element is first rendered.
- In cases where you have components nested inside other components, the child component will always receive the `didInsertElement()` call before its parent does.
- Setting properties on the component in [`didInsertElement()`](https://api.emberjs.com/ember/release/classes/Component/events/didInsertElement?anchor=didInsertElement) triggers a re-render, and for performance reasons, is not allowed.
- While [`didInsertElement()`](https://api.emberjs.com/ember/release/classes/Component/events/didInsertElement?anchor=didInsertElement) is technically an event that can be listened for using `on()`, it is encouraged to override the default method itself,
- Setting properties on the component in [`didInsertElement()`](https://api.emberjs.com/ember/3.11/classes/Component/events/didInsertElement?anchor=didInsertElement) triggers a re-render, and for performance reasons, is not allowed.
- While [`didInsertElement()`](https://api.emberjs.com/ember/3.11/classes/Component/events/didInsertElement?anchor=didInsertElement) 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.

### Making Updates to the Rendered DOM with `didRender`
@@ -257,7 +257,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://api.emberjs.com/ember/release/classes/Component/events/willDestroyElement?anchor=willDestroyElement) method, allowing for any teardown logic to be performed.
When a component detects that it is time to remove itself from the DOM, Ember will trigger the [`willDestroyElement()`](https://api.emberjs.com/ember/3.11/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.
For instance, the user may navigate to a different route, or a conditional Handlebars block surrounding your component may change:
@@ -62,7 +62,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://api.emberjs.com/ember/release/classes/Ember.Templates.helpers/methods/component?anchor=component) and [`hash helper`](https://api.emberjs.com/ember/release/classes/Ember.Templates.helpers/methods/hash?anchor=hash).
you can yield the component using the [`component helper`](https://api.emberjs.com/ember/3.11/classes/Ember.Templates.helpers/methods/component?anchor=component) and [`hash helper`](https://api.emberjs.com/ember/3.11/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.

@@ -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://api.emberjs.com/ember/release/classes/String).
[Ember.String documentation](https://api.emberjs.com/ember/3.11/classes/String).

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

Strings will no longer have the convenience methods described in the
[`Ember.String` API reference](https://api.emberjs.com/ember/release/classes/String).
[`Ember.String` API reference](https://api.emberjs.com/ember/3.11/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:
@@ -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](https://api.emberjs.com/ember/release/functions/@ember%2Fdebug/registerDeprecationHandler) API to check for what release a deprecated feature will be removed.
You can use the [deprecation handlers](https://api.emberjs.com/ember/3.11/functions/@ember%2Fdebug/registerDeprecationHandler) API to check for what 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.

```javascript {data-filename= app/initializers/main.js}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.