Skip to content

Commit

Permalink
Solved pagination showing in details
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisLeandro94 committed Jun 19, 2021
1 parent 8e14f45 commit 4f010f9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/navbar/navbar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h6 class="modal-title">Search Error</h6>
aria-label="pagination"
class="pagination"
[ngClass]="{ hidden: dataStore.Images.length == 0 }"
*ngIf="router.url != '/favorites'"
*ngIf="router.url != '/favorites' && !checkURL()"
>
<ul class="pagination">
<li class="page-item" [ngClass]="{ disabled: dataStore.Page == 1 }">
Expand Down
8 changes: 8 additions & 0 deletions src/app/navbar/navbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,12 @@ export class NavbarComponent implements OnInit {
this.dataStore.getSearch(this.searchInput, this.dataStore.PageSearch);
}
}

checkURL(): boolean {
if (this.router.url.includes('/images/')) {
return true;
} else {
return false;
}
}
}
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/>
<meta
name="keywords"
content="Image, Search, Angular, Unsplash, API, Navbar"
content="Image, Search, Angular, Unsplash, API, Data Store, HTTP Request"
/>
<meta name="author" content="Luis Leandro A20615" />
<title>ImageWizzard</title>
Expand Down

0 comments on commit 4f010f9

Please sign in to comment.