In '@angular/core'
with @
means taking things from npm
with angular/core
is nothing but the folder/path
.
In angular '@angular/core' provides list of packages.
when you write
import { Component } from '@angular/core';
It gives you a way to make use of component
which includes template(html view), class(where logics implemented), and decorators(metadata from angular)
when you write
import { Component,Input } from '@angular/core';
then you will be able to use Input properties
which is used to pass data from the container component(parent)
to nested component(child)
when you write
import { Component,Output } from '@angular/core';
hen you will be able to use Output properties
which is used to pass data from the nested component
to Container component
.
and this kind of many more things....(refer angular documentation) are there which is possible only when imported from '@angular/core'
.