Skip to content

Commit

Permalink
docs: add documentation for Angular Standalone Component (#5392)
Browse files Browse the repository at this point in the history
* ref(guides): consolidate CT getting started guide

* fix broken links

* add getting started video

* fix casing

* feat(guides): add standalone angular example

* Update docs/guides/component-testing/angular/examples.mdx

Co-authored-by: Mike McCready <[email protected]>

* revert updates files from merge

---------

Co-authored-by: Mike McCready <[email protected]>
Co-authored-by: Cyonic Admin <[email protected]>
  • Loading branch information
3 people authored Sep 29, 2023
1 parent 8c43f6c commit 51d8cbc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/guides/component-testing/angular/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ See
to set up common options in a custom `cy.mount()` command to avoid having to
repeat this boilerplate for each test.

### Using Standalone

Not only are [Standalone Components](https://angular.io/guide/standalone-components) supported, they are the simplest components to write tests for.
Standalone Components provide the Angular compiler with everything it needs to compile through its [`@Component()`](https://angular.io/api/core/Component) decorator.
This means that in most cases a Standalone Component can be mounted without ever providing any `imports`, `decorators`, or `providers`. Mounting then becomes as simple as:

```ts
cy.mount(MyStandaloneComponent)
```

### Using Angular Template Syntax

The `cy.mount()` method also supports the Angular template syntax when mounting
Expand Down

0 comments on commit 51d8cbc

Please sign in to comment.