Utilizing '@angular/core'
with the @
symbol involves accessing modules from the npm registry.
Using angular/core
refers to a specific folder structure or file path
.
Within Angular, '@angular/core' offers a range of pre-built functionalities.
An example is when you write:
import { Component } from '@angular/core';
This enables you to utilize the component
feature which encompasses
template (HTML view), class (where logic is implemented), and decorators (Angular metadata)
.
Similarly, by writing:
import { Component,Input } from '@angular/core';
You gain access to Input properties
, which facilitate data transfer from the container component (parent)
to the nested component (child)
.
Furthermore, when importing:
import { Component,Output } from '@angular/core';
You can utilize Output properties
for passing data from the nested component
back to the Container component
.
These are just a few examples of what's possible when using imports from '@angular/core'
. Refer to Angular documentation for further details on available functionalities.