Error when specifying tag attributes in NHaml

Posted by jessegavin on Stack Overflow See other posts from Stack Overflow or by jessegavin
Published on 2010-03-18T00:00:19Z Indexed on 2010/03/18 0:01 UTC
Read the original article Hit count: 444

Filed under:
|
|

I am just getting started with NHaml and ran into a snag.

This is my application.haml file:

%html
  %head
    %title = Get Some Data
    %link{ href="/media/css/styles.css", rel="Stylesheet", type="text/css" }
  %body
    %div.page
      %h1 = Get Some Data
      _

When I try to view in a browser it throw the following error:

NHaml.Exceptions.SyntaxException: The attribute ',' is occurs twice.

If I remove the line beginning with %link it works fine. What am I doing wrong?

I am following the step-by-step from Brian Hartsock:
http://blog.brianhartsock.com/2009/01/15/using-nhaml-from-source/#nhaml_reference

© Stack Overflow or respective owner

Related posts about nhaml

Related posts about asp.net-mvc