| Name | Type | Default |
|
count
# |
Number
|
5
|
Sets or gets the count property.
import { Component } from '@angular/core';
import { jqxRatingModule } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35" [count]="8"> </jqxRating> `
})
export class App {}
|
|
disabled
# |
Boolean
|
false
|
Sets or gets the disabled property.
import { Component } from '@angular/core';
import { jqxRatingModule } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35" [disabled]="true"> </jqxRating> `
})
export class App {}
|
|
height
# |
String | Number
|
auto
|
Sets or gets the height property.
import { Component } from '@angular/core';
import { jqxRatingModule } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35"> </jqxRating> `
})
export class App {}
|
|
itemHeight
# |
Number
|
auto
|
Sets or gets the itemHeight property.
import { Component } from '@angular/core';
import { jqxRatingModule } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35" [itemHeight]="30"> </jqxRating> `
})
export class App {}
|
|
itemWidth
# |
Number
|
auto
|
Sets or gets the itemWidth property.
import { Component } from '@angular/core';
import { jqxRatingModule } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35" [itemWidth]="20"> </jqxRating> `
})
export class App {}
|
|
precision
# |
Number
|
1
|
Sets or gets the precision property.
import { Component } from '@angular/core';
import { jqxRatingModule } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35" [precision]="0.5"> </jqxRating> `
})
export class App {}
|
|
singleVote
# |
Boolean
|
false
|
Sets or gets the singleVote property.
import { Component } from '@angular/core';
import { jqxRatingModule } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35" [singleVote]="true"> </jqxRating> `
})
export class App {}
|
|
theme
# |
String
|
''
|
import { Component, viewChild } from '@angular/core';
import { jqxRatingComponent, jqxRatingModule } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: `<jqxRating #myRating [theme]="'material'"> </jqxRating>`,
styles: [``]
})
export class App {
readonly myRating = viewChild.required<jqxRatingComponent>('myRating');
}
|
|
value
# |
Number
|
0
|
Sets or gets the value property.
import { Component } from '@angular/core';
import { jqxRatingModule } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35" [value]="3"> </jqxRating> `
})
export class App {}
|
|
width
# |
String | Number
|
auto
|
Sets or gets the width property.
import { Component } from '@angular/core';
import { jqxRatingModule } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35"> </jqxRating> `
})
export class App {}
|
|
|
|
change
# |
Event
|
|
The change event is triggered when the rating is changed.
Code examples #
Bind to the change event of jqxRating.
import { Component } from '@angular/core';
import { jqxRatingModule } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: `
<jqxRating #myRating(onChange)="Change($event)" [width]="350" [height]="35"> </jqxRating>
`
})
export class App {
Change(event: any): void {
// Do Something
}
}
|
|
|
| Name | Return Type | Arguments |
|
disable
# |
Void
|
None
|
import { Component, AfterViewInit, viewChild } from '@angular/core';
import { jqxRatingModule, jqxRatingComponent } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35"> </jqxRating> `
})
export class App implements AfterViewInit {
readonly myRating = viewChild.required<jqxRatingComponent>('myRating');
ngAfterViewInit(): void {
this.myRating().disable();
}
}
|
|
enable
# |
Void
|
None
|
import { Component, AfterViewInit, viewChild } from '@angular/core';
import { jqxRatingModule, jqxRatingComponent } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35"> </jqxRating> `
})
export class App implements AfterViewInit {
readonly myRating = viewChild.required<jqxRatingComponent>('myRating');
ngAfterViewInit(): void {
this.myRating().enable();
}
}
|
|
getValue
# |
Number
|
None
|
import { Component, AfterViewInit, viewChild } from '@angular/core';
import { jqxRatingModule, jqxRatingComponent } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35"> </jqxRating> `
})
export class App implements AfterViewInit {
readonly myRating = viewChild.required<jqxRatingComponent>('myRating');
ngAfterViewInit(): void {
let value = this.myRating().getValue();
}
}
|
|
setValue
# |
Void
|
value: Number
|
import { Component, AfterViewInit, viewChild } from '@angular/core';
import { jqxRatingModule, jqxRatingComponent } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35"> </jqxRating> `
})
export class App implements AfterViewInit {
readonly myRating = viewChild.required<jqxRatingComponent>('myRating');
ngAfterViewInit(): void {
this.myRating().setValue(20);
}
}
|
|
val
# |
Number
|
value: Number
|
import { Component, AfterViewInit, viewChild } from '@angular/core';
import { jqxRatingModule, jqxRatingComponent } from 'jqwidgets-ng/jqxrating';
@Component({
selector: 'app-root',
imports: [jqxRatingModule],
template: ` <jqxRating #myRating [width]="350" [height]="35"> </jqxRating> `
})
export class App implements AfterViewInit {
readonly myRating = viewChild.required<jqxRatingComponent>('myRating');
ngAfterViewInit(): void {
let value = this.myRating().val();
}
}
|