Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Default Class Name (template attribute)

$
0
0

@robaguilera wrote:

Does Ember have a way to define a default attribute if one isn't defined?

Let's say I have a component:

{{#myComponent
   componentClass="foo"

The template will have a spot for the class name of foo to be added:

<div class={{componentClass}}>

Is there any way to define a default class if one isn't provided? So <div class={{componentClass or my-default-class}}>

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles