angular8

ControlValueAccessor with Error Validation in Angular Material

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-20 04:28:28
问题 I am trying to apply Error Validation style with ControlValueAccessor in custom Material Input Textbox. Ever since applying this custom component, all the red border validation status with formControlName/FormBuilders do not show, for required, minlength, etc. It worked natively (out of the box) with Angular Material textbox, until the custom control was applied. Goal is to have custom textbox working with Form validation. This showed naturally with matInput textbox. Update: Posted answer;

Several issues with angular formarray form such as input fields behaving inproperly , angular material not working

不羁岁月 提交于 2019-12-18 09:47:26
问题 I am using an angular formarray to store dynamic data in the database. But there are several issues with it such as input fields are taking only one digit at a time and angular material components not working on that page. The same code is working on other pages. If I remove formcontrolname from input fields, they are working fine. Any idea why this is happening? Thanks in advance Here is my code ts get vendor_mobile() { return this.purchaseform.get('vendor_mobile') } get product() { return

How to modify asp.net Identity UI for asp.net core WebAPI with angular

那年仲夏 提交于 2019-12-13 17:09:47
问题 I started learning .net core a few days ago and as a start, I created a .netcore project with an inbuilt angular 8 templates. It has a couple of pages built in angular, like counter and fetches data, etc, but all the Identity-related pages (login, registration, etc) are coming as a plain HTML from the backend. So "my main Concern is making some UI changes in that page". I found out that the identity has been added to the class library and hence not visible in the backend code. and In order to

downsides of using Ivy in Angular?

家住魔仙堡 提交于 2019-12-13 11:24:18
问题 Everyone is talking about Ivy for Angular compilation. All I have heard is good things about it. Are there any downsides? like something I should be aware of before using it? 回答1: https://is-angular-ivy-ready.firebaseapp.com/#/status It is still a beta product, it will be ready soon. You can try it but it is not recommended for production just yet. 回答2: Bundle sizes may be larger than without Ivy and strict template type checking may give you some problems. Those issues should be resolved in

redirectTo lazy module based on user role

◇◆丶佛笑我妖孽 提交于 2019-12-13 04:17:56
问题 In my angular 8 application, I have 3 lazy-loading modules. Each module is for a specific user's role. I'm using canActivate interface for Auth and Role Guard. For the following route { path : '' , pathMatch : 'full' , redirectTo : ''} how should I use redirectTo property, so it redirects to a lazyloaded route based on user role . This is the code for routing module. app.routing.module.ts import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; const

How to build a service that gets values async but also perfoms tasks on that data, like filtering?

白昼怎懂夜的黑 提交于 2019-12-13 03:54:19
问题 I have a service " provided in root " that: gets data once from an API should handle a mapping on that data should provide that data to other components if needed This data doesn't need to be reloaded throughout the lifecycle of the app. It's only reloaded when the user refreshes the browser. All of the data is going to be used at some point - so it makes no sense to make http requests on each getOneById() . A filter is faster in this case. The mockup of the service looks something like this:

Change detection doesnt work with file upload

孤者浪人 提交于 2019-12-13 03:48:58
问题 I have a Angular 8 application and I have a form. But I want to detect a change when a user selects a new image. But nothing happened Googled, following tutorials. So this is the html template file: <app-vital10-page [noTopBar]="true"> <div class="settings-account backslab"> <main class="settings-account-main"> <form class="form settings-account-form" *ngIf="profile" #form="ngForm" (ngSubmit)="save(form)" id="form-settings-account"> <h2 class="page-title settings-account-title">Account</h2>

I made a http post request in client side(angular 8) but getting undefined in server side(node.js)

时光总嘲笑我的痴心妄想 提交于 2019-12-13 03:48:33
问题 I am using angular 8 as front end framework, I was trying to do a http post request to send login details(object), which is not null or undefined, but on server side the request body of post is undefined. I am using nodejs on server side. client side-> service.ts: register( details:any){ const url="http://localhost:4000/register"; console.log(details); return this.http.post(url,details,httpOptions); } server side ->app.js: app.post('/register',cors(),function(req,res){ console.log(req.body);

How to set the sensitivity of Angular 8 wheel event?

给你一囗甜甜゛ 提交于 2019-12-13 03:32:28
问题 Going by this threat, I was able to set my app up so that it navigates when one scrolls. I have just one issue, information for which have not been able to find anywhere! How do I set the "sensitivity" of the scroll event? My issue is that often even with the slightest scroll , it navigates multiple routes rather than just giving me the next one. As you can see in the GIFF attached, this is with very light movement of my trackpad and it goes too fast from About to Tour to Gallery to all other

Form Validation Error Message Not Showing in reactive forms in angular 8

你。 提交于 2019-12-13 03:20:35
问题 Why is this form control error messages not showing I have an array and I'm reading it and generate dynamically questions. I can't find what is the mistake I have done in this code. I have to show 4 error messages Required Min value validate Max value validate Unique value validate I have an array which contains a question questions: any = [{ id: 13, surveyNo: 5, qNo: 3, question: 'Please rank the following features in order of importance,where 1 is the most important to you.?', qType: 3,