Last active
December 18, 2023 09:45
-
-
Save shilpasyal55/fc6553a0c6976fd46f42b17468fb6676 to your computer and use it in GitHub Desktop.
Autocomplete app file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: ` | |
<div class="row"> | |
<div class="col-xl-4" style="position: relative; left: 33%;margin-top: 2%"> | |
<alert type="info" *ngIf="car"> | |
Your Selected Car: <strong>{{car}}</strong> | |
</alert> | |
</div> | |
<div class="col-xl-12" style="margin-top: 5%;"> | |
//Autocomplete Selector | |
<app-autocomplete (setcarNameEvent)="setCarName($event)"></app-autocomplete> | |
</div> | |
</div> | |
`, | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent { | |
car: string = ''; | |
setCarName($event) { | |
this.car = $event.name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
doesn't work out of the box. Is this part of bootstrap?
Could * be used?
*) https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog