angular 组件 class 如何实例化?

How does an angular component class get instantiated?

我是 Angular 的新手,我看到我们对组件使用 classes。但是我没有看到任何地方实例化 classes 并通过使用 new 关键字从它们创建 object 实例。我们只是定义一个 class 并使用它。有些classes甚至没有构造函数,比如app.component.ts,里面只有标题属性。怎么来的?在我读到的一篇文章中说

Constructor is invoked when Angular creates a component or directive by calling new on the class.

那么 new 在哪里被调用?这一切都发生在幕后吗?所以 angular 在编译时实例化 classes 并从中生成 objects ,当从 TS 编译到 JS 时?如果是这样,我在哪里可以找到它的 JS 源代码以查看它的真实示例?

这让我很困惑,我真的很想了解 Angular 2+ 是如何工作的。一些指向更多关于它的文章的链接也很好,可以看到这个框架的所有 javascript 逻辑和魔法。

谢谢。

class A {
  title = 'foo';
}

它是一个Field declarations并且与

相同
class A {
  constructor(){
    this.title = 'foo';
  }
}

当 angular 运行时决定显示组件时创建新实例。