Search code examples
ruby-on-railsangularjsslim-lang

slim with angular - Conflict using {{double curly braces}}


When you use {{}}, slim looks at the first { and thinks it's an attribute.

How can you disable { as a key character from slim. so that using {{ }} will be interpreted as angular, not a slim attribute?

(P.S. I'm using slim-rails gem, so the solution may be specific to rails, but who knows?)


Solution

  • Here is what I do without changing settings:

    p
      | {{ user.name }}
      = a_method_call
    

    or

    p ng-bind="user.name" = a_method_call