What I want to do i fairly simple and I apologize if it has been asked before but this is for a project due in a few days and I have been stuck on this very simple problem.
I have a forum component I am using from bootstrap and a link button. What I want to do is append a link with the user's input so their input will be sent to my python server and re render the page. ege "/bars/12345"
It works if I hard code in values to the URL in the href ege "12345" , but I am not able to extract user input from the forum I have used. Below is my code, many thanks!
<div class= "container">
<form id="login-form">
<div class="form-group">
<label for="bSearch">Search for Bar</label>
<input type="string" class="form-control" id="barSearch" aria-describedby="barHelp" placeholder="Enter number here ">
<small id="barHelp" class="form-text text-muted">Search for a bar by license #</small>
</div>
<a class="btn btn-primary" href="/bars/$('#login-form')[0].serialize()" role="button">Link</a>
</form>
</div>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-4">{{ barName }}</h1>
<p class="bar-details" *ngIf="barDetails">
{{ barDetails?.city }} <span *ngIf="barDetails.city && barDetails.license">|</span> {{ barDetails?.license }}
<br>
<span>License # </span> {{ barDetails?.license }}
</p>
</div>
</div>