小编Tux*_*Joe的帖子

在 macOS 中的 Automator 中创建的快速操作保存在哪里?

我正在寻找 Apple 存储我创建的快速操作的位置,以便我可以共享它们。

macos automator

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

'Observable<Object>' 类型不存在属性 'timeout'

我正在尝试从 5 升级到 Angular 6 并收到此错误:

src/app/services/http.service.ts(17,14) 中的错误:错误 TS2339:“可观察”类型上不存在属性“超时”。

我在 http.service.ts 中的代码:

import { throwError as observableThrowError,  Observable } from 'rxjs';
import { Injectable } from '@angular/core';
import { environment } from "environments/environment";
import { AppService } from 'app/app.service';
import { HttpClient } from '@angular/common/http';

@Injectable()
export class HttpService {

    private baseUrl = environment.apiUrl;

    constructor(private http: HttpClient, private appService: AppService) { }

    public get(endpoint: string): Observable<any>{
        return this.http.get(this.baseUrl + endpoint)
            .timeout(this.appService.timeoutInterval)
            .retryWhen(error => error.delay(this.appService.waitInterval)
                .take(this.appService.numberOfRetries)
                .concat(observableThrowError(new Error())))
            .share();
    }
} …
Run Code Online (Sandbox Code Playgroud)

rxjs5 angular angular5 angular6 rxjs6

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

'Observable&lt;Event&gt;' 类型不存在属性 'distinctUntilChanged'

尝试从 5 升级到 Angular 6 并收到此错误:

src/app/app.component.ts(26,23) 中的错误:错误 TS2339:“Observable”类型上不存在“distinctUntilChanged”属性。

我在 app.module.ts 中导入了 distinctUntilChanged:

import "rxjs/add/operator/distinctUntilChanged";
Run Code Online (Sandbox Code Playgroud)

我在 app.component.ts 中的代码:

import { Component } from "@angular/core"; import { Router, NavigationEnd } from "@angular/router";
import { TranslateService } from "@ngx-translate/core";
import { GeoService } from "app/services/geo.service";
import { ArbeteService } from "app/services/arbete.service";
import { GoogleAnalyticsEventsService } from "app/services/google-analytics-events.service";

import * as _ from "lodash";

@Component({
    selector: "app-root",
    templateUrl: "./app.component.html",
    styleUrls: ["./app.component.scss"]
})
export class AppComponent {

        //Send pageview to Google Analytics
        router.events.distinctUntilChanged((previous: any, …
Run Code Online (Sandbox Code Playgroud)

rxjs5 angular angular5 angular6 rxjs6

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

标签 统计

angular ×2

angular5 ×2

angular6 ×2

rxjs5 ×2

rxjs6 ×2

automator ×1

macos ×1