Я знаю, что этот вопрос был опубликован много раз, но не для angular 7. Кажется, они что-то изменили, потому что, как описано здесь: https://stackoverflow.com/a/51256389/1056512 больше не работает.Вот код:
import { Component } from '@angular/core';
export function CustomElement(args: any = {}): (cls: any) => any {
const ngCompDecorator = Component(args);
return function(compType: any) {
ngCompDecorator(compType);
};
}
Использование декоратором
@CustomElement({
selector: 'multiple',
templateUrl: './multiple.html',
styleUrls: ['./multiple.scss']
})
У меня следующая ошибка: Failed to load multiple.html
Что здесь происходит?
РЕДАКТИРОВАТЬ: Мои зависимости пакета:
"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"core-js": "^2.5.4",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
Stackblitz работает на 7.0.1, а мой на 7.2.0