<commit_before><div class="content">
  <p>
    If you would like to open and close a modal programmatically, you need to use
    ember-remodal as a service. The <code>remodal</code> service works with both
    inline and block form.
  </p>

  <p>
    By setting <code>forService</code> to <code>true</code>, the modal is
    registered with the <code>remodal</code> service. Keep in mind that in order
    for the <code>remodal</code> service to use a modal, that modal must
    currently be rendered.
  </p>

  <p>
    Though you can put a modal in any template, a common pattern would be to
    place an instance of <code>ember-remodal</code> in your application
    template. This pattern is useful in situations such as when you have a modal
    with a specific purpose that pops open and closed throughout your
    application, such as a "loading" modal.
  </p>

  <p>
    Remember to <code>inject</code> the service anywhere
    you want to use it.
  </p>

  <div class="content">
{{#code-block language='handlebars'}}
  \{{ember-remodal forService=true}}

  &lt;button \{{action 'openModal'}}&gt;Open!&lt;/button&gt;
{{/code-block}}

{{#code-block language='javascript'}}
  export default Ember.Whatever.extend({
    remodal: Ember.inject.service(),

    closeModal() {
      this.get('remodal').close();
    },

    actions: {
      openModal() {
        this.get('remodal').open();
      }
    }
  });
{{/code-block}}
  </div>
</div>
<commit_msg>Added a note to the "as a service" page<commit_after><div class="content">
  <p>
    If you would like to open and close a modal programmatically, you need to use
    ember-remodal as a service. The <code>remodal</code> service works with both
    inline and block form.
  </p>

  <p>
    By setting <code>forService</code> to <code>true</code>, the modal is
    registered with the <code>remodal</code> service. Keep in mind that in order
    for the <code>remodal</code> service to use a modal, that modal must
    currently be rendered.
  </p>

  <p>
    Though you can put a modal in any template, a common pattern would be to
    place an instance of <code>ember-remodal</code> in your application
    template. This pattern is useful in situations such as when you have a modal
    with a specific purpose that pops open and closed throughout your
    application, such as a "loading" modal.
  </p>

  <p>
    Remember to <code>inject</code> the service anywhere
    you want to use it.
  </p>

  <div class="content">
    <p>
      <em>Note</em>: If you would like for multiple modals to exist at at the
      same time, check out {{link-to 'Named Modals' 'service.names'}}.
    </p>
  </div>

  <div class="content">
{{#code-block language='handlebars'}}
  \{{ember-remodal forService=true}}

  &lt;button \{{action 'openModal'}}&gt;Open!&lt;/button&gt;
{{/code-block}}

{{#code-block language='javascript'}}
  export default Ember.Whatever.extend({
    remodal: Ember.inject.service(),

    closeModal() {
      this.get('remodal').close();
    },

    actions: {
      openModal() {
        this.get('remodal').open();
      }
    }
  });
{{/code-block}}
  </div>
</div>

{'fraction_non_alphanumeric': 0.12978316326530612, 'fraction_numerical': 0.0, 'mean_word_length': 3.1276315789473683, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2392362', 'n_tokens_mistral': 990, 'n_tokens_neox': 963, 'n_words': 358}