Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: provide individual components for angular as standalone components #237

Closed
mfranzke opened this issue Jan 23, 2023 · 6 comments · Fixed by #2183 or #2184
Closed

feat: provide individual components for angular as standalone components #237

mfranzke opened this issue Jan 23, 2023 · 6 comments · Fixed by #2183 or #2184
Labels
🏘components Changes inside components folder 🍄🆙improvement New feature or request

Comments

@mfranzke
Copy link
Member

With the introduction of Standalone Components with Angular 14, components can be imported and tree-shaked individually without the need of a wrapping module such as DBUIElementsModule.

It would be great if all components can be marked as standalone and imported individually.

compare to db-ui/elements#605

@mfranzke mfranzke added this to the Guidelines 3.0 Beta milestone Jan 23, 2023
@mfranzke mfranzke added improvement 🏘components Changes inside components folder labels Jan 23, 2023
@nmerget nmerget added 🍄🆙improvement New feature or request and removed improvement labels Jan 24, 2023
@annsch
Copy link
Collaborator

annsch commented Jan 25, 2023

Actually this feature/option seems to be not fully implemented:
BuilderIO/mitosis#960
We should observe their solution first.

@nmerget nmerget added the 😍nice to have Nice to have things label Jan 26, 2023
@mfranzke mfranzke removed the 😍nice to have Nice to have things label Mar 15, 2023
@db-ui db-ui deleted a comment from nmerget Mar 15, 2023
@db-ui db-ui deleted a comment from annsch Mar 15, 2023
@d-koppenhagen
Copy link
Contributor

I will give this issue a push since we ware st Angular 17 now. Standalone components are the recommended way in Angular now. Angular will drop or at least deprecate NgModules in the future.

@d-koppenhagen
Copy link
Contributor

Another point: It produces less boilerplate code and makes integration and testing easier.

@mfranzke
Copy link
Member Author

mfranzke commented Feb 7, 2024

@annsch the ticket that you've mentioned in here is closed – do you have a chance to review whether this is provided now and could you also provide some example for this or should somebody else take over ?

@d-koppenhagen
Copy link
Contributor

If you give me a quick into about the mechanisms of mitosis here, I can probably also take over.

@mfranzke mfranzke linked a pull request Feb 7, 2024 that will close this issue
5 tasks
d-koppenhagen added a commit to d-koppenhagen/db-ui-mono that referenced this issue Feb 7, 2024
BREAKING CHANGE:
All Angular components are `standalone` now.
SCAM (Single Component Angular Modules) have been removed.
please import the standalone components directly in your `imports` section.

```ts app.component.ts
//app.component.ts
import { DBButton } from '@db-ui/ngx-components';

@component({
	// ...
	imports: [
		// ...,
		DBButton
    ],
	// ...
})
```

closes db-ui#237
@d-koppenhagen
Copy link
Contributor

@annsch I think I managed it. Fingers crossed.

d-koppenhagen added a commit to d-koppenhagen/db-ui-mono that referenced this issue Feb 8, 2024
BREAKING CHANGE:
All Angular components are `standalone` now.
SCAM (Single Component Angular Modules) have been removed.
please import the standalone components directly in your `imports` section.

```ts app.component.ts
//app.component.ts
import { DBButton } from '@db-ui/ngx-components';

@component({
	// ...
	imports: [
		// ...,
		DBButton
    ],
	// ...
})
```

closes db-ui#237
d-koppenhagen added a commit to d-koppenhagen/db-ui-mono that referenced this issue Feb 8, 2024
BREAKING CHANGE:
All Angular components are `standalone` now.
SCAM (Single Component Angular Modules) have been removed.
please import the standalone components directly in your `imports` section.

```ts app.component.ts
//app.component.ts
import { DBButton } from '@db-ui/ngx-components';

@component({
	// ...
	imports: [
		// ...,
		DBButton
    ],
	// ...
})
```

closes db-ui#237
d-koppenhagen added a commit to d-koppenhagen/db-ui-mono that referenced this issue Feb 8, 2024
BREAKING CHANGE:
All Angular components are `standalone` now.
SCAM (Single Component Angular Modules) have been removed.
please import the standalone components directly in your `imports` section.

```ts app.component.ts
//app.component.ts
import { DBButton } from '@db-ui/ngx-components';

@component({
	// ...
	imports: [
		// ...,
		DBButton
    ],
	// ...
})
```

closes db-ui#237
nmerget pushed a commit that referenced this issue Feb 8, 2024
* refactor(ngx-components)!: completely switch to standalone

BREAKING CHANGE:
All Angular components are `standalone` now.
SCAM (Single Component Angular Modules) have been removed.
please import the standalone components directly in your `imports` section.

```ts app.component.ts
//app.component.ts
import { DBButton } from '@db-ui/ngx-components';

@component({
	// ...
	imports: [
		// ...,
		DBButton
    ],
	// ...
})
```

closes #237

* fix: use withHashLocation

* fix: add missing NavigationContentDirective import

* fix: add missing NavigationContentDirective import

* fix: remove --ui flag from test

* fix: add standalone for angular mitosis specific config as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏘components Changes inside components folder 🍄🆙improvement New feature or request
Projects
None yet
4 participants