Skip to content

Commit

Permalink
set exact match for home page with empty route path.
Browse files Browse the repository at this point in the history
release v17.0.1
  • Loading branch information
changhuixu committed Jul 14, 2024
1 parent b718b49 commit eed93a1
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 42 deletions.
30 changes: 16 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"cSpell.words": [
"Changhui",
"depts",
"devkit",
"fontawesome",
"fortawesome",
"hawkid",
"packagr",
"submenu",
"toastr",
"Typeahead",
"uiowa",
"waitlist"
]
"cSpell.words": [
"Changhui",
"depts",
"devkit",
"dlrs",
"fontawesome",
"fortawesome",
"hawkid",
"packagr",
"submenu",
"toastr",
"Typeahead",
"uiowa",
"waitlist",
"waitlists"
]
}
2 changes: 1 addition & 1 deletion projects/uiowa/uiowa-header/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uiowa/uiowa-header",
"version": "17.0.0",
"version": "17.0.1",
"author": "Changhui Xu <[email protected]>",
"description": "An Angular library for uiowa website header, including an IOWA branding bar and a website nav bar.",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ <h1 class="site-name">
class="menu-item"
*ngFor="let item of internalRoutes; let i = index"
routerLinkActive="is-active"
[routerLinkActiveOptions]="{ exact: !item.route }"
>
<a
*ngIf="!item.subMenus"
Expand Down
4 changes: 0 additions & 4 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ import { RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: '',
redirectTo: 'home',
pathMatch: 'full',
},
{
path: 'home',
component: HomeComponent,
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ export class AppComponent implements OnInit {
];
applicationName = 'Awesome Application Name';
internalRoutes = [
new InternalRoute('Home', 'home'),
new InternalRoute('Home', ''),
new InternalRoute('Page with Tabs', 'page-with-tabs'),
new InternalRoute('Form Wizards', 'form-wizards'),
new InternalRoute('Dropdown Menus', '', [
new InternalRoute('Printing Orders', 'admin1/printingorders'),
new InternalRoute('Printing Orders', 'admin1/printingOrders'),
new InternalRoute('Wait List', 'admin1/waitlist'),
new InternalRoute('DLRS', 'admin1/dlrs'),
new InternalRoute('', ''),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
<div class="offer-card-footer d-flex justify-content-between">
<button
type="button"
class="btn btn-danger rounded-0"
class="btn btn-outline-danger rounded-0"
(click)="open(declineModal)"
>
Decline
</button>
<button
type="button"
class="btn btn-success rounded-0"
class="btn btn-outline-success rounded-0"
(click)="open(acceptModal)"
>
Accept
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'app-offer-card',
templateUrl: './offer-card.component.html',
styleUrls: ['./offer-card.component.css']
styleUrls: ['./offer-card.component.css'],
})
export class OfferCardComponent implements OnInit {
@Input() offer!: Offer;
Expand All @@ -14,11 +14,9 @@ export class OfferCardComponent implements OnInit {

ngOnInit() {}
open(content: any) {
this.modalService
.open(content, {
size: 'lg',
ariaLabelledBy: 'modal-title'
})
.result.then(_ => {}, _ => {});
this.modalService.open(content, {
size: 'lg',
ariaLabelledBy: 'modal-title',
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
</div>
</div>
<div class="waitlist-card-footer d-flex justify-content-center">
<button type="button" class="btn btn-danger rounded-0">Cancel Request</button>
<button type="button" class="btn btn-outline-danger rounded-0">
Cancel Request
</button>
</div>
</div>
22 changes: 11 additions & 11 deletions src/app/dropdown-menus/dropdown-menus-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,34 @@ const routes: Routes = [
{
path: '',
redirectTo: 'pendingReviews',
pathMatch: 'full'
pathMatch: 'full',
},
{
path: 'pendingReviews',
component: PendingReviewsComponent
component: PendingReviewsComponent,
},
{
path: 'dlrs',
component: DlrsComponent
component: DlrsComponent,
},
{
path: 'printingorders',
component: PrintingOrdersComponent
path: 'printingOrders',
component: PrintingOrdersComponent,
},
{
path: 'waitlist',
component: ParkingWaitlistComponent
component: ParkingWaitlistComponent,
},
{
path: 'my-waitlists',
component: WaitlistComponent
}
]
}
component: WaitlistComponent,
},
],
},
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
exports: [RouterModule],
})
export class DropdownMenusRoutingModule {}

0 comments on commit eed93a1

Please sign in to comment.