Category : angular-components

I want to create a component decorator where inside it I create a class property which is tied to another decorator; in this case @ViewChildren. export function LazyLoader() { return (constructor: Function) => { /***/ Object.defineProperty(constructor, ‘lazyComponentDirectives’, { @ViewChildren()/*Some how*/ set(value) { /***/ }, }); /***/ }; } and its use @Component({/***/}) @LazyLoader class MyComponent ..

Read more

I’m trying to build a custom component for the Angular material daterangepicker. The problem i am stuck with is that a daterangepicker is used in a FormGroup like so: rangeControl: new FormGroup({ fromControl: new FormControl(”, Validators.required), toControl: new FormControl(new Date(), Validators.required) }) In my current situation i want to use it in the following nested ..

Read more

I work on angular 7 app that compare excel file uploaded with schema file excel I have I face issue I can’t display Not Match message when press button upload and excel Not match What I have tried: on component ts public uploadFile = (files) => { this._dataService.CompareExcel(this.selectedoptions.toString(),this.fileToUpload) .subscribe(resp => { if (resp) { console.log(‘Match’); ..

Read more

I have the following structure: In app-home I have several components that doesn’t get rendered, for instance a component named <app-insightchart [applicationId]="applicationId"></app-insightchart>. It isn’t created nor loaded (I’ve got a lot of console.logs to verify :)). The entire app-home HTML is loaded, but the components are not translated (their markup is untouched). Now, if I ..

Read more

I work on angular 7 I face issue I can’t call web API return Boolean from angular 7 so how call web API on angular 7 return true or false [HttpGet] [Route("CompareExcel/SelectedOptions")] public IActionResult CompareExcel( int SelectedOptions) { var DisplayFileName = Request.Form.Files[0]; string fileName = DisplayFileName.FileName.Replace(".xlsx", "-") + Guid.NewGuid().ToString() + ".xlsx"; string Month = DateTime.Now.Month.ToString(); ..

Read more

I am creating a table in angular using the following: ng g @angular/material:material-table –name=studentEntries It is imported in the corresponding places, but I get the following error: 1.If ‘student-entries’ is an Angular component, then verify that it is part of this module. 2. If ‘student-entries’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ ..

Read more

I am building a component that act as a dropdown list. Since this is meant to be used generally, I would like that any list of objects could be displayed with the dropdown. <dropdown [options]="list" [itemKey]="’itemkey’" [displayExpression]="Item no {{attr}}" (selectedItem)="getSelectedItem($event)"></dropdown> I know I could also pass a template, but I think that passing an expression ..

Read more