InnerHTML on Ionic

0

Good afternoon,

I have a code which should generate an innerHTML in IONIC but IONIC when creating the tag it enters content example:

<ion-input class="incomesValue input input-md" placeholder="Ingreso 1" type="number" ng-reflect-placeholder="Ingreso 1" ng-reflect-type="number"><!--bindings={
  "ng-reflect-ng-if": "true"
}--><input class="text-input text-input-md ng-untouched ng-pristine ng-valid" ng-reflect-klass="text-input" ng-reflect-ng-class="text-input-md" ng-reflect-is-disabled="false" ng-reflect-model="" type="number" placeholder="Ingreso 1" min="undefined" max="undefined" step="undefined" ng-reflect-placeholder="Ingreso 1" ng-reflect-type="number" autocomplete="off" autocorrect="off"><!--bindings={
  "ng-reflect-ng-if": "false"
}--><!--bindings={
  "ng-reflect-ng-if": "true"
}--><input aria-hidden="true" next-input="" type="number"><button class="text-input-clear-icon disable-hover button button-md button-clear button-clear-md" clear="" ion-button="" type="button" ng-reflect-clear="" hidden=""><span class="button-inner"></span><div class="button-effect"></div></button><!--bindings={
  "ng-reflect-ng-if": "true"
}--><div class="input-cover" tappable=""></div></ion-input>

This appears:

<ion-input type="text" class="incomesDesc" placeholder="Descripción"></ion-input>

My javascript code:

function addRow(){
	var html_element = document.getElementById("newRowIncome");
	var htmlIncome = '<ion-row class="row">\n\
			<ion-col col-5>\n\
				<ion-input type="text" class="incomesDesc" placeholder="Descripción"></ion-input>\n\
			</ion-col>\n\
			<ion-col col-5>\n\
				<ion-input type="number" class="incomesValue" placeholder="Ingreso 1"></ion-input>\n\
			</ion-col>\n\
			<ion-col col-2>\n\
				<button ion-button item-right btn-md><ion-icon ios="ios-add" md="md-add"></ion-icon></button>\n\
			</ion-col>\n\
		</ion-row>';
	html_element.innerHTML = html_element.innerHTML + htmlIncome;
}

Thank you very much if anyone has any solution, regards.

    
asked by Andres Galeano 08.05.2017 в 22:05
source

0 answers