I have problem with line below:
import { Component, APP_BASE_HREF } from '@angular/core';
(APP_BASE_HREF) doesn't exist on @angular/core. I think that is moved to @angular/common
and the line:
set: { providers: [{ provide: undefined, useClass: Mockundefined }] }
"Cannot find name Mockundefined"
This is the component source:
import { Component, ViewEncapsulation, Inject, OnInit } from '@angular/core';
import { APP_BASE_HREF } from '@angular/common';
declare var jQuery: any;
declare var tinyMCE: any;
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
providers: [{ provide: APP_BASE_HREF, useValue: '/' }],
encapsulation: ViewEncapsulation.None,
})
export class AppComponent implements OnInit {
title = 'app';
constructor(@Inject(APP_BASE_HREF) readonly href: string) { }
public ngOnInit(): any {
window['Pace'].on('start' , () => jQuery('.spinner').show());
window['Pace'].on('done' , () => jQuery('.spinner').hide());
tinyMCE.baseURL = `${this.href}assets/js/tiny_mce`;
}
}
This is my spec:
I have problem with line below: import { Component, APP_BASE_HREF } from '@angular/core'; (APP_BASE_HREF) doesn't exist on @angular/core. I think that is moved to @angular/common
and the line: set: { providers: [{ provide: undefined, useClass: Mockundefined }] }
"Cannot find name Mockundefined"
This is the component source: