What is @angular/core?
The @angular/core package is a fundamental part of Angular, a popular front-end web application platform. It provides the critical runtime parts of the Angular framework, including the component decorator, directives, dependency injection, and the core Angular APIs necessary for building dynamic single-page web applications.
What are @angular/core's main functionalities?
Components
Components are the building blocks of Angular applications. They control a patch of screen called a view. The @Component decorator indicates that the class immediately below it is a component and provides metadata about the component.
"@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'My Angular App'; }"
Dependency Injection
Dependency Injection (DI) is a design pattern used in Angular to make components or classes dependent on interfaces rather than concrete implementations. This improves modularity and testability.
"constructor(private myService: MyService) {}"
Directives
Directives are classes that add additional behavior to elements in your Angular applications. With Angular's built-in directives, you can manage forms, lists, styles, and what users see.
"@Directive({ selector: '[appHighlight]' }) export class HighlightDirective { constructor(el: ElementRef) { el.nativeElement.style.backgroundColor = 'yellow'; } }"
Other packages similar to @angular/core
react
React is a popular JavaScript library for building user interfaces. It focuses on a component-based architecture similar to Angular but uses a different syntax and design philosophy. React emphasizes a one-way data flow and virtual DOM for efficient rendering.
vue
Vue.js is a progressive JavaScript framework used for building UIs and single-page applications. It is designed from the ground up to be incrementally adoptable. Vue also focuses on the ViewModel part of the MVVM pattern and employs a reactive and composable data model.
19.2.0 (2025-02-26)
common
| Commit | Type | Description |
| -- | -- | -- |
| 3e39da593a | feat | introduce experimental httpResource
(#59876) |
compiler
| Commit | Type | Description |
| -- | -- | -- |
| 5b20bab96d | feat | Add Skip Hydration diagnostic. (#59576) |
| fe8a68329b | feat | support untagged template literals in expressions (#59230) |
compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| ed705a856a | feat | detect missing structural directive imports (#59443) |
core
| Commit | Type | Description |
| -- | -- | -- |
| 2588985f43 | feat | pass signal node to throwInvalidWriteToSignalErrorFn (#59600) |
| 168516462a | feat | support default value in resource()
(#59655) |
| bc2ad7bfd3 | feat | support streaming resources (#59573) |
| 146ab9a76e | feat | support TypeScript 5.8 (#59830) |
| 6c92d65349 | fix | add hasValue
narrowing to ResourceRef
(#59708) |
| 96e602ebe9 | fix | cancel in-progress request when same value is assigned (#59280) |
| 6789c7ef94 | fix | Defer afterRender until after first CD (#59455) (#59551) |
| c87e581dd9 | fix | Don't run effects in check no changes pass (#59455) (#59551) |
| 127fc0dc84 | fix | fix resource()
's previous.state
(#59708) |
| b592b1b051 | fix | fix race condition in resource() (#59851) |
| a299e02e91 | fix | preserve tracing snapshot until tick finishes (#59796) |
forms
| Commit | Type | Description |
| -- | -- | -- |
| fa0c3e3210 | feat | support type set in form validators (#45793) |
migrations
| Commit | Type | Description |
| -- | -- | -- |
| 1cd3a7db83 | feat | add migration to convert templates to use self-closing tags (#57342) |
platform-browser
| Commit | Type | Description |
| -- | -- | -- |
| e6cb411e43 | fix | automatically disable animations on the server (#59762) |
platform-server
| Commit | Type | Description |
| -- | -- | -- |
| fc5d187da5 | fix | decouple server from animations module (#59762) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="19.1.8"></a>