typescript - How get the correct form of code html with (Input...) angular2 -
i need code input [input] , tag #tag
because when try code html jquery console.log($("#content")[0].outerhtml);
for exemple part of code become
<div dnd-droppable [dropzones]="['docgrid']" (ondropsuccess)="transferdatasuccess()" class="page" id="content" size="a5" layout="portrait" > <div #content hidden></div> </div>
like this
<div _ngcontent-ugk-10="" class="page" dnd-droppable="" id="content" layout="portrait" size="a5" ng-reflect-dropzones="docgrid"> <div _ngcontent-ugk-10="" hidden=""></div> </div>
i need come wrote in ide thanks
there no way of doing that, can inline template of component
. cannot alter it. inline template (and when there 1 annotation on component) can use:
reflect.getmetadata('annotations', componentclass)[0].template;
for instance if have appcomponent
:
@component({ selector : 'app', template : '<div>hi</div>' }) export class appcomponent { constructor() { console.log(reflect.getmetadata('annotations', appcomponent)[0].template;) //<div>hi</div> } }
Comments
Post a Comment