1st- solution ng-knob2
- lates update of ng-knob2 not support angular 4 and ionic3 also not support D3 version 4, the functions they are using in the D3 not exist any more .
- to make it run correctly with Angular4 and D3 version 4 check these commits 1st ng-knob2 fix - 2nd fix run the component
- after fix it show small compoent in the page but still it have issues .
- example screen shot from home page
2dn- solution jQuery-Knob
-
it works check this screen shot from list page ;
-
we can use jquery with anuglar2 but we have to handel data binidg manullay
-
any change in the JQ will affect the angular modle by this function
$(element).knob({ 'change' : ()=> { // this is JQ call back to update angular model this.value = element.value } });
-
any change in angular value should trigger change on JQ element
var newValue = this.value ; $(element) .val(newValue) .trigger('change');