O'Reilly logo

Ember.js Web Development with Ember CLI by Suchit Puri

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Providing custom HTML to your components

We started rendering components with static HTML content, and then moved on to passing the data to our components. Now, what if we want to use our components as layouts, and provide them the HTML content that should be rendered within the component at a designated place?

Let's make it more clear with an example. We will continue with the previous example, in which we passed in the data for product description to our component. Till now, we have been showing the product MRP, price, and sale values, but now we want to add the product information. The problem with product information is that the information format might change, based on the type of product we are using. Our component should be flexible enough ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required