Q&A
Ask and answer questions to make information more available to wider audiences.
Malik Segura @seguramalik   17, May 2023 12:00 AM
view in Ember.js
What are the ways of defining and inserting a view in Ember.js?
answers 2
 
Answer 1
Ryan Burden @ryanburden70   21, May 2023 06:19 PM
In this technique, you don't need to specify the name of the view object while inserting it into the template. But inside the object, another property called templateName should be initialized with the same value as the data template name attribute in the handlebar's script tag in your template.
 
Answer 2
James Bomengen @jamesbomengen   21, May 2023 06:14 PM
Extend the Em.View class, and create an object in your JavaScript to define a view. You can declare your functions and variables inside that.
Insert a view in your template. Now, follow the syntax given to write the handlebar script {{ #view App.ViewName}}