Reputation: 1730
I have a service like this
@Injectable({providedIn: 'root'})
export default class UserService {
...
}
and use it inside component
@Component({
selector: 'app-account',
templateUrl: './account.component.html',
styleUrls: ['./account.component.css']
})
export class AccountComponent implements OnInit {
constructor(private userService: UserService) { }
...
}
Each time, when I change something in the code and it re-built, I see an error
main.ts:12 ReferenceError: UserService is not defined
What I miss? Is it incorrect implementation?
I am using Angular 11.2. My dev env inside docker.
Upvotes: 0
Views: 83