Skip to content

Commit 4c748d0

Browse files
committed
docs: Include new library inclusion in the docs
1 parent 0e7bdc0 commit 4c748d0

File tree

3 files changed

+27
-32
lines changed

3 files changed

+27
-32
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [3.0.0] - 2024-11-25
10+
11+
### Added
12+
13+
* Added compatabilty to angular 19 (1609)
14+
915
### Changed
1016

1117
* Update build pipeline to use node 20 (#1598)
18+
*__BREAKING CHANGE:__ Migrated the library to use standalone components. Please see the updated inclusion documentation described in the `README.md` (1608)
1219

1320
## [2.1.0] - 2024-06-18
1421

@@ -92,7 +99,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9299

93100
### Changed
94101

95-
* Set angular compiler option to ivy-partial (#161, #257) **Breaking Change: The minimum supported angular version is now 12.x**
102+
* __BREAKING CHANGE:__ Set angular compiler option to ivy-partial (#161, #257) **The minimum supported angular version is now 12.x**
96103
* Updated demo to Angular 13 (#294)
97104
* Set package version to 1.0.0-branch
98105
* Updated advanced-configuration-example.md (#157)

README.md

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,52 +18,38 @@ If you are not sure what you can expect from Darkbox please have a look at the c
1818

1919
## How?
2020
### Installation
21-
Install npm package for Angular version 12+:
21+
Install npm package for Angular version 15+:
2222

2323
```
2424
npm i @failed-successfully/ngx-darkbox-gallery
2525
```
2626

27-
Import the module into your `app.module.ts`
27+
Since Version 3 this library is provided as a standalone component.
28+
To use it import the `NgxDarkboxGalleryComponent` into a component of your choice. In this example it is called AppComponent (`app.component.ts`)
2829
```ts
2930
...
30-
import { NgxDarkboxGalleryModule } from '@failed-successfully/ngx-darkbox-gallery';
31-
32-
@NgModule({
33-
...,
34-
imports: [
35-
...,
36-
NgxDarkboxGalleryModule
37-
],
38-
...
39-
})
40-
export class AppModule { }
41-
```
42-
### Usage
43-
The simplest way of using Darkbox is to include the component with its default configuration as shown below.
44-
45-
Inclusion in the desired `.html` file
46-
```ts
47-
<darkbox-gallery [images]="images"></darkbox-gallery>
48-
```
49-
50-
View of the corresponding `.ts` file
51-
```ts
52-
import { Component } from '@angular/core';
53-
import { Image } from '@failed-successfully/ngx-darkbox-gallery';
31+
import { NgxDarkboxGalleryComponent } from '@failed-successfully/ngx-darkbox-gallery';
5432

5533
@Component({
56-
selector: 'app-root',
57-
templateUrl: './app.component.html',
58-
styleUrls: ['./app.component.scss']
34+
selector: 'app-root',
35+
templateUrl: './app.component.html',
36+
styleUrls: ['./app.component.scss'],
37+
imports: [NgxDarkboxGalleryComponent]
5938
})
6039
export class AppComponent {
61-
images: Image[] = [{
40+
images: Image[] = [{
6241
url: 'https://picsum.photos/seed/3000/2000',
6342
thumbnailUrl: 'https://picsum.photos/300/200'
6443
}];
6544
}
6645
```
46+
### Usage
47+
The simplest way of using Darkbox is to include the component with its default configuration as shown below.
48+
49+
Inclusion in the desired `.html` file
50+
```ts
51+
<darkbox-gallery [images]="images"></darkbox-gallery>
52+
```
6753

6854
For an example of a more advanced Darkbox configuration have a look at [our examples](./docs/examples/advanced-configuration-example.md).
6955

docs/examples/advanced-configuration-example.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ The following example shows how Darkbox can be configured. In this example all c
1111
```ts
1212
import { Component } from '@angular/core';
1313
import { Image, DarkboxConfiguration } from '@failed-successfully/ngx-darkbox-gallery';
14+
import { NgxDarkboxGalleryComponent } from '@failed-successfully/ngx-darkbox-gallery';
1415

1516
@Component({
1617
selector: 'app-root',
1718
templateUrl: './app.component.html',
18-
styleUrls: ['./app.component.scss']
19+
styleUrls: ['./app.component.scss'],
20+
imports: [NgxDarkboxGalleryComponent]
1921
})
2022
export class AppComponent {
2123
configuration: Configuration = {

0 commit comments

Comments
 (0)