Use of Curly Braces while importing


#1

import { computed, observer } from ‘@ember/object’;

import Controller from ‘@ember/controller’;

why curly braces for first line and not needed for second line?


#2

In first line you import just two properties from object package in second you import whole package.

For more details I recommend MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import