Skip to content
Loading
  • Laxmidhar Sahoo
    0
    hi
    I think itemToEdit.TemplateBody is a template that efine in angular js controller.
    please can you show me the itemToEdit.TemplateBody template where it is define
    Thanks and regards
    0
  • 0
    @laxmidhar
    My client side code is in angular (visual code) and server side code asp.net mvc 5.
    My template.html file is as follows
    1. class="form-group">  
    2.   
    3. "TemplateBody" name="TemplateBody" [width]='width' [height]='height' [(ngModel)]="itemToEdit.TemplateBody">  
      
  • My Typescript code template.component.ts
    1. import { Component, OnInit } from '@angular/core';  
    2. @Component({  
    3. selector: 'app-template',  
    4. templateUrl: './template.component.html',  
    5. styleUrls: ['./template.component.scss'],  
    6. animations: [routerTransition()]  
    7. })  
    8. export class TemplateComponent implements OnInit {  
    9. itemToEdit = {  
    10. 'TemplateBody' : '',  
    11. 'TemplateFooter': ''  
    12. };  
    13. }  
    my Templatebody is assigned to ngmodel as shown in html file. Whtever I type in rich text editor (id='TemplateBody') that gets assign to itemToEdit.TemplateBody
    0
  • Laxmidhar Sahoo
    0
    hi
     
    You should remove inner span tag
    itemToEdit.Templatebody = This is the best way  
    0