Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement