mardi 22 août 2017

Ember.JS change handlebars operators

is it possible to change the way the handlebars mustache binding is working within Ember? My case is that I want to use Ember within metalsmith.IO static site builder which is already using handlebars, so when the template is being built binding is being interpreted by handlebars instead of ember.

My template:

<!DOCTYPE html>
<html xmlns="http://ift.tt/lH0Osb" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ift.tt/zbanWc" dir="ltr"
  lang="en-US">

<head>
  
  <title></title>
  <meta name="description" content="">
  <!-- Typekit Javascript -->
</head>

<body class="stretched no-transition">
  <!-- Document Wrapper
    ============================================= -->
  <div id="wrapper" class="clearfix">
    <div id="header-trigger"><i class="icon-line-menu"></i><i class="icon-line-cross"></i></div>
    <!-- Header
        ============================================= -->
    <header id="header" class="transperent-header full-header no-sticky">
      <div id="header-wrap">
        <div class="container-fluid clearfix">
          <div id="primary-menu-trigger"><i class="icon-reorder"></i></div>
          <!-- Logo
                    ============================================= -->
          
          <!-- #logo end -->
          <!-- Primary Navigation
                    ============================================= -->
          
          <!-- #primary-menu end -->
        </div>
      </div>
    </header>
    
    <!-- Slider  start -->
    
    <!-- Slider end -->
    
    <!-- No Slider -->
    <!-- No Slider end -->
    <!-- Content
        ============================================= -->
      <h2>Welcome to Ember.js</h2>

      

      <ul>
        
        <li></li>
        
      </ul>

    <section id="content">
      <div class="content-wrap notoppadding nobottompadding">
        
        <div class="container notopmargin bottommargin clearfix">
          <p align="right"><small>&mdash; }</small></p>
        </div>
        <!-- To be Done: implemet metalsmith tags module -->
        
        <div class="container bottommargin clearfix">
          <p><small>}</small></p>
        </div> 
      </div>
      <div class="content-wrap notoppadding nobottompadding">
        <!-- No Background Image -->
        
        <div class="container bottommargin clearfix">
          <blockquote>}</blockquote>
        </div>
            
        <div class="container bottommargin clearfix">
          }</div>   
        <!-- Footnotes -->
        <!-- To be Done: "back to top" links in footnotes or switch to a custom module -->
        <div class="container bottommargin clearfix">
          <h2 class="visually-hidden" id="footnote-label">Footnotes</h2>
          <ol class="post-footnotes">}</ol>
        </div>
        
        <!-- Footnotes End -->
      </div>
    </section>  </div>
  <!-- #wrapper end -->
  
</body>

</html>

My Ember part that I have problem with is :
  <h2>Welcome to Ember.js</h2>

  

  <ul>
    
    <li></li>
    
  </ul>

Unfortunatel only the H is being rendered, nothing from is as handlebars is trying to interpret it before Ember has a chance.




Aucun commentaire:

Enregistrer un commentaire