小编Fai*_*der的帖子

如何在matTooltip中添加箭头?

我正在尝试在matTooltip上添加箭头,有任何方法可以在matTooltip上添加箭头。

<button mat-raised-button
        matTooltip="Info about the action"
        aria-label="Button that displays a tooltip when focused or hovered over">   
        Action 
</button>
Run Code Online (Sandbox Code Playgroud)

javascript tooltip angular-material angular

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

类型'OperatorFunction <Response,Recipe []>'上不存在属性'subscribe'

我正在尝试从中获取数据firebase,但面临错误

"类型'OperatorFunction'上不存在"属性'订阅'"

任何的想法?什么在这里失踪?

import { Injectable } from '@angular/core';
import {HttpClient, HttpResponse} from '@angular/common/http';
import {Response} from '@angular/http';
import {RecipeService} from '../recipes/recipe.service';
import {Recipe} from '../recipes/recipe.model';
import {map} from 'rxjs/operators';


@Injectable({
 providedIn: 'root'
})
export class DataStorageService {

 constructor(private httpClient: HttpClient,
          private recipeService: RecipeService) {}

 storeRecipes() {
    return this.httpClient.put('https://ng-recipe-10b53.firebaseio.com/recipes.json',
      this.recipeService.getRecipes());
 }

  getRecipes() {
this.httpClient.get('https://ng-recipe-book.firebaseio.com/recipes.json');
  map(
    (response: Response) => {
      const recipes: Recipe[] = response.json();
      for (const recipe of recipes) {
        if (!recipe['ingredients']) {
          recipe['ingredients'] = [];
        }
      } …
Run Code Online (Sandbox Code Playgroud)

rxjs angular

3
推荐指数
2
解决办法
5538
查看次数

标签 统计

angular ×2

angular-material ×1

javascript ×1

rxjs ×1

tooltip ×1