ContainerDebugAdapter

Ember.ContainerDebugAdapter Class

PUBLIC

Extends: Ember.Object

Defined in: packages/ember-extension-support/lib/container_debug_adapter.js:15

Module: ember-extension-support

The ContainerDebugAdapter helps the container and resolver interface with tools that debug Ember such as the Ember Inspector for Chrome and Firefox.

This class can be extended by a custom resolver implementer to override some of the methods with library-specific code.

The methods likely to be overridden are:

  • canCatalogEntriesByType
  • catalogEntriesByType

The adapter will need to be registered in the application's container as container-debug-adapter:main.

Example:

Application.initializer({
  name: "containerDebugAdapter",

  initialize(application) {
    application.register('container-debug-adapter:main', require('app/container-debug-adapter'));
  }
});

canCatalogEntriesByType (type) Booleanpublic

Defined in packages/ember-extension-support/lib/container_debug_adapter.js:62

Returns true if it is possible to catalog a list of available classes in the resolver for a given type.

Parameters:

type String
The type. e.g. "model", "controller", "route".

Returns:

Boolean
whether a list is available for this type.

catalogEntriesByType (type) Arraypublic

Defined in packages/ember-extension-support/lib/container_debug_adapter.js:79

Returns the available classes a given type.

Parameters:

type String
The type. e.g. "model", "controller", "route".

Returns:

Array
An array of strings.

resolverpublic

Defined in packages/ember-extension-support/lib/container_debug_adapter.js:51

The resolver instance of the application being debugged. This property will be injected on creation.

Default: null

© 2017 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://emberjs.com/api/classes/Ember.ContainerDebugAdapter.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部