Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ati
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amal
ati
Commits
e2f2856a
Commit
e2f2856a
authored
Sep 26, 2019
by
Adarsh K
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes
parent
6f7f32fe
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
carousel.component.ts
src/app/home/carousel/carousel.component.ts
+3
-1
carousel.scss
src/app/home/carousel/carousel.scss
+5
-0
offers.component.ts
src/app/home/offers/offers.component.ts
+5
-4
No files found.
src/app/home/carousel/carousel.component.ts
View file @
e2f2856a
// tslint:disable-next-line:max-line-length
import
{
AfterViewInit
,
Component
,
ContentChildren
,
Directive
,
ElementRef
,
Input
,
OnInit
,
QueryList
,
TemplateRef
,
ViewChild
,
ViewChildren
}
from
'@angular/core'
;
import
{
CarouselDirective
}
from
'./../../directives/carousel.directive'
;
import
{
animate
,
AnimationBuilder
,
AnimationFactory
,
AnimationPlayer
,
style
}
from
'@angular/animations'
;
...
...
@@ -23,7 +24,7 @@ export class CarouselComponent implements AfterViewInit {
private
player
:
AnimationPlayer
;
private
itemWidth
:
number
;
private
currentSlide
=
0
;
carouselWrapperStyle
=
{}
carouselWrapperStyle
=
{}
;
next
()
{
if
(
this
.
currentSlide
+
1
===
this
.
items
.
length
)
return
;
...
...
@@ -52,6 +53,7 @@ export class CarouselComponent implements AfterViewInit {
}
constructor
(
private
builder
:
AnimationBuilder
)
{
console
.
log
(
this
.
items
);
}
ngAfterViewInit
()
{
...
...
src/app/home/carousel/carousel.scss
View file @
e2f2856a
...
...
@@ -8,3 +8,7 @@
}
}
}
.carousel-inner
{
display
:
flex
;
}
\ No newline at end of file
src/app/home/offers/offers.component.ts
View file @
e2f2856a
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'offers'
,
...
...
@@ -7,13 +7,14 @@ import {Component,OnInit} from '@angular/core';
})
export
class
OffersComponent
{
items
=
[
items
:
any
;
ngOnInit
()
{
this
.
items
=
[
{
title
:
'Airfares starting at Rs. 899*'
,
desc
:
'Flights, 1080 Hotels, 410 Homestays,<br> Holiday Packages get 1080 Hotels, 410 Homestays..'
,
code
:
'AT 500'
},
{
title
:
'Airfares starting at Rs. 899*'
,
desc
:
'Flights, 1080 Hotels, 410 Homestays,<br> Holiday Packages get 1080 Hotels, 410 Homestays..'
,
code
:
'AT 500'
},
{
title
:
'Airfares starting at Rs. 899*'
,
desc
:
'Flights, 1080 Hotels, 410 Homestays,<br> Holiday Packages get 1080 Hotels, 410 Homestays..'
,
code
:
'AT 500'
},
]
ngOnInit
()
{
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment