```ts // TodoItem.stories.ts import { Meta, moduleMetadata, Story } from '@storybook/angular'; import fetch from 'node-fetch'; import { CommonModule } from '@angular/common'; import { TodoItem } from './TodoItem'; export default { /* 👇 The title prop is optional. * See https://storybook.js.org/docs/7.0/angular/configure/overview#configure-story-loading * to learn how to generate automatic titles */ title: 'Examples/Loader', component: TodoItem, decorators: [ moduleMetadata({ declarations: [TodoItem], imports: [CommonModule], }), ], } as Meta; /* *👇 Render functions are a framework specific feature to allow you control on how the component renders. * See https://storybook.js.org/docs/7.0/angular/api/csf * to learn how to use render functions. */ export const Primary: Story = { render: (args, { loaded: { todo } }) => ({ props: { args, todo, }, }), loaders: [ async () => ({ todo: await (await fetch('https://jsonplaceholder.typicode.com/todos/1')).json(), }), ], }; ```