小编Rit*_*Dey的帖子

AspNetCore Angular 6.0 SPA模板中的未知选项--extractCss

我已经脚手架AspNetCore Angular 6.0 SPA templatecli再安装npm相应的软件包.

但是,当我尝试运行该项目时,dotnet run它不会启动而是错误提示.我抓了一个截图供你参考.我不确定它是否与angular.Json文件有关,否则!任何的想法..

错误:

未知选项--extractCss

捕获错误

asp.net asp.net-core angular angular6

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

类型'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
查看次数

ng:一个元素上不能有多个模板绑定。仅使用一个名为 template 或以 * 为前缀的属性

我正在使用 angular5 ,我无法将 *dropdownMenu 与 *ngFor 一起使用,我收到此错误:

ng : Can't have multiple template bindings on one element . Use only one attribute named template or prefixed with *
Run Code Online (Sandbox Code Playgroud)

这是代码:

<div class="btn-group" dropdown>
        <button dropdownToggle type="button" class="btn btn-primary dropdown-toggle" (click)="ListUsers()">
          List of users <span class="caret"></span>
        </button>
        <ul *dropdownMenu class="dropdown-menu" role="menu" *ngFor="let c of listUsers">
          <li role="menuitem"><a class="dropdown-item">{{c.Firstname}} {{c.lastName}}</a></li>
        </ul>
      </div>
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

angular angular5

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

为什么在C程序中int 070的输出是56?

你能解释一下吗?为什么它给出了56个值作为输出?

#include <stdio.h> 
#include <conio.h>

void main()
{
    int x = 070;
    printf("%d", x);
    getch();
}
Run Code Online (Sandbox Code Playgroud)

c int decimal octal

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

标签 统计

angular ×3

angular5 ×1

angular6 ×1

asp.net ×1

asp.net-core ×1

c ×1

decimal ×1

int ×1

octal ×1

rxjs ×1