Tightening rules on code length
This commit is contained in:
parent
9f6a866b16
commit
9316e9a599
@ -4,8 +4,8 @@ import {MapComponent} from "./views/map/map.component";
|
|||||||
import {HomeComponent} from "./views/home/home.component";
|
import {HomeComponent} from "./views/home/home.component";
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{path: '', pathMatch: 'full', component: HomeComponent},
|
{path: ':id', component: MapComponent},
|
||||||
{path: '**', component: MapComponent}
|
{path: '**', pathMatch: 'full', component: HomeComponent},
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<form class="input-group">
|
<form class="input-group">
|
||||||
<input type="text" class="form-control" [(ngModel)]="code" name="code" placeholder="Code">
|
<input type="text" class="form-control" [(ngModel)]="code" name="code" placeholder="Code">
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button class="btn btn-danger" [routerLink]="['/', code]" style="background-color: #dd0330" [disabled]="code">Open</button>
|
<button class="btn btn-danger" [routerLink]="['/', code]" style="background-color: #dd0330" [disabled]="code.length != 8">Open</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,7 +10,7 @@ const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|||||||
styleUrls: ['home.component.scss']
|
styleUrls: ['home.component.scss']
|
||||||
})
|
})
|
||||||
export class HomeComponent {
|
export class HomeComponent {
|
||||||
code: string;
|
code: string = '';
|
||||||
|
|
||||||
constructor(private syncService: SyncService, private router: Router) { }
|
constructor(private syncService: SyncService, private router: Router) { }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user