Skip to content

Commit

Permalink
Adapt Thymeleaf example in README.md to FragmentsRendering
Browse files Browse the repository at this point in the history
  • Loading branch information
xhaggi committed Nov 25, 2024
1 parent 2e08a6c commit 73d041e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,10 @@ public View users(Model model) {
model.addAttribute("users", userRepository.findAll());
model.addAttribute("count", userRepository.count());

var view = new HtmxView();
view.add("users :: list");
view.add("users :: count");

return view;
return FragmentsRendering
.with("users :: list")
.fragment("users :: count")
.build();
}
```

Expand Down

0 comments on commit 73d041e

Please sign in to comment.