Skip to content

Commit 2c7d6f0

Browse files
authored
feat(moduleless): migrating to standalone modules support (#6669)
* feat(accordion): migrated to standalone * feat(accordion): migrated to standalone * feat(alert)): migrated to standalone * feat(buttons): migrated to standalone * feat(carousel): migrated to standalone * feat(collapse): migrated to standalone * feat(datepicker): migrated to standalone * fix(accordion): fixed tests * fix(accordion): fixed tests * fix(accordion): fixed tests * fix(accordion): fixed tests * fix(accordion): fixed tests * fix(carousel): fixed tests * feat(dropdown): added moduleless support * feat(focustrap): added moduleless support * feat(modal): added moduleless support * feat(pagination): added moduleless support * feat(popover): added moduleless support * feat(progressbar): added moduleless support * feat(rating): added moduleless support * feat(sortable): added moduleless support * feat(tabs): added moduleless support * feat(timepicker): added moduleless support * feat(timepicker): added moduleless support * feat(typeahead): added moduleless support * feat(typeahead): added moduleless support * fix(rating): tests ajust to moduleless * fix(progressbar): tests ajust to moduleless * chore(docs): added deprecations * chore(docs): updated documentation regarding standalone usage * chore(docs): updated documentation regarding standalone usage * fix(modal): fixed nested backdrop issue * 18.1.0 * chore(version): bumped version to 18.1.0
1 parent d210ca6 commit 2c7d6f0

File tree

173 files changed

+1005
-664
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+1005
-664
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ import { TooltipModule } from 'ngx-bootstrap/tooltip';
106106
107107
@NgModule({
108108
...
109-
imports: [TooltipModule.forRoot(),...]
109+
imports: [TooltipModule,...]
110110
...
111111
})
112112
```

apps/ngx-bootstrap-docs/src/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { routes } from './app.routing';
1616
bootstrap: [AppComponent], imports: [BrowserAnimationsModule,
1717
DocsModule,
1818
RouterModule.forRoot(routes, { useHash: environment.useHash }),
19-
BsDropdownModule.forRoot()], providers: [
19+
BsDropdownModule], providers: [
2020
{ provide: NgApiDoc, useValue: ngdoc },
2121
{ provide: DOCS_TOKENS, useValue: routes },
2222
{ provide: SIDEBAR_ROUTES, useValue: SidebarRoutesStructure },
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "18.0.2"
2+
"version": "18.1.0"
33
}

libs/common-docs/src/lib/common/schematics/schematics.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ <h2 id="getting-started">Schematics</h2>
138138
],
139139
<span class="kwd">imports</span>: [
140140
<span class="pln"> &hellip;</span>
141-
<span class="lit">AccordionModule.forRoot()</span>,
141+
<span class="lit">AccordionModule</span>,
142142
],
143143
bootstrap: [AppComponent]
144144
<span class="pun">{{'}'}}</span>)

libs/common-docs/src/lib/demo-section-components/demo-examples-section/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export { ExamplesComponent } from './examples.component';
2020
CommonModule,
2121
NgApiDocModule,
2222
RouterModule,
23-
TabsModule.forRoot(),
23+
TabsModule,
2424
],
2525
exports: [
2626
ExamplesComponent,

libs/common-docs/src/lib/demo-section-components/demo-examples-section/stackblitz/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import { ${className === 'DemoModalServiceFromComponent' ? `${className}, ModalC
2525
declarations: [${className === 'DemoModalServiceFromComponent' ? `${className}, ModalContentComponent` : className}],
2626
imports: [
2727
${moduleData.moduleName}.forRoot(),
28-
${className === 'DemoModalWithPopupsComponent' ? `TooltipModule.forRoot(),
29-
PopoverModule.forRoot(),` : ''}
28+
${className === 'DemoModalWithPopupsComponent' ? `TooltipModule,
29+
PopoverModule,` : ''}
3030
BrowserAnimationsModule,
3131
CommonModule,
3232
FormsModule,

libs/common-docs/src/lib/docs.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ export { ThemesComponent } from './common/themes/themes.component';
7979
NgApiDocModule,
8080
ExamplesComponentModule,
8181
ApiSectionsComponentModule,
82-
TabsModule.forRoot(),
83-
BsDropdownModule.forRoot(),
82+
TabsModule,
83+
BsDropdownModule,
8484
RouterModule
8585
],
8686
exports: [

libs/doc-pages/accordion/src/lib/accordion.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export { AccordionSectionComponent } from './accordion-section.component';
1717
...DEMO_COMPONENTS
1818
],
1919
imports: [
20-
AccordionModule.forRoot(),
20+
AccordionModule,
2121
CommonModule,
2222
FormsModule,
2323
DocsModule,

libs/doc-pages/accordion/src/lib/docs/usage.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
1+
### Standalone component usage
2+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
3+
4+
import { AccordionComponent, AccordionPanelComponent } from 'ngx-bootstrap/accordion';
5+
6+
@Component({
7+
standalone: true,
8+
imports: [
9+
BrowserAnimationsModule,
10+
AccordionComponent,
11+
AccordionPanelComponent
12+
...
13+
]
14+
})
15+
export class AppComponent(){}
16+
17+
Also should be added web-animations-js polyfill for IE browser (Edge)
18+
### Module usage
119
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
220

321
import { AccordionModule } from 'ngx-bootstrap/accordion';
422

523
@NgModule({
624
imports: [
725
BrowserAnimationsModule,
8-
AccordionModule.forRoot(),
26+
AccordionModule,
927
...
1028
]
1129
})

libs/doc-pages/alerts/src/lib/alerts.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export { AlertsSectionComponent } from './alerts-section.component';
1515
...DEMO_COMPONENTS
1616
],
1717
imports: [
18-
AlertModule.forRoot(),
18+
AlertModule,
1919
CommonModule,
2020
DocsModule,
2121
RouterModule.forChild(routes)

0 commit comments

Comments
 (0)