Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(layout): restrict directives to attributes only
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBurleson committed Sep 5, 2015
1 parent 8b210c3 commit e8b60de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/services/layout/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
function attributeWithObserve(className, addDirectiveAsClass) {
return function() {
return {
restrict : 'A',
compile: function(element, attr) {
attributeValueToClass(null, element, attr);

Expand Down Expand Up @@ -201,6 +202,7 @@
function attributeWithoutValue(className) {
return function() {
return {
restrict : 'A',
compile: function(element, attr) {
attributeToClass(null, element);

Expand Down

1 comment on commit e8b60de

@ThomasBurleson
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that HTML like the following works as expected:

  <h3>
    Current Layout: 
    <span class="desktop">layout="row"</span> 
    <span class="mobile">layout-sm="column"</span>
  </h3>

  <md-content>
    <div id="content" layout="row" layout-sm="column"></div>
  </md-content>

Please sign in to comment.