Questions tagged [emblem.js]

Ember-targeting, indentation-base templating language that compiles to Handlebars.js

Emblem.js is an indentation-based templating language that compiles to Handlebars. It is therefore

  • Efficiently/easily precompilable
  • Compilable in the browser
  • Fully compatible with Ember.js's auto-updating templates
  • Way more fun to write/maintain than {{mustached}}'d HTML

Useful links:

61 questions
2
votes
2 answers

How to interpolate a value from an object inside interation in Emblem.js?

I have the following code in an Emblem.js template: each segment in controller .panel.panel-default .panel-heading h4.panel-title a data-parent="#accordion" data-toggle="collapse" href="#collapse{{segment.id}}" span…
Luis D Urraca
  • 2,024
  • 4
  • 24
  • 46
2
votes
0 answers

Ember qunit test causing re-render error when an img's src is set to a computed property

I have a template that renders just fine in production and development, but during my qunit tests, it keeps crashing with the error: Something you did caused a view to re-render after it rendered but before it was inserted into the DOM The line…
nullnullnull
  • 8,039
  • 12
  • 55
  • 107
2
votes
2 answers

ember-cli: creating a helper that would render a view?

I'm trying to reproduce Ember-TodoMVC with ember-cli. I'm stuck with this part. I've created a view like this: app/views/action-edit.coffee ActionEditView = Ember.TextField.extend didInsertElement: -> @$().focus() `export default…
Andrey Mikhaylov - lolmaus
  • 23,107
  • 6
  • 84
  • 133
2
votes
1 answer

Handlebars {{each}} alters appearance of Bootstrap btn-group-vertical

I am rendering a Bootstrap 3 btn-group-vertical using EmberJS and the Emblem templating language (which supports Handlebars helpers). The following two ways of rendering the same btn-group-vertical produce different results (see image below). One…
2
votes
1 answer

Using ember linkTo from controller

I have a fairly complex text that I need to generate programmatically for display within an ember template. So far I have put this text construction into a controller. Unfortunately, the text also needs to contain hyperlinks to other pages within…
Thilo-Alexander Ginkel
  • 6,898
  • 10
  • 45
  • 58
2
votes
1 answer

Supplying multiple arguments in emblem.js helper invocation

Let's say, I would like to call an Ember Handlebars helper from an emblem.js template. I have declared the helper through (CoffeeScript syntax): Ember.Handlebars.registerHelper 't', (key, value, context) -> ... When attempting to invoke the…
Thilo-Alexander Ginkel
  • 6,898
  • 10
  • 45
  • 58
2
votes
2 answers

Error in compiling simple Emblem template

EDIT: Updated code and explanation Here's the application.html.erb:
{{outlet}}

© 2013

And then here's the countries.hbs file I'm…
nickcoxdotme
  • 6,567
  • 9
  • 46
  • 72
1
vote
2 answers

Data down binding for child components in Emblem.js

Environment, Ember w/ Emblem.js Working on a project, and I'm trying to make it modular to dynamically pull in the correct form layout (child component) depending on what choice the user makes. Problem I'm having is I have a child component with…
1
vote
1 answer

How to make a button disabled by condition in emblem.js?

I am trying to use Emblem.js to make a button disabled by condition. I have tried this and it worked: if session.isAuthenticated button.ui.large.button.primary click='logout' Logout else button.ui.large.button.primary disabled='true'…
Ali Ghanavatian
  • 506
  • 1
  • 6
  • 14
1
vote
1 answer

didInsertElement for only single element EmberJs

I want to call didInsertElement on just one element but not on others, I have a component template with multiple elements, but I just want to use it on specific element. Any Idea how to do this? Is it possible, if yes, good practice or not..and…
Shahroon
  • 307
  • 2
  • 15
1
vote
1 answer

Can't make Emblem.js work with Rails

I'm trying to use Emblem.js to render Ember templates in a Rails app. Here is a part of my Gemfile: gem 'ember-rails' gem 'ember-source', '~> 1.9.0' gem 'emblem-rails' gem 'emblem-source', github: 'machty/emblem.js' This is according to the…
Hassen
  • 6,966
  • 13
  • 45
  • 65
1
vote
1 answer

Error in inclusion of Ember View, says its not a class of View

I am trying to display a view using ember, emblem, and ember-cli. Seems like this is a no brainer and while I'm new to Ember I cannot seem to get this working: DEBUG: ------------------------------- DEBUG: Ember : 1.8.1 DEBUG: Ember Data :…
Robbie Guilfoyle
  • 3,363
  • 1
  • 18
  • 18
1
vote
1 answer

Generate methods at runtime in emberJS

Im trying to generate few methods at runtime in ember and code I'm trying is App.TestController = Ember.ArrayController.extend App.AnotherMixin, unsubmitted: Em.computed.filterBy("model", "unsubmitted", true) submitted:…
Adnan Ali
  • 2,890
  • 5
  • 29
  • 50
1
vote
1 answer

Bold a part of string in emblem

I am new to emblem and right now I am trying to bold a portion of a string in emblem but adding tag simply show them as string. I want to bold text "Apple Safari" here and my code is: .class-name: .class-name2 A recent version of Apple…
Adnan Ali
  • 2,890
  • 5
  • 29
  • 50
1
vote
1 answer

Is EmblemJS the thing I should be using in a new EmberJS app?

I am building an Ember app with a Rails 4 JSON back-end. I am using the 'ember-rails' gem which embedded the Ember dir structure into the Rails app--which I like. It also included EmblemJS which I saw in action in this tutorial:…
n8gard
  • 1,870
  • 8
  • 26
  • 41