最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - Story book angular inject a service - Stack Overflow

programmeradmin1浏览0评论

Trying to inject a service in to story book angular.

To call a method in angular service.

render: () => ({ props: { uType: 'secondary',

withDelay: (injector: Injector) => { const myService: NotificationService = injector!.get(NotificationService);
myService.show("Hello"); alert("hello"); }

, }, template: <button uAction [uType]="'secondary'" (click)="withDelay(injector)">Show notification</button>,}),

I am trying to call a service method on click of with delay function.

How to inject a real service to storybook.

发布评论

评论列表(0)

  1. 暂无评论