You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -10,7 +10,7 @@ for ChangeLog go to [CHANGELOG.md](https://github.com/sheikalthaf/ngu-carousel/b
10
10
11
11
## Demo
12
12
13
-
Demo available [Here](https://sheikalthaf.github.io/ngu-carousel)
13
+
Demo available [Here](https://sheikalthaf.github.io/ngx-carousel)
14
14
15
15
## Installation
16
16
@@ -22,11 +22,9 @@ Include CarouselModule in your app module:
22
22
import { NguCarouselModule } from'@ngu/carousel';
23
23
24
24
@NgModule({
25
-
imports: [
26
-
NguCarouselModule
27
-
],
25
+
imports: [NguCarouselModule]
28
26
})
29
-
exportclassAppModule {}
27
+
exportclassAppModule {}
30
28
```
31
29
32
30
Now ngu-carousel supports touch with the help of hammerjs
@@ -37,7 +35,6 @@ Import hammerjs in `polyfills.ts` file
37
35
38
36
```javascript
39
37
import'hammerjs';
40
-
41
38
```
42
39
43
40
Then use in your component:
@@ -99,7 +96,6 @@ export class SampleComponent implements OnInit {
99
96
## Input Interface
100
97
101
98
```javascript
102
-
103
99
exportclassNguCarouselStore {
104
100
type: string;
105
101
deviceType: DeviceType;
@@ -125,6 +121,7 @@ export class NguCarouselStore {
125
121
isFirst: boolean;
126
122
isLast: boolean;
127
123
RTL: boolean;
124
+
vertical: Vertical;
128
125
}
129
126
exporttypeDeviceType='xs'|'sm'|'md'|'lg'|'all';
130
127
@@ -133,6 +130,11 @@ export class ItemsControl {
133
130
end: number;
134
131
}
135
132
133
+
exportclassVertical {
134
+
enabled: boolean;
135
+
height: number;
136
+
}
137
+
136
138
exportclassTouch {
137
139
active?: boolean;
138
140
swipe: string;
@@ -152,7 +154,8 @@ export class NguCarousel {
152
154
loop?: boolean;
153
155
touch?: boolean;
154
156
easing?: string;
155
-
RTL: boolean;
157
+
RTL?: boolean;
158
+
vertical?: Vertical;
156
159
}
157
160
158
161
exportclassGrid {
@@ -171,26 +174,26 @@ export interface Point {
171
174
172
175
exporttypeCustom='banner';
173
176
exporttypeAnimate='lazy';
174
-
175
-
176
177
```
177
178
178
-
| Command | Type | Required | Description |
179
-
| --- | --- | --- | --- |
180
-
|`grid`| Object | Yes |**xs** - mobile, **sm** - tablet, **md** - desktop, **lg** - large desktops, **all** - fixed width (When you use **all** make others 0 and vise versa) |
181
-
|`slide`| number | optional | It is used to slide the number items on click |
182
-
|`speed`| milli seconds | optional | It is used for time taken to slide the number items |
183
-
|`interval`| milli seconds | optional | It is used to make carousel auto slide with given value. interval defines the interval between slides |
184
-
|`load`| number | optional | is used to load the items similar to pagination. the carousel will tigger the carouslLoad function to load another set of items. it will help you to improve the performance of the app.**`(carouselLoad)="myfunc($event)"`**|
185
-
|`point.visible`| boolean | optional | It is used to indicate no. of slides and also shows the current active slide. |
186
-
|`point.pointStyle`| string | optional | It is used to customize the point indicator. make sure your check the guide. |
187
-
|`point.hideOnSingleSlide`| boolean | optional | It is used to hide the point indicator when slide is less than one. |
188
-
|`touch`| boolean | optional | It is used to active touch support to the carousel. |
189
-
|`easing`| string | optional | It is used to define the easing style of the carousel. Only define the ease name without any timing like `ease`,`ease-in`|
190
-
|`loop`| boolean | optional | It is used to loop the `ngu-item | ngu-tile`. It must be true for `interval` |
191
-
|`animation`| string | optional | It is used to animate the sliding items. currently it only supports `lazy`. more coming soon and also with custom css animation option |
192
-
|`custom`| string | optional | It is you to define the purpose of the carousel. currently it only supports `banner`. more coming soon and also with custom css animation option |
193
-
|`RTL`| boolean | optional | This option enable the `rtl` direction and act as rtl. By default it is `ltr`|
|`grid`| Object | Yes |**xs** - mobile, **sm** - tablet, **md** - desktop, **lg** - large desktops, **all** - fixed width (When you use **all** make others 0 and vise versa) |
182
+
|`slide`| number | optional | It is used to slide the number items on click |
183
+
|`speed`| milli seconds | optional | It is used for time taken to slide the number items |
184
+
|`interval`| milli seconds | optional | It is used to make carousel auto slide with given value. interval defines the interval between slides |
185
+
|`load`| number | optional | is used to load the items similar to pagination. the carousel will tigger the carouslLoad function to load another set of items. it will help you to improve the performance of the app.**`(carouselLoad)="myfunc($event)"`**|
186
+
|`point.visible`| boolean | optional | It is used to indicate no. of slides and also shows the current active slide. |
187
+
|`point.pointStyle`| string | optional | It is used to customize the point indicator. make sure your check the guide. |
188
+
|`point.hideOnSingleSlide`| boolean | optional | It is used to hide the point indicator when slide is less than one. |
189
+
|`touch`| boolean | optional | It is used to active touch support to the carousel. |
190
+
|`easing`| string | optional | It is used to define the easing style of the carousel. Only define the ease name without any timing like `ease`,`ease-in`|
191
+
|`loop`| boolean | optional | It is used to loop the `ngu-item | ngu-tile`. It must be true for `interval` |
192
+
|`animation`| string | optional | It is used to animate the sliding items. currently it only supports `lazy`. more coming soon and also with custom css animation option |
193
+
|`custom`| string | optional | It is you to define the purpose of the carousel. currently it only supports `banner`. more coming soon and also with custom css animation option |
194
+
|`RTL`| boolean | optional | This option enable the `rtl` direction and act as rtl. By default it is `ltr`|
195
+
|`vertical.enabled`| boolean | optional | This option enable the `vertical` direction |
196
+
|`vertical.height`| boolean | optional | This option is used to set the height of the carousel |
194
197
195
198
### Custom css for Point
196
199
@@ -203,33 +206,30 @@ export type Animate = 'lazy';
203
206
This is HTML I'm using in the carousel. Add your own css according to this elements in `pointStyles`. check below guide for more details.
204
207
205
208
```html
206
-
207
209
<ngu-carousel
208
210
[inputs]="carouselBanner"
209
211
(initData)="initDataFn($event)"
210
212
(onMove)="onmoveFn($event)"
211
213
(carouselLoad)="loadItemsFn()">
212
214
</ngu-carousel>
213
-
214
215
```
215
216
216
217
*`inputs` is an `Input` and It accepts `NguCarousel`.
217
218
*`initData` is an `Output` which triggered on carousel init and it emits token to exchange with service to contol the carousel.
218
219
*`onMove` is an `Output` which triggered on every slide before start and it will emit `$event` as `NguCarouselStore` object.
219
220
*`carouselLoad` is an `Output` which triggered when slide reaches the end on items based on inputs `load`.
0 commit comments