Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8974289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:38:56+00:00 2026-06-15T18:38:56+00:00

There is a strange issue am facing with ember.js, i.e when I add data-template-name

  • 0

There is a strange issue am facing with ember.js, i.e when I add “data-template-name” attribute to the script tag, nothing is working. If data-template-name name is removed, things are working fine.

  This is NOT WORKING 
   <script data-template-name="my-template"  type="text/x-handlebars">
    Input: 
    {{#view App.MyView}}
    {{view Ember.TextField 
           valueBinding="view.theValue"        
           placeholder="input ..." }}
    {{/view}}
</script>




  Now if **data-template-name="my-template"** is removed it works fine. 
I mean, In UI  TextField is visible.

  <script   type="text/x-handlebars">
    Input: 
    {{#view App.MyView}}
    {{view Ember.TextField 
           valueBinding="view.theValue"        
           placeholder="input ..." }}
    {{/view}}
</script>




App.MyView = Ember.View.extend({
templateName: 'my-template',
theValue: null,
init: function(){
    this._super();
    this.set('theValue','asdf');
},
keyDown: function(e){
   if(e.keyCode === 13){
        alert(this.get('theValue'));
   }
}

});

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:38:57+00:00Added an answer on June 15, 2026 at 6:38 pm

    Ok, don’t worry about the jsfiddle, it’s a good start :). There is a link on the ember.js site, where you can find a starting point, including Ember.js related sources: http://emberjs.com/community/

    That beeing said, when creating an Ember.js application like this, there is an implicit default anonymous template, in wich you can then define yours.

     <!-- default template, introducing the view App.MyView -->
     <script type="text/x-handlebars">
      {{view App.MyView}}
     </script>
    
    <!-- template of App.View -->
    <script data-template-name="my-template"  type="text/x-handlebars">
      Input: 
      {{view Ember.TextField 
             valueBinding="view.theValue"        
             placeholder="input ..."}}
    </script>​
    

    javacript:

    App.MyView = Ember.View.extend({
      templateName: 'my-template',
      theValue: null,
      init: function(){
        this._super();
        this.set('theValue','asdf');
      }
    });​
    

    Here is a working example of your sample:

    http://jsfiddle.net/6p6XJ/171/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a C# application and facing a strange issue here. I
There's a strange requirement where I need to get server side data on page
I am facing a strange issue after the popup is created onclick . The
I have a strange issue in my GWT app. My application is working fine
Im facing a strange issue trying to move from sql server to oracle. in
I've websphere application server 7 network deployment, and am facing a very strange issue,
I have a strange issue: there is a SectionPart with composite, which is create
I'm having a strange issue with some @font-face text where there is some strange
I've stumbled upon a rather strange issue today with Spring 3.0: There's an abstract
I have a strange issue with array manipulation within a bash script on Solaris.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.