I have a problem with using $ in constructor.
ngOnInit()
translate.instant etc.
here is my code:
declare var $: any;
{
var SelectedDevice = $("#select2-example-basic".val();
}
and here is what i got when I tried to run this code.
I do not know why I couldnt use $
in constructur ngOnInit
Translate.instant
etc. but it works in other functions , for instance: in
onClick(){
var infoDataTable = $('#basic-table').DataTable().page.info();
}
.. there is no error or fail...
and here is my html cod:
{{'Plate'|translate}} {{'Driver Name'|translate}} {{'Start Time'|translate}} {{'Starting Address'|translate}} {{'End Time'|translate}} {{'Ending Address'|translate}} {{'Work Duration'|translate}} {{'Distance'|translate}} {{item.Name}} {{item.DriverName}} {{item.StartTime | date:'dd.MM.yy hh:mm'}} {{item.StartAddress}} {{item.EndTime | date:'dd.MM.yy hh:mm'}} {{item.EndAddress}} {{item.RunningTime}} {{item.Km | distance}}
No comments:
Post a Comment