小编tec*_*ura的帖子

在 html 标签 Angular 5 中添加每页微数据

我正在开发 Angular 5 应用程序,但我陷入了困境。我想在 html 标签中动态添加特定于每个页面的微数据,例如

<html itemscope itemtype="http://schema.org/QAPage">
Run Code Online (Sandbox Code Playgroud)

有什么办法可以做到这一点吗?如果有的话请告诉我。

microdata angular

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

解析 Facebook Graph getGraphEdge 数组

如何在php中解析这个数组?

$graphNode = $response->getGraphEdge();

Facebook\GraphNodes\GraphNode Object
(
    [items:protected] => Array
        (
            [name] => Haridwar
            [id] => 108165019208093
        )

)
Facebook\GraphNodes\GraphNode Object
(
    [items:protected] => Array
        (
            [name] => Haridwar - ??????? ????????
            [id] => 1421343878181284
        )

)
Facebook\GraphNodes\GraphNode Object
(
    [items:protected] => Array
        (
            [name] => Haridwar , Rishikesh
            [id] => 422468281161935
        )

)
Facebook\GraphNodes\GraphNode Object
(
    [items:protected] => Array
        (
            [name] => Harkipodi, Haridwar
            [id] => 1729854440364388
        )

)
Facebook\GraphNodes\GraphNode Object
(
    [items:protected] => Array
        (
            [name] => Haridwar, …
Run Code Online (Sandbox Code Playgroud)

php facebook-graph-api

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

在角度6中获得错误时执行订阅

最近我将角度5升级到角度6,因此我升级了服务代码如下:

register(postBody: any): Observable<any> {
return this.http
  .post(this.remoteUrl + "auth/register", postBody)
  .pipe(
    catchError(this.handleError("register", []))
  );
}

this.authService.register(this.formObj.value).subscribe(
    response => {

    }
)
Run Code Online (Sandbox Code Playgroud)

现在,当我从API获得400错误时.我能够在错误处理程序中捕获此错误但仍然订阅执行,为什么?订阅应该只在获得没有错误的响应时调用.

我是新手,但在角度5中它并没有发生.所以任何人都可以纠正我的错误吗?

angular6 rxjs6

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

标签 统计

angular ×1

angular6 ×1

facebook-graph-api ×1

microdata ×1

php ×1

rxjs6 ×1