angular6

load drop down values alphabetic order angular 6

◇◆丶佛笑我妖孽 提交于 2020-08-26 09:27:23
问题 I am trying to load drop down with alphabetic order. currently i used unique value pipe for the drop down. how i add another pipe for get alphabetic order.. <select class="form-control fix-dropdown" required (change)="batchSorceList();" [ngClass]="{'is-invalid':glheaderform.submitted && orgname.invalid}" #orgname="ngModel" [(ngModel)]="orgNameModel.orgName" name="orgName"> <option value="undefined" disabled="true">--Select--</option> <option *ngFor="let bank of orgNameModel | unique ">{{bank

load drop down values alphabetic order angular 6

a 夏天 提交于 2020-08-26 09:27:14
问题 I am trying to load drop down with alphabetic order. currently i used unique value pipe for the drop down. how i add another pipe for get alphabetic order.. <select class="form-control fix-dropdown" required (change)="batchSorceList();" [ngClass]="{'is-invalid':glheaderform.submitted && orgname.invalid}" #orgname="ngModel" [(ngModel)]="orgNameModel.orgName" name="orgName"> <option value="undefined" disabled="true">--Select--</option> <option *ngFor="let bank of orgNameModel | unique ">{{bank

load drop down values alphabetic order angular 6

笑着哭i 提交于 2020-08-26 09:26:57
问题 I am trying to load drop down with alphabetic order. currently i used unique value pipe for the drop down. how i add another pipe for get alphabetic order.. <select class="form-control fix-dropdown" required (change)="batchSorceList();" [ngClass]="{'is-invalid':glheaderform.submitted && orgname.invalid}" #orgname="ngModel" [(ngModel)]="orgNameModel.orgName" name="orgName"> <option value="undefined" disabled="true">--Select--</option> <option *ngFor="let bank of orgNameModel | unique ">{{bank

ViewContainerRef is undefined when called in ngAfterViewInit

一个人想着一个人 提交于 2020-08-23 10:36:13
问题 I want to dynamically create a child component when the parent component is initialised, but when I tried to create it in ngAgterViewInit(), it throws the error that the ViewContainerRef is undefined. component.ts @ViewChild('container', {read: ViewContainerRef}) container: ViewContainerRef; constructor(private resolver: ComponentFactoryResolver) { } ngAfterViewInit(){ const factory = this.resolver.resolveComponentFactory(ChildComponent); this.container.createComponent(factory); //container

Angular 6 angular.json add ssl in configuration

空扰寡人 提交于 2020-08-23 04:03:38
问题 I want to serve my application though SSL previously I had this script: ng serve --ssl --ssl-key "pathtokey\key.crt" I want to add SSL in the new angular.json but when i try to add it i got the error: Schema validation failed with the following errors: Data path "" should NOT have additional properties(ssl). What is the proper way to use SSL with angular cli 6? 回答1: In angular.json: "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "app:build",

Angular 6 angular.json add ssl in configuration

青春壹個敷衍的年華 提交于 2020-08-23 04:03:14
问题 I want to serve my application though SSL previously I had this script: ng serve --ssl --ssl-key "pathtokey\key.crt" I want to add SSL in the new angular.json but when i try to add it i got the error: Schema validation failed with the following errors: Data path "" should NOT have additional properties(ssl). What is the proper way to use SSL with angular cli 6? 回答1: In angular.json: "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "app:build",

router.navigate is not working (Angular6, lazy loading)

被刻印的时光 ゝ 提交于 2020-08-22 11:46:13
问题 I'm a newbie for Angular 4+ (currently using v.6). I've been trying to use this.router.navigate(['/landing']) function to redirect from login component to landing component, it's not working properly. It will show the landing page for a sec then redirect back to login page again. But if I try to navigate through a normal link, for example, <a routerLink="/landing">landing</a> It work properly. Here is my app-routing.module.ts import { NgModule } from '@angular/core'; import { CommonModule }

router.navigate is not working (Angular6, lazy loading)

落花浮王杯 提交于 2020-08-22 11:43:18
问题 I'm a newbie for Angular 4+ (currently using v.6). I've been trying to use this.router.navigate(['/landing']) function to redirect from login component to landing component, it's not working properly. It will show the landing page for a sec then redirect back to login page again. But if I try to navigate through a normal link, for example, <a routerLink="/landing">landing</a> It work properly. Here is my app-routing.module.ts import { NgModule } from '@angular/core'; import { CommonModule }

replace \n with <br> tag angular 6

送分小仙女□ 提交于 2020-08-19 11:14:12
问题 i have rest api whit /n code, can angular 6 replace with <br> tag here's my code: {{x.deskripsi}} i try use https://www.npmjs.com/package/angular-nl2br-filter but i have no idea how to use with binding inside {{}} tag i try using this code <p ng-bind-html="x.deskripsi | nl2br"></p> but doesn't work any help? thanks before 回答1: You don't need a library. Simply set the white-space property of your tag to pre-wrap (or use a <pre> tag that should have this style by default) document.querySelector

How to use primeng dropdown?

北慕城南 提交于 2020-08-11 02:59:25
问题 I used the "select" for the dropdown. Below is the coding. <div class="ui-grid-col-6"> <div class="form-group"> <select name="status" formControlName="purchaseOrderStatusId"> <option>Select PurchaseOrderStatus</option> <option *ngFor="let PurchaseOrderStatus of allPurchaseOrderStatus" value="{{ PurchaseOrderStatus.id }}"> {{ PurchaseOrderStatus.code }} </option> </select> </div> </div> Here all values from the API are saved in the variable allPurchaseOrderStatus . And I want id as my stored