All Questions
Tagged with knockout.js typescript
364
questions
0
votes
0
answers
31
views
Cast a string name to model name which already exists in knockout JS
I am working on a dynamic validation setting in Knockout JS. I blocked by one scenario, I am getting viewmodel name as string from db with control id. This model name is a string name like “testModel....
0
votes
0
answers
76
views
Knockout extenders
I have the following extender below and I am trying to use it in typescript and I'm getting the error listed.
I have searched through so alot of documentation and this seems to be the way it should be ...
0
votes
0
answers
83
views
Knockout Typescript bind action of dxValidator.validationRules.validationCallback for multiple values
I have 3 dxNumberBox max,min and average and a next button as :
<div class="flex-row">
<div class="flex-item-left">
<div data-...
0
votes
1
answer
38
views
Knockout Foreach creating duplicate items
On our UI, we have classrooms that are eligible for assessments. After creating and adding in eligibleclassrooms, I am getting duplicates of each classroom type. The expected output is one of each ...
0
votes
1
answer
41
views
Disable a textarea in a for loop of textareas using JQuery/Typescript and KnockoutJS
So I have a for loop that will display a list of textareas. Each has a unique id using the KO data-binding attribute, but they all have the same name. What I want to do is use Jquery to either check ...
2
votes
1
answer
408
views
How to get the value from DB based on the user input using Typescript
I need to get the value from Database based on the user input.
Please find below snapshot of the DB.
I have dropdown in my frontend which display the (Name) from the database, I need to get the ...
1
vote
1
answer
106
views
Unwrap Typescript fields in Knockout
I have a domain class, with all the fields being primitives, string, number or boolean. For simplicity, let's work with a bike:
interface Bike {
wheels: number;
isMTB: boolean;
brand: string;
}
...
0
votes
1
answer
45
views
Can't access knockout observable inside confirmation method
I have a bootstrap confirmation that I display to the user. Once the confirmation is clicked I'd like to access the observable array (this.parameters() )that is within the same class under onCancel ...
0
votes
1
answer
58
views
Is there any way to replace the json filter with dynamic variable value using typescript code
I have a json filter in which firmwareversion value needs to be replaced with dynamic value. Below is my code:
//JSON filter
this.comX200FilterValue = '{ "deviceType": "ComX", &...
3
votes
0
answers
230
views
How to get the each array value in the switch case using typescript
I want get the value of each object in my switch case, based on the value i get in the case, I need to return some statements; Below is my code what I have tried:
// Here I will get the list of ...
1
vote
1
answer
132
views
Data bind click even pass current object to parameter
I am looping through objects and I want to send only current object when clicked.
<div class="box" data-bind="foreach: contacts">
<div class="contact LightGray-background"&...
0
votes
1
answer
33
views
knockout foreach is not working for objects in Array
I have an array that has a list of objects and I am trying to loop through it but it seems to not working.
<!-- ko foreach: applicationsAndProducts -->
<p>Apps and ...
0
votes
1
answer
2k
views
oj-bind-text and oj-bind-if return the same value even if I use not operator
Currently I have a web app using Oracle Jet and knockout js, I am using oj-bind-if to show some html code but I have noticed that the following sentence:
<oj-bind-text value="[[presenter....
0
votes
0
answers
3k
views
TS1108 (TS) A 'return' statement can only be used within a function body - knockout js, durandal, typescript
I've been tasked with updating an application that was written in 2015. It hasn't been touched since then. I pulled the Solution into VS 2019 and after figuring out a new NuGet errors and modifying ...
0
votes
1
answer
95
views
How to use field value from subclass in overloaded function in constructor
The problem can be illustrated in this code:
class A
{
public readonly x;
constructor()
{
this.x = this.getX();
}
protected getX()
{
return "X";
...