javascript - Property 'jumpservice' does not exist on type 'PaperDocuments' -


  • i new angular 2 , typescript.
  • i facing below erros in code.
  • i googled error , asked include import statements.
  • but still error not going.
  • can guys tell me how fix it.
  • providing code , error below.
  • am missing
  • i tried possible solutions
///<reference path="../../../assets/js/jquery/jquery.d.ts" /> import {ngmodule, custom_elements_schema,component, elementref, inject, oninit, viewchild} '@angular/core'; import {http,httpmodule, response,headers, requestoptions } '@angular/http'; import {kendogridcomponent} '../grid/grid.component'; //import { translateservice } '../../translate/translate.service'; import { sportsservice } '../../services/sports.service'; import {jumpservice} '../jump/jumpservice';   import { formsmodule }   '@angular/forms'; import {observable} 'rxjs/rx'; declare let $:any;    @component({     selector: 'paperdocuments',     template: `<div id="windowcontainer"></div>` })   export class paperdocuments {      @viewchild(kendogridcomponent) private gridmobile: kendogridcomponent;     private datasourceval;     private maingrid;     private grid;     private isvisible = false;     public togglecollapse : string;     private kpopupwindowviewhistory;     private filename;     private scrollclicked;     private dynamicnetwks;          /*localization*/     public show: string;     public all: string;     public entries: string;     public cancelbtn: string;     public okbtn: string;     public attachbtn:string;     public elfbtn: string;     public browsebtn:string;     public dragdrop: string;     public clearbtn:string;     public attachmenttype:string;     public fileselect:string;       private type = ["prm", "str","frt", "urban legends"];     private isdone: boolean = true     private filestoupload: array<file>;     private files = [];     private url = "http://localhost:3002/upload";     private dialogcommand;     public encodebase64:any;     public iscontractlocked=false;     private loggedusername;     private documenttype='';     public elfdocidtemp;     public openflag = false;     private selectedoptions;     //private fileselected = false;      private mobilecommand = {         edit: {           createat: "bottom"         },         group: true,         reorder: true,         resize: true,         sort: true,         autobind: false,         filter: {           mode: "menu"         },         pager: {           messages: {             display: "showing {0} {1} of {2} entries"           }         },         model: {},         columns: [],         pagesize: 50,         getcomponenturl: "jumps/v1/jumps/35355?includes=payments",         postcomponenturl: "jumps/v1/jumps/35355?includes=payments",         excelfileuidname: "viewpaymentexport",         islevels: false,         excelfilename: {           filename: "viewpaymentexport",           allpages: true         },         contextmenuid: "context-menuallocation",         navigate: false,         data: "",         mandatoryfields: [],         disablefreeze: true,         searchfields: [],         defaultsort: []      };      constructor(public sportsservice : sportsservice ){      }      ngoninit() {          this.documenttype='contract';         this.privilegesettings();          let that=this;           this.jumpservice.reloaddocumenteventreceived.subscribe(documents=>{                 that.documenttype="contract";                 $('.addelfdocumentform').hide();                 that.isdone = true;                 that.dragdrop= that.clearbtn;                 $("#attachdocumentbrowsebtn").val('');                 if(documents.isreload){                     this.mobilecommand.getcomponenturl='jumps/v1/jumps/'+documents.data+'?includes=documents';//                     that.gridmobile.getservicecall(documents.data);                  }else{                 that.rowdotmenuclick({"selectedmenuitem":"setdata","type":"normalservice","data":documents.data});                 }                        });           this.mobilecommand.model={                 id: "documentid",                 fields: {                     contextrow:{editable:false,filterable:true},                     docid:{editable:true,filterable:false,sortable:false},                     documentname: { editable: false, nullable: true },                     //elfdocid: { editable: false, nullable: true },                     elfdocid: {                      validation: {                          required: true,                         digits:true                                                                              }                                                                                                },                     url: { editable: false, nullable: true },                     documenttype: { editable: false, nullable: true },                     date: { editable: false, nullable: true }                 }         };            this.mobilecommand.columns=[                                 {                                      field: "contextrow", width: 25, title:" ",                                     template:""/*'<span class="contextmenurow" id="contextmenurowid"></span>'*//*"<span class='fa fa-file docicon' id='dcms'></span>"*/                                 },                                 {                                      field: "docid", width: 25, title:" ",sortable:false,                                     /*template:"<span class='documenticon displayinlineblock'></span>"/*,*/                                      template: function name(model) {                                         return that.imagetype(model);                                     },                                     editor:function (container,model){                                         that.doctemplateeditor(container,model,that);                                     }                                 }                             ];      }      privilegesettings():void{         let userprivilege = this.sportsservice.getuserprivilege({"parent":"contract management","child":"documents"})         if(userprivilege == "full"){             this.iscontractlocked = false;         }else{             this.iscontractlocked = true;         }     }      running(values):void{         let = this;         $("#windowcontainer").append(`<div class="allocationviewhistorypopupbox">              <div id="viewhistorypopupwindow" class="mobilepobupbox">                 <div class="row mobilepopupheader">                     <div class="mobilepopupheadertitlebox">                         <h4 class="">documents</h4>                     </div>                     <div class="mobilepopupheaderactionsbox">                         <button class="clearbtn triggerkpopupclickviewhistory" type="button" id="closepopup">close</button>                     </div>                 </div>                 <div class="clearfloat"></div>                  <div class="row mobilepopupgridcollection padbottom0imp">                     <div id="popup-loading"></div>                     <div class="col-xs-12 pad0imp borderhistorygridtop">                         <div id="viewhistorypopupgrid" class="kgridstaticfilter"></div>                     </div>                     <div class="clearfloat"></div>                 </div>                 <div class="clearfloat"></div>                  <label class="commonlink cursorpointer  valigntop lineheightinputs" (click)="browsebutton()" id="forattachdocumentbrowsebtn" [class.disabled]="iscontractlocked">browse{{browsebtn}}</label>             </div>                  </div>`);          let viewhistorypopupgrid =[];          that.datasourceval = new mobile.data.datasource( {             transport: {                 read: function(e) {                     e.success(viewhistorypopupgrid);                 }             },             sort: true,             group: [{field: values.group}]             //ignorecase: false //<--ignore casing stop applying .tolowercase()         //  filter: "gte" //<-- filter operator compliant `number` type         });          that.maingrid = {             datasource: that.datasourceval,             reorderable:true,             sortable: true,             filterable: {mode:"row, menu"},             databound:function(e){                let   griddatasource = e.sender.datasource;                console.log('history',e)                     if (griddatasource.group().length > 0) {                         $("#collapsebtn123").removeclass('actiondisabled')                     }else{                         that.togglecollapse="collapse all";                         $('#collapsebtn123').text(that.togglecollapse);                         $("#collapsebtn123").addclass('actiondisabled')                     }               },             groupable:true,             editable: false,             columns: values.columns,             pageable:{messages: {display: "showing {0} {1} of {2} entries"}},             pagesize:50,         };          that.kpopupwindowviewhistory = $("#viewhistorypopupwindow");          // $("#closepopup").click(function(){         //  that.closepopup();         //  console.log("click");         // });          // $("#collapsebtn123").click(function(){         //    that.collapsebtn();            // });          that.kpopupwindowviewhistory.mobilewindow({                         width: "80%",                         title: false,                         visible: true,                         resizable: false,                         actions: false,                         draggable: false,                         modal: true,                         ignorecase: false, //<--ignore casing stop applying .tolowercase()                         filter: "gte", //<-- filter operator compliant `number` type                         open:function(e) {                             let windowheight = $(window).outerheight();                             //let popupheight = $('.k-widget.k-window').outerheight();                             let popupheight = 500;                             console.log(windowheight, popupheight);                             if(popupheight < windowheight) {                                 $("html, body").css("overflow", "hidden");                             } else {                              }                         },                          close: function(e) {                              $("html, body").css("overflow", ""); that.isvisible=false;                          },                          deactivate: function() {                             this.destroy();                                console.log("deactivate call");                                                      }                          // closepopup: function() {                      //     this.kpopupwindowviewhistory.data("mobilewindow").close();                         // }          });          that.kpopupwindowviewhistory.data("mobilewindow").center();                  that.kpopupwindowviewhistory.data("mobilewindow").open();          $(".k-window").css("top", "15%");          // closepopup(): void {         //      //this.isvisible = false;         //      this.kpopupwindowviewhistory.data("mobilewindow").close();         //  }       }  }     -macbook-pro:webapp raj$ npm start  > sports@1.0.0 start /users/raj/desktop/nbc/webcomponent/src/main/webapp > tsc && concurrently "npm run tsc:w" "npm run lite"   app/components/skys/sky-documents.ts(129,8): error ts2339: property 'jumpservice' not exist on type 'paperdocuments'. app/components/skys/sky-documents.ts(140,10): error ts2339: property 'rowdotmenuclick' not exist on type 'paperdocuments'. app/components/skys/sky-documents.ts(200,23): error ts2339: property 'imagetype' not exist on type 'paperdocuments'. app/components/skys/sky-documents.ts(203,16): error ts2339: property 'doctemplateeditor' not exist on type 'paperdocuments'. app/components/skys/sky-documents.ts(211,28): error ts2339: property 'sportsservice' not exist on type 'paperdocuments'. npm err! code elifecycle npm err! errno 2 npm err! sports@1.0.0 start: `tsc && concurrently "npm run tsc:w" "npm run lite" ` npm err! exit status 2 npm err!  npm err! failed @ sports@1.0.0 start script. npm err! not problem npm. there additional logging output above.  npm err! complete log of run can found in: npm err!     /users/raj/.npm/_logs/2017-07-26t03_44_36_683z-debug.log 

you need inject jumpservice constructor

constructor(public sportsservice : sportsservice, private _jumpservice : jumpservice ){ } 

and use as,

this._jumpservice


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -