$("#myid").on("keyup", function(event){
if (event.which == 13) //... тут код отправки данных
});
import { Injectable } from '@angular/core';
import { Report } from '../models/report';
import { REPORTS } from '../reports-mock';
@Injectable({
providedIn: 'root',
})
export class ReportsService {
selectedReport: Report;
getReport(id: number): Report {
this.selectedReport = REPORTS.find(rep => rep.id === id);
return this.selectedReport;
}
constructor() { }
}
import { Injectable } from '@angular/core';
import { Report } from '../models/report';
import { REPORTS } from '../reports-mock';
@Injectable({
providedIn: 'root',
})
export class ReportsService {
selectedReport: Report;
getReportsList(): Report[] {
return REPORTS;
}
getReport(id: number): Report {
this.selectedReport = REPORTS.find(rep => rep.id === id);
return this.selectedReport;
}
constructor() { }
}
for (var i = 0; i < ints.length; i++) {
if (i <= ind) continue;
for (var i = ind+1; i < ints.length; i++) {
Если таких пар несколько, то возвращается та пара у которой индекс второго числа меньше
!true = false
!false = true
text = false
if(!text){
//Условие выполняется
}
!42 = false
!0 = true
!null = true
!"some text" = false
!"42" = false
!"0" = false