Skip to content

Commit 2fc176b

Browse files
committed
''
1 parent 644d01c commit 2fc176b

File tree

7 files changed

+372
-319
lines changed

7 files changed

+372
-319
lines changed
Lines changed: 47 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,58 @@
1-
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
2-
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap';
1+
import { Component, ViewChild, ViewEncapsulation } from "@angular/core";
2+
import { NgbTooltip } from "@ng-bootstrap/ng-bootstrap";
33

44
@Component({
5-
selector: 'app-ngbd-popover-tooltip',
6-
templateUrl: './popover-tooltip.component.html',
7-
encapsulation: ViewEncapsulation.None,
8-
styles: [
9-
`
10-
.card {
11-
overflow: hidden;
12-
}
13-
.my-custom-class {
14-
font-size: 125%;
15-
}
16-
.my-custom-class.tooltip > .tooltip-inner {
17-
background-color: darkgreen;
18-
}
19-
.my-custom-class.tooltip .arrow::before {
20-
border-top-color: darkgreen;
21-
}
22-
`
23-
]
5+
selector: "app-ngbd-popover-tooltip",
6+
templateUrl: "./popover-tooltip.component.html",
7+
encapsulation: ViewEncapsulation.None,
8+
styles: [
9+
`
10+
.card {
11+
overflow: hidden;
12+
}
13+
.my-custom-class {
14+
font-size: 125%;
15+
}
16+
.my-custom-class.tooltip > .tooltip-inner {
17+
background-color: darkgreen;
18+
}
19+
.my-custom-class.tooltip .arrow::before {
20+
border-top-color: darkgreen;
21+
}
22+
`,
23+
],
2424
})
2525
export class NgbdPopTooltipComponent {
26-
greeting:object = {};
26+
greeting: object = {};
2727

28-
name = 'World';
29-
lastShown: Date=new Date();
30-
lastHidden: Date=new Date();;
28+
name = "World";
29+
lastShown: Date = new Date();
30+
lastHidden: Date = new Date();
3131

32-
@ViewChild('p', { static: true }) public popover:any;
32+
@ViewChild("p", { static: true }) public popover: any;
3333

34-
public changeGreeting(greeting: NgbTooltip): void {
35-
debugger;
36-
const isOpen = this.popover.isOpen();
37-
this.popover.close();
38-
if (greeting !== this.greeting || !isOpen) {
39-
this.greeting = greeting;
40-
this.popover.open(greeting);
41-
}
42-
}
34+
public changeGreeting(greeting: NgbTooltip): void {
35+
const isOpen = this.popover.isOpen();
36+
this.popover.close();
37+
if (greeting !== this.greeting || !isOpen) {
38+
this.greeting = greeting;
39+
this.popover.open(greeting);
40+
}
41+
}
4342

44-
toggleWithGreeting(tooltip:NgbTooltip, greeting: string) {
45-
if (tooltip.isOpen()) {
46-
tooltip.close();
47-
} else {
48-
tooltip.open({ greeting });
49-
}
50-
}
43+
toggleWithGreeting(tooltip: NgbTooltip, greeting: string) {
44+
if (tooltip.isOpen()) {
45+
tooltip.close();
46+
} else {
47+
tooltip.open({ greeting });
48+
}
49+
}
5150

52-
recordShown() {
53-
this.lastShown = new Date();
54-
}
51+
recordShown() {
52+
this.lastShown = new Date();
53+
}
5554

56-
recordHidden() {
57-
this.lastHidden = new Date();
58-
}
55+
recordHidden() {
56+
this.lastHidden = new Date();
57+
}
5958
}
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { Component, TemplateRef } from '@angular/core';
2-
3-
import { ToastService } from './toast.service';
1+
import { Component, TemplateRef } from "@angular/core";
42

3+
import { ToastService } from "./toast.service";
54

65
@Component({
7-
selector: 'app-toasts',
6+
selector: "app-toasts",
87
template: `
98
<ngb-toast
109
*ngFor="let toast of toastService.toasts"
@@ -20,13 +19,12 @@ import { ToastService } from './toast.service';
2019
<ng-template #text>{{ toast.textOrTpl }}</ng-template>
2120
</ngb-toast>
2221
`,
23-
host: {'[class.ngb-toasts]': 'true'}
22+
host: { "[class.ngb-toasts]": "true" },
2423
})
2524
export class ToastsContainer {
2625
constructor(public toastService: ToastService) {}
2726

28-
isTemplate(toast:{title:string}) {
29-
debugger;
27+
isTemplate(toast: { title: string }) {
3028
return toast.title;
31-
}
29+
}
3230
}

angular-12/src/app/dashboard/dashboard.component.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!-- Sales chart -->
33
<!-- ============================================================== -->
44
<div class="row">
5-
<div class="col-md-8">
6-
<app-sales-summary></app-sales-summary>
7-
</div>
8-
<div class="col-md-4">
9-
<app-feeds></app-feeds>
10-
</div>
5+
<div class="col-lg-8">
6+
<app-sales-summary></app-sales-summary>
7+
</div>
8+
<div class="col-lg-4">
9+
<app-feeds></app-feeds>
10+
</div>
1111
</div>
1212
<!-- ============================================================== -->
1313
<!-- Sales chart -->
@@ -16,10 +16,10 @@
1616
<!-- Table -->
1717
<!-- ============================================================== -->
1818
<div class="row">
19-
<!-- column -->
20-
<div class="col-12">
21-
<app-top-selling></app-top-selling>
22-
</div>
19+
<!-- column -->
20+
<div class="col-12">
21+
<app-top-selling></app-top-selling>
22+
</div>
2323
</div>
2424
<!-- ============================================================== -->
2525
<!-- Table -->
@@ -28,15 +28,15 @@
2828
<!-- Recent comment and chats -->
2929
<!-- ============================================================== -->
3030
<div class="row">
31-
<!-- column -->
32-
<div class="col-lg-6">
33-
<app-recent-comments></app-recent-comments>
34-
</div>
35-
<!-- column -->
36-
<div class="col-lg-6">
37-
<app-temp-guide></app-temp-guide>
38-
</div>
31+
<!-- column -->
32+
<div class="col-lg-6">
33+
<app-recent-comments></app-recent-comments>
34+
</div>
35+
<!-- column -->
36+
<div class="col-lg-6">
37+
<app-temp-guide></app-temp-guide>
38+
</div>
3939
</div>
4040
<!-- ============================================================== -->
4141
<!-- Recent comment and chats -->
42-
<!-- ============================================================== -->
42+
<!-- ============================================================== -->

0 commit comments

Comments
 (0)