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
8
votes
1 answer

Multiline statements in Emblem.js

I'm developing Ember.js application using Emblem.js as template precompiler. I have an ember component with a lot of bindings = delivery-map deliveryZones=deliveryZones selectedZone=selectedZone drawingZone=drawingZone…
Tikhon Belousko
  • 767
  • 1
  • 9
  • 26
5
votes
3 answers

Ember Cli not compiling with broccoli-emblem-compiler

I am trying to set up this repository locally https://github.com/lrdiv/ember-soundcloud and i have come across to this issue with broccoli-emblem-compiler. See the image in attached From my understanding the broccoli-emblem-compiler is not able to…
Koala7
  • 1,340
  • 7
  • 41
  • 83
5
votes
1 answer

Why is that using itemController renders a collection of empty items?

I'm currently learning Ember while following the todomvc tutorial with ember-cli: http://thetechcofounder.com/getting-started-with-ember-js-using-ember-cli/ I'm in the section where in order to edit a todo, it's needed to add the editTodo action in…
bbonamin
  • 30,042
  • 7
  • 40
  • 49
5
votes
1 answer

Compiling Emblem.js Without Ember

I'm trying emblem.js right now. It's a really good wrapper of Handlebars to write templates. However, the docs are a bit ember.js and handlebars.js dependent. I want to use Emblem.js without Ember, but there is no real explanation on how to compile…
Henson
  • 5,563
  • 12
  • 46
  • 60
4
votes
0 answers

Karma, webpack, emblem-loader compiled is not defined

We use coffee-script and emblem for templates in project. Webpack is used for bundling and Karma to run tests. I've tried to use emblem-loader for emblem processing with webpack. Here is the repository I created with simple example how to reproduce…
4
votes
1 answer

ember: How can I set bind-attr for a link-to?

I want to set the style of a link-to helper but don't quite understand how. I have the following model: App.ArtistFavorite = DS.Model.extend name: DS.attr 'string' image_url: DS.attr 'string' My template: li link-to 'artistFavorite' this…
Mexxer
  • 1,699
  • 5
  • 27
  • 40
3
votes
1 answer

Call a function in emblem conditional statement

How can we call a function with parameters in emblem's conditional statement. Like I have a function: priorExist: (prior) -> @get("priors").findBy("condition", prior) But I get an error when I call it in emblem like this if…
Adnan Ali
  • 2,890
  • 5
  • 29
  • 50
3
votes
1 answer

Index in Each Helper in Emblem

I see that you can get the index within an each helper in handlebars with {{#each array}} {{@index}}: {{this}} {{/each}} which I found in How to get index in Handlebars each helper? This doesn't seem to work in Emblem though: ul each…
AlexQueue
  • 6,353
  • 5
  • 35
  • 44
3
votes
2 answers

Sending an action to a view in Ember.js

I have a view which contains a close button: .flash-message div class="close-button" click="view.removeFlash" = view view.content.thisView The view itself reads: Whistlr.AlertView = Ember.View.extend templateName: "_alert" removeFlash: -> …
nullnullnull
  • 8,039
  • 12
  • 55
  • 107
3
votes
4 answers

Inserting a translation into a placeholder with Emblem.js

I'm trying to write a login form with ember.js/emblem.js. Everything works, unless I try I18ning the placeholders like so: Em.TextField valueBinding="view.username" placeholder="#{t 'users.attributes.username}" Em.TextField…
nullnullnull
  • 8,039
  • 12
  • 55
  • 107
3
votes
3 answers

How to bind input value in emblem.js

I have a filter attribute in my controller which I want to bind to the corresponding DOM element. So far, I am able to display filter value, doing: %input type="text" value=filter But what I want is to reflect input changes back to filter, with a…
Mike Aski
  • 9,180
  • 4
  • 46
  • 63
2
votes
0 answers

Multiline statement with (hash) helper

Since Ember launched component block params and contextual components you can pass multiple components back to the context for more control. In handlebars you can write this inside your component template: {{yield (hash header=(component…
Danny Hiemstra
  • 1,188
  • 1
  • 9
  • 13
2
votes
1 answer

Template not coming up when I run my Ember Server

I have created a very simple application template on a newly created Ember app that just has a title of "Casteva" and h1 of "Welcome to Casteva. It is in my application.emblem file within templates and looks like this: #title Casteva h1 Welcome to…
user2031111
2
votes
1 answer

Concatenation string with variable in emblem.js

I need in Emblem.js to transmit to i18n helper concatenated string constant with variable value, How can i do it? each item in model.items div t "dict.{{item}}" returns error Missing translation for key "dict.{{item}}"
AHOYAHOY
  • 1,856
  • 4
  • 24
  • 34
2
votes
1 answer

How do i replace 'view Ember.TextField' with 'input' in an emblem template?

I recently updated to Ember 1.8.0 and using view Ember.TextField valueBinding="name" throws a deprecation error. Per the deprecation guide it should be replaced with the input helper, but the following doesn't work input valueBinding="name"
andorov
  • 4,197
  • 3
  • 39
  • 52
1
2 3 4 5