Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Uncaught Error: Unexpected value 'AppComponent' declared by the module
- 'AppModule'.
- Please add a @Pipe/@Directive/@Component annotation.
- at syntaxError (compiler.js:485)
- at eval (compiler.js:15282)
- at Array.forEach (<anonymous>)
- at CompileMetadataResolver.getNgModuleMetadata (compiler.js:15264)
- at JitCompiler._loadModules (compiler.js:34398)
- at JitCompiler._compileModuleAndComponents (compiler.js:34359)
- at JitCompiler.compileModuleAsync (compiler.js:34253)
- at CompilerImpl.compileModuleAsync (platform-browser-dynamic.js:239)
- at PlatformRef.bootstrapModule (core.js:5561)
- at eval (main.ts:11)
- import { Component, OnInit } from '@angular/core';
- import { CanvasSettings } from './canvas-settings';
- import { Rate } from './rate';
- import { RateService } from './rates.service';
- @Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.css'],
- providers: [RateService]
- })
- export class DatePoint() {
- X: number;
- Y: number;
- cost: number;
- diff: number;
- }
- export class AppComponent implements OnInit {
- title = 'Exchange Rate via Canvas';
- bgrdCanvas = new CanvasSettings("bgrdCanvas");
- interactiveCanvas = new CanvasSettings("iaCanvas");
- rates: Rate[];
- dateArray: DatePoint[][][];
- sampleProperty: number;
- constructor(private _rateService: RateService){}
- ngOnInit() {
- this.getRates();
- this.setDateArray();
- console.log(this.dateArray);
- console.log(this.rates);
- }
- getRates() {
- this._rateService.getRates().then(rates => this.rates = rates);
- }
- setDateArray() {
- this.sampleProperty = 8;
- }
- }
Add Comment
Please, Sign In to add comment