Skip to content

Instantly share code, notes, and snippets.

@robwormald
Created April 8, 2023 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robwormald/21579189e307c498919ef7a87c591d59 to your computer and use it in GitHub Desktop.
Save robwormald/21579189e307c498919ef7a87c591d59 to your computer and use it in GitHub Desktop.
const helloWorld = (props) => ngHtml`<h1>Hello ${props.name}</h1>`
const TodoItemTemplate = props => ngHtml`<li>${props.$index} - ${props.name}</li>`
function TodoAppComponent(){
const todoService = inject(TodoService);
return ngHtml`
<h3>Todos</h3>
<ul>${ngRepeat(todoService.todos, TodoItemTemplate)}</ul>`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment