I create content for .NET MVC. My work appears in the .NET MVC documentation site. I'm primarily responsible for the section that will help you learn C#.also Some Of Computer Technologie and Other Front-End Language Like Html Css And Java Scripts In Easier way eCommerce Web,Web Portal,Mobile App Website,One Page Website / Single Page
how to find duplicate item from array using multiple object keys in angular or javascript
angular form control and formarray sort using perticular key asc and desc
angular form control and formarray sort using perticular key asc and desc
how to convert json to xml in angular
how to convert json to xml in angular
var obj={'name':raj,'address':{'add':'skg'}}
and finally download json into file
How to convert xml to json in angular
How to convert xml to json in angular
How to create Textbox auto size and after type some line autometically added scroll and then remove text autometically becomes in previous state
How to create Textbox auto size and after type some line autometically added scroll
How to create Textbox auto size and after type some line autometically added scroll and then remove text autometically becomes in previous state
Code:-
How to Create Lowercase convert autometically in angular using directive (for textbox , text control)
How to Create Lowercase convert autometically in angular using directive
// Usage example: <input lowercasedirective />
How to auto load data on mat-select scroll (mat-select infinite scroll)
How to auto load data on mat-select scroll (mat-select infinite scroll)
step1 :Install plugins
npm i ng-mat-select-infinite-scroll
reference side:
https://dev.to/haidarz/adding-infinite-scroll-functionality-to-angular-material-select-component-1lho
step2:declare path
import { BehaviorSubject, Observable } from 'rxjs';
import { scan } from 'rxjs/operators';
step3:declare variables
limit = 10;
offset = 0;
options = new BehaviorSubject<string[]>([]);
options$: Observable<string[]>;
step4:call observable on constructor
this.options$ = this.options.asObservable().pipe(
scan((acc, curr) => {
return [...acc, ...curr];
}, [])
);
step5:call method when require for initialise like on init()
this.getTapCodeList();
step6:write defination of method
getNextBatch() {
const result = this.tapCodeList.slice(this.offset, this.offset + this.limit);
this.options.next(result);
this.offset += this.limit;
}
step7:api call for data
getTapCodeList(): Promise<any> {
return new Promise((resolve, reject) => {
const _tradingEntityID = this.newTradeIOTForm.get('TradingEntityID').value;
this.tadigcodeservice.getTadigCode(_tradingEntityID, '00000000-0000-0000-0000-000000000000', 'All', this.userId)
.then(res => {
const _tempData = res.result.AllTadigCode;
if (_tempData) {
this.tapCodeList = _tempData.map(function (ele) {
return { 'TadigId': ele.TadigId, 'TadigCode': ele.TadigCode };
});
}
this.getNextBatch();
})
.catch(error => {
this.loggerService.error(error);
});
this.counterPartyList = [];
return resolve(this.tapCodeList);
});
}
step 8: html side changes
<div class="full-width space-grp ">
<mat-form-field class="full-width">
<mat-select msInfiniteScroll (infiniteScroll)="getNextBatch()" multiple
formControlName="CounterPartyTapCode" [complete]="offset === data?.length"
(selectionChange)="changeTapCode($event, true)">
<mat-option *ngFor="let option of options$ | async" [value]="option.TadigId">
{{option.TadigCode}}</mat-option>
</mat-select>
<mat-placeholder>Select TAP Code<span class="raw-red">*</span>
</mat-placeholder>
</mat-form-field>
</div>
'ng' is not recognized as an internal or external command/angular cli ng commands not working
'ng' is not recognized as an internal or external command / angular cli ng commands not working
Featured Post
how to find n number of nodes have child or cildren
how to find n number of nodes have child or cildren for that we use recursive function const data = { 'id' : '0' ,...

Popular Posts
-
how to post formdata or http.context.form data from angular 6 to asp.net mvc web api or api using Token based authentication with header ...
-
How To Design Certificate using Html CSS And Format for print landscape and portrait Mode page Design OUTPUT:- HTML AND CSS...
-
How To Get IP Address And MAC Address Using c# , Aps.net MVC public ActionResult Index() { var IP = GetUser_IP(); ...
-
How to Create xml file and download it or convert into base64 string 1).First Install Following packages from Node m...
-
Using Angular in ASP.NET MVC 5 with Angular CLI and Visual Studio 2017 Angular is one of most in-demand web front-end fram...
-
How to auto load data on mat-select scroll (mat-select infinite scroll) step1 :Install plugins npm i ng-mat-select-infinite-scroll refere...