-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
recognise dependencies in class directives - fixes #1793
- Loading branch information
1 parent
1deb25e
commit 3258779
Showing
4 changed files
with
34 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export default { | ||
data: { | ||
things: ['one', 'two', 'three'], | ||
selected: 'two' | ||
}, | ||
|
||
html: ` | ||
<div></div> | ||
<div class="selected"></div> | ||
<div></div> | ||
`, | ||
|
||
test(assert, component, target) { | ||
component.set({ selected: 'three' }); | ||
assert.htmlEqual(target.innerHTML, ` | ||
<div></div> | ||
<div class=""></div> | ||
<div class="selected"></div> | ||
`); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{#each things as thing} | ||
<div class:selected="selected === thing"></div> | ||
{/each} |