Standalone components

A standalone component is a component that sets standalone: true in its component metadata. Standalone components directly import other components, directives, and pipes used in their templates: 


@Component({

  standalone: true,

  selector: 'profile-photo',

})

export class ProfilePhoto { }

@Component({

  standalone: true,

  imports: [ProfilePhoto],

  template: `<profile-photo />`

})

export class UserProfile { }

Vikash Chauhan

C# & .NET experienced Software Engineer with a demonstrated history of working in the computer software industry.

Post a Comment

Previous Post Next Post

Contact Form