Skip to content

Support for standalone components #67

Open
@BojanKogoj

Description

@BojanKogoj

Since Angular 16 many of us are moving to standalone components. Any chance usage without modules could be supported?

In the meantime, this is a solution I used to get it working

main.ts

export const appConfig: ApplicationConfig = {
  providers: [
    ...
    importProvidersFrom(TimeagoModule.forRoot()),
  ],
};

bootstrapApplication(AppComponent, appConfig)...

example.component.ts

@Component({
  standalone: true,
  imports: [CommonModule, TimeagoModule],
  template: `{{ '2023-08-21T14:54:38.342Z' | timeago }}`,
})
export class ExampleComponent { ... }

StackBlitz example

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions