小编Bor*_*ash的帖子

如何使用ngrx-router-store在ngrx效果中获取路径参数?

我有效果类,我想根据路由器参数ID加载详细信息

@Effect()
  getDetails$ = this.actions$.ofType(DetailActions.GET_DETAILS).pipe(
    map(toPayload),
    switchMap(payload => {
      return this.detailService
        .getDetail(payload)//I want router params here in payload
        .pipe(
          map(detail=> new DetailActions.GetDetailSuccess(detail)),
          catchError(error =>
            Observable.of(new DetailActions.GetDetailFail(error))
          )
        );
    })
  );
Run Code Online (Sandbox Code Playgroud)

我想在有效负载中获取路由器参数,这样我就不必从组件传递有效负载,而是直接从特技类中获取它.

ngrx ngrx-effects angular ngrx-store ngrx-store-4.0

7
推荐指数
1
解决办法
4777
查看次数

如何在Azure功能中添加razor视图文件?

我正在创建一个应用程序,它是 azure 函数项目,我想在该项目中使用 Razor 视图,是否有我应该在 azure 函数中使用的模板引擎?

c# azure asp.net-core azure-functions

5
推荐指数
2
解决办法
3907
查看次数

如何在队列触发器中将azure函数中的主机url作为输入?

我输入了如下的队列触发器:

    [FunctionName("Test")]
    public static void Run([QueueTrigger("myqueue-items")]string myQueueItem, TraceWriter log)
    {
       //code
    }
Run Code Online (Sandbox Code Playgroud)

我想在上面的函数里面获取azure函数的主机url,有什么方法可以得到它吗?

c# azure asp.net-core azure-functions

1
推荐指数
1
解决办法
1981
查看次数