小编ulo*_*lou的帖子

折线图禁用插值

无论如何在line chart使用中禁用插值chartjs?我只是红色整个文档,并没有找到任何关于这个.

chart.js

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

Angular2升级到RC6,未找到traceur

升级到之后RC6,会发生以下错误:

zone.js:101 GET http://localhost/traceur 404 (Not Found)
zone.js:484 Unhandled Promise rejection: Error: XHR error (404 Not Found) loading http://localhost/traceur
            at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost/vendor/zone.js/dist/zone.js:794:30)
            at ZoneDelegate.invokeTask (http://localhost/vendor/zone.js/dist/zone.js:365:38)
            at Zone.runTask (http://localhost/vendor/zone.js/dist/zone.js:265:48)
            at XMLHttpRequest.ZoneTask.invoke (http://localhost/vendor/zone.js/dist/zone.js:433:34)
        Error loading http://localhost/traceur
        Error loading http://localhost/vendor/@angular/platform-browser-dynamic/index.js as "@angular/platform-browser-dynamic" from http://localhost/main.js ; Zone: <root> ; Task: Promise.then ; Value: Error: Error: XHR error (404 Not Found) loading http://localhost/traceur(…) null
zone.js:486 Error: Uncaught (in promise): Error: Error: XHR error (404 Not Found) loading http://localhost/traceur(…)
system.src.js:371 Assertion failed: …
Run Code Online (Sandbox Code Playgroud)

angular2-upgrade angular

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

Angular2 RC6升级

更新我的项目后RC6发生以下错误:

Error: Typescript found the following errors:
  app.component.ts (12, 3): Argument of type '{ moduleId: string; selector: string; templateUrl: string; styleUrls: string[]; directives: (type...' is not assignable to parameter of type 'ComponentMetadataType'.
  Object literal may only specify known properties, and 'directives' does not exist in type 'ComponentMetadataType'.
Run Code Online (Sandbox Code Playgroud)

app.component.ts

import {Component, OnInit} from '@angular/core';
import {NavbarComponent} from "./shared/navbar/navbar.component";
import {ROUTER_DIRECTIVES} from "@angular/router";
import {SidebarComponent} from "./shared/sidebar/sidebar.component";
import {FooterComponent} from "./shared/footer/footer.component";

@Component({
  moduleId: module.id,
  selector: 'app-root',
  templateUrl: 'app.component.html',
  styleUrls: ['app.component.css'], …
Run Code Online (Sandbox Code Playgroud)

angular2-upgrade angular

7
推荐指数
2
解决办法
9156
查看次数

动态更新的ng2图表

是否可以更新任何chartng2-charts动态?我知道还有其他类似的库angular2-highcharts,但我想用它来处理它ng2-charts.主要问题是如何chart在按钮点击后重绘?我可以调整窗口大小并更新数据,因此必须手动执行此操作.

https://plnkr.co/edit/fXQTIjONhzeMDYmAWTe1?p=preview

charts ng2-charts angular

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

Angular2递归组件输出

我有以下问题:让我们假设我Component A有两个subcomponents ArAd.Subcomponent Ar是递归创建的树,subcomponent Ad是在递归树(subcomponent Ar)中显示有关选择节点的详细信息的组件.如何将所选节点从子(子)组件Ar发送到Component Ad使用@Output?应该是@Output或其他什么?

app.component.html:

<tree [input]="fooTree" [output]="updateDetails($event)"></tree>
<tree-details [input]="input"></tree-details>
Run Code Online (Sandbox Code Playgroud)

tree.component.html:

<tree [input]="fooTree.children"></tree>
Run Code Online (Sandbox Code Playgroud)

树details.component.html

<div>{{input.name}}</div>
<div>{{input.id}}</div>
Run Code Online (Sandbox Code Playgroud)

在这种情况下,我将只看到根树详细信息,如何从其他节点(递归创建之一)获取信息,何时选中?

tree recursion angular

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