角度 7.1.4
@FieldComponent({
templateUrl: './field-phone.component.html',
selector: 'app-field-phone'
})
export class FieldPhone {
}
和装饰器本身
export function FieldComponent(metadata: Component) {
return function(target: function) {
return Component(metadata)(target);
}
}
结果:zone.js:665 Unhandled Promise rejection: Failed to load field-phone.component.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load field-phone.component.html
这是我尝试扩展本机角度Component装饰器但仍然无法正常工作的方法。如何正确扩展装饰器?