Socket
Book a DemoInstallSign in
Socket

ember-query-selector-helper

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-query-selector-helper

A companion to `{{in-element}}` helper

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

{{query-selector}} helper

Returns the first element within the document that matches the specified selector. It's a great companion to Ember's {{in-element}} helper.

Installation

ember install ember-query-selector-helper

Usage

<div id="modal-portal"></div>

{{#in-element (query-selector "#modal-portal")}}
  <Modal />
{{/in-element}}
{{#let (query-selector "#modal-portal" optional=true) as |portal|}}
  {{#if portal}}
    {{#in-element portal}}
      <Modal />
    {{/in-element}}
  {{else}}
    <Modal />
  {{/if}}
{{/let}}

Compatibility

  • Ember.js v3.12 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Keywords

ember-addon

FAQs

Package last updated on 20 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts