angular8

I want two tabsheet one vertical and other horizontal of angular material and make them work together

断了今生、忘了曾经 提交于 2021-01-29 05:10:31
问题 I have one requirement to have two tabsheets one will be vertical and other one will be horizontal. Just explaining my scenario lets assume we have numbers to be shown from 1 to 5. will show numbers 1 to 5 in vertical tab sheet as well as from horizontal tab sheet. So now comes the scenario which I want is that if one clicks on vertical tab that is number 2 (for example) the tab with the same number that is 2 must be selected in the horizontal tab. Hope I tried my level best to explain my

Property 'token' does not exist on type 'Object' - Angular 8

て烟熏妆下的殇ゞ 提交于 2021-01-28 21:56:00
问题 I am watching MEAN Stack - Mean Auth App Tutorial in Angular 2, since I am new to Angular and I'm using Angular 8, some of the codes is deprecated due to the new updates. So I have this code and I don't know how to fix it. This is my working code in Auth.service.ts There are no errors in this codes authenticateUser(user){ let headers = new HttpHeaders(); headers.append('Content-Type','application/json'); return this.http.post('http://localhost:3000/users/authenticate', user,{headers: headers}

Property 'token' does not exist on type 'Object' - Angular 8

一笑奈何 提交于 2021-01-28 21:47:32
问题 I am watching MEAN Stack - Mean Auth App Tutorial in Angular 2, since I am new to Angular and I'm using Angular 8, some of the codes is deprecated due to the new updates. So I have this code and I don't know how to fix it. This is my working code in Auth.service.ts There are no errors in this codes authenticateUser(user){ let headers = new HttpHeaders(); headers.append('Content-Type','application/json'); return this.http.post('http://localhost:3000/users/authenticate', user,{headers: headers}

Angular 8x - Directive dynamic parent not occupies the parent dimensions

こ雲淡風輕ζ 提交于 2021-01-28 02:42:02
问题 I am appending the component with dynamic element i create. it appending correctly. but the dynamic element is not resizing to component dimensions. as a general it's not aware of it's child. any one help me to fix this issue? here in the image, the red bordered element one is I am creating. but the width is not extended with component underneath. source code on browser: my directive: import { DOCUMENT } from "@angular/common"; import { Directive, ElementRef, EventEmitter, HostListener,

Angular 8x - Directive dynamic parent not occupies the parent dimensions

安稳与你 提交于 2021-01-27 22:06:50
问题 I am appending the component with dynamic element i create. it appending correctly. but the dynamic element is not resizing to component dimensions. as a general it's not aware of it's child. any one help me to fix this issue? here in the image, the red bordered element one is I am creating. but the width is not extended with component underneath. source code on browser: my directive: import { DOCUMENT } from "@angular/common"; import { Directive, ElementRef, EventEmitter, HostListener,

Angular 8 @HostListener('window:scroll', []) not working

我怕爱的太早我们不能终老 提交于 2021-01-26 17:59:39
问题 I have attempted to use HostListener to track the scroll position to change colour of the my header. My header component is as follows, import { Component, OnInit, Input, HostListener, Inject } from '@angular/core'; import { DOCUMENT } from '@angular/common'; @Component({ selector: 'app-header', templateUrl: './header.component.html', styleUrls: ['./header.component.scss'] }) export class HeaderComponent implements OnInit { constructor(@Inject(DOCUMENT) private document: Document) { }

Angular Tree Shaking: How exactly does it work?

吃可爱长大的小学妹 提交于 2021-01-22 04:54:25
问题 We are currently trying to optimize a complex angular application (performance & bundle size). We found that we have partially unused components, but we are not 100% sure about them. Anyway ... The question we are currently asking is how exactly does tree shaking work in Angular. Question 1) If there are entries inside the declarations, imports or providers array of a module, but the module is not used anywhere, are they also removed with tree shaking or are they included in the final bundle?

Angular Tree Shaking: How exactly does it work?

寵の児 提交于 2021-01-22 04:50:22
问题 We are currently trying to optimize a complex angular application (performance & bundle size). We found that we have partially unused components, but we are not 100% sure about them. Anyway ... The question we are currently asking is how exactly does tree shaking work in Angular. Question 1) If there are entries inside the declarations, imports or providers array of a module, but the module is not used anywhere, are they also removed with tree shaking or are they included in the final bundle?

npm run build:ssr does not work in angular 8

跟風遠走 提交于 2021-01-21 07:09:07
问题 I use angular 8 and server-side-rendering but i got error when i run npm run build:ssr As you can see, src is repeated twice home/app/front/**src/src**/main.server.ts I tried everything without success. I move main.server.ts and i created a new src but no succes. angular.json { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "front-end": { "root": "", "sourceRoot": "src", "projectType": "application", "prefix": "app",

how to stop differential build in angular 8?

ぃ、小莉子 提交于 2021-01-21 06:02:05
问题 Is there any options to prevent new feature of angular 8 to divide bundles for old browsers? Because it takes double time for build which is very long. 回答1: Check out the docs on differential build/loading: The Angular CLI handles differential loading for you as part of the build process for deployment. The ng build command produces the necessary bundles used for differential loading, based on your browser support requirements and compilation target. The Angular CLI uses two configurations