Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: Can't resolve all parameters for EventsListComponent: (?). at syntaxError (compiler.js:2193) #349

Closed
susilpadhi opened this issue Feb 16, 2020 · 2 comments

Comments

@susilpadhi
Copy link

Uncaught Error: Can't resolve all parameters for EventsListComponent: (?).
at syntaxError (compiler.js:2193)

Component

import { Component, OnInit } from '@angular/core';
import { EventService } from './Shared/event.service';

@component({
selector: 'app-events-list',
template: <p> {{newcomponent}} </p> <p> Today's Date : {{todaydate}} </p>
})
export class EventsListComponent implements OnInit {
public todaydate;
newcomponent = 'Entered in new component created';
constructor(private myservice: EventService) {}
ngOnInit() {
this.todaydate = this.myservice.showTodayDate();
}
}

Service

import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class EventService {
constructor() { }
showTodayDate() {
const ndate = new Date();
return ndate;
}
}

@ahnpnl
Copy link
Collaborator

ahnpnl commented Feb 16, 2020

duplicated #288

@wtho wtho closed this as completed Feb 16, 2020
@wtho
Copy link
Collaborator

wtho commented Feb 16, 2020

closed as this is a copy-paste duplicate of #348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants