I know what's the difference between export class xxx
and export default class xxx
.
But I saw many angular4
project use export class xxx
like this:
@Component({
selector: 'call-record',
templateUrl: './collection.component.html',
styleUrls: ['./collection.component.css']
})
export class collection {
}
I think if there is one class or whatever to export, use export default xxx
should be better?
So I can import it like this: import xxx from './somewhere'
not this: import {xxx} from './somewhere'
.