angular8

Calling an Angular 8 WebAPI method to a contoller through a HTTPS GET link

早过忘川 提交于 2020-03-03 06:31:40
问题 I'm running an Angular 8 SPA application hosted on ASP.NET Core 3.1 hosted in IIS 10. I have a use case where the user of the application receives an email that contains an hyperlink to a Web API controller method. For instance: https://test.myapp.fr/api/ExternalCommands/ManageDati?a=C3hl5%2FMgXdldyX4ssmgyayMP3xE%2Bi%2 When this URL is used through an HTTP client (ARC in my case), it works. If it is used through the default browser, also hosting the SPA Application , it fails without reaching

Pass value between Grandchild component and Parent component

|▌冷眼眸甩不掉的悲伤 提交于 2020-02-27 13:52:23
问题 Using Angular 8 I have a few components as follows: Parent 1 > Child 1 > ... > N Grandchild 1 Parent 2 > Child 2 > ... > N Grandchild 2 Between Child X and N Grandchild X might have other components. So it can be more than 3 levels. Objective 1. Set a Value in N Grandchild 1 and use it in Parent 1 . 2. Set a Value in N Grandchild 2 and use it in Parent 2 . I am considering a few options: Using an EventEmitter (StackBlitz example) Problem: Not working between Grandchild and Parent. It seems to

Can't load angular generated webpage (ng build --prod)

怎甘沉沦 提交于 2020-02-26 02:43:09
问题 After deploying my angular app by using ' ng build --prod ' I tried to open index.html file and check my webapp. But it display nothing in chrome, firefox and edge web browsers. After I open console and checked whether is there are any errors, it will show me 6 error messages. I should mention that my app successfully compiled and worked on ' http://localhost:4200/ ' . After I tried another angular app(new one), but it comes withe same kind of errors after build. Errors: 1) Access to script

ng build throws Cannot read property 'startTag' of null exception

坚强是说给别人听的谎言 提交于 2020-02-25 07:12:17
问题 I want to publish my Angular 8 app to IIS. Then I've started to follow the deployment instructions. When I build my project on prod mode with base-href, operation throws an error. If I build in development mode(just ng build), there is no error but I have to build in production mode. --base-href causes the error. What can I do now? Here is error: Cannot read property 'startTag' of null TypeError: Cannot read property 'startTag' of null at Object.augmentIndexHtml (D:\ReklamUssuProjects

Uncaught ReferenceError: __importDefault is not defined

喜欢而已 提交于 2020-02-23 09:14:50
问题 I am new to angular. I encounter this error in my index.component.ts file. Uncaught ReferenceError: __importDefault is not defined Error screenshot attached 回答1: The following error is due to a bad version of typescript. You have to downgrade it. Uncaught ReferenceError: __importDefault is not defined Go to your package.json file and downgrade it to 3.5.3 : "devDependencies": { // ... "typescript": "3.5.3" } 回答2: I got this problem when upgrading from 8 to 9, thought it was a bug and even

Toggle Multiple Fields On/Off in Formbuilder, clean syntax in Angular?

冷暖自知 提交于 2020-02-14 02:06:57
问题 We have a Formbuilder with multiple fields. Sometimes, requirements want to toggle certain fields. We can turn them off with If statements validators, and use NgIf in the html. Is there an easy way to toggle multiple fields on a 20 field form, and simplify the syntax? Is it possible with Formbuilders, or do we have to transfer to form array? Syntax below seems repetitive, curious how it can be simplified, Currently, have around 20 flag fields. { this.customerForm = this.formBuilder.group({

Toggle Multiple Fields On/Off in Formbuilder, clean syntax in Angular?

℡╲_俬逩灬. 提交于 2020-02-14 02:06:29
问题 We have a Formbuilder with multiple fields. Sometimes, requirements want to toggle certain fields. We can turn them off with If statements validators, and use NgIf in the html. Is there an easy way to toggle multiple fields on a 20 field form, and simplify the syntax? Is it possible with Formbuilders, or do we have to transfer to form array? Syntax below seems repetitive, curious how it can be simplified, Currently, have around 20 flag fields. { this.customerForm = this.formBuilder.group({

Angular 8: Change Height in Mat-form-field to Specific pixel number

ε祈祈猫儿з 提交于 2020-02-02 13:07:26
问题 The bounty expires in 7 days . Answers to this question are eligible for a +50 reputation bounty. Artportraitdesign1 is looking for an answer from a reputable source . How can I change height in mat-form-field with appearance="outline" to a specific height pixel number, 40px (or any required number from UX team in the future). I need to reduce the mat-form-field. How can this be done? What is the equation, or which part number can be modified to change to 40px? -1.1? .75 , 133%, Looking for

Angular 8: Change Height in Mat-form-field to Specific pixel number

一笑奈何 提交于 2020-02-02 13:07:06
问题 The bounty expires in 7 days . Answers to this question are eligible for a +50 reputation bounty. Artportraitdesign1 is looking for an answer from a reputable source . How can I change height in mat-form-field with appearance="outline" to a specific height pixel number, 40px (or any required number from UX team in the future). I need to reduce the mat-form-field. How can this be done? What is the equation, or which part number can be modified to change to 40px? -1.1? .75 , 133%, Looking for

Angular application not loading with parameters when reloading with IIS URL Rewrite

感情迁移 提交于 2020-01-30 11:57:26
问题 I have an Angular 8 application configured in my local IIS. I have also installed and configured IIS URL Rewrite. The issue is that the application is loading fine if I access it from the start page. But if at any instance, I reload the application or if I try to access the inner pages using the URL, I get the following error. Please find my IIS URL Rewrite config below : <configuration> <system.webServer> <rewrite> <rules> <rule name="AngularJS Routes" stopProcessing="true"> <match url=".*"