angular7

Angular 7 “expected 'styles' to be an array of strings”

半城伤御伤魂 提交于 2020-02-01 15:45:48
问题 I am trying to run my server and have my app.component.html load on localhost:8000. Instead, I am receiving this error compiler.js:7992 Uncaught Error: Expected 'styles' to be an array of strings. at assertArrayOfStrings (compiler.js:7992) at >CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.j>s.CompileMetadataResolver.getNonNormalizedDirectiveMetadata >>(compiler.js:17325) at >CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.j>s

Angular-material - animation and position is not displaying correct

岁酱吖の 提交于 2020-01-25 12:54:26
问题 I am trying trying to open and animate from top and close as well correctly (same behaviour as it have from bottom for opening and closing), but unable to do so in angular-material. It should only close on the click of close button and with nothing else actions and how to Get the selected chip value on every click in ts method. Any other way to achieve the goal ie to get a top-sheet like we have bottom-sheet is also welcomed. https://stackblitz.com/edit/angular-fkfckf-twerla?file=app%2Fbottom

Angular-material - animation and position is not displaying correct

故事扮演 提交于 2020-01-25 12:53:20
问题 I am trying trying to open and animate from top and close as well correctly (same behaviour as it have from bottom for opening and closing), but unable to do so in angular-material. It should only close on the click of close button and with nothing else actions and how to Get the selected chip value on every click in ts method. Any other way to achieve the goal ie to get a top-sheet like we have bottom-sheet is also welcomed. https://stackblitz.com/edit/angular-fkfckf-twerla?file=app%2Fbottom

How to send Multiple Http request sequentially in Angular

北战南征 提交于 2020-01-25 10:10:32
问题 I have written below code to call an API each time before post request happens, First API gets called and the second one is not getting called public post(postUrl: string, model: any): Observable<any> { return this.validateTokenStatus().pipe(map(response => { console.log('response', response); // if (response) { console.log('response2', response); const url = `${environment.webApiUrl}/${postUrl}`; this.spinnerService.start(); console.log('response21', response); return this._http.post(url,

How to send Multiple Http request sequentially in Angular

心不动则不痛 提交于 2020-01-25 10:10:02
问题 I have written below code to call an API each time before post request happens, First API gets called and the second one is not getting called public post(postUrl: string, model: any): Observable<any> { return this.validateTokenStatus().pipe(map(response => { console.log('response', response); // if (response) { console.log('response2', response); const url = `${environment.webApiUrl}/${postUrl}`; this.spinnerService.start(); console.log('response21', response); return this._http.post(url,

Angular - Update html attribute in root index.html

馋奶兔 提交于 2020-01-24 01:28:19
问题 I have following content in my index.html <!doctype html> <html dir="ltr" lang="en"> <head> <meta charset="utf-8"> <title>Halls Gate</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/png" href="assets/img/favicon.png"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Istok+Web" rel="stylesheet"> </head> <body> <app

how to use locale in fullcalendar in angular 7

走远了吗. 提交于 2020-01-23 12:32:46
问题 I need to change the language of my calendar in the angular version 7. I have not found much documentation about this. The main thing is to change the language of the days that appear on the calendar. !-- begin snippet: js hide: false console: true babel: false --> import { Component, OnInit, ViewChild } from '@angular/core'; import { CalendarComponent } from 'ng-fullcalendar'; import { Options } from 'fullcalendar'; @Component({ selector: 'app-calendario', templateUrl: './calendario

how to use locale in fullcalendar in angular 7

牧云@^-^@ 提交于 2020-01-23 12:31:46
问题 I need to change the language of my calendar in the angular version 7. I have not found much documentation about this. The main thing is to change the language of the days that appear on the calendar. !-- begin snippet: js hide: false console: true babel: false --> import { Component, OnInit, ViewChild } from '@angular/core'; import { CalendarComponent } from 'ng-fullcalendar'; import { Options } from 'fullcalendar'; @Component({ selector: 'app-calendario', templateUrl: './calendario

Angular 7 Communication through service subscribe method called twice

不问归期 提交于 2020-01-22 02:16:06
问题 I'm using angular, trying to communicate to a component that is not parent-child. So I'm communicating it through service service.ts Istoggle=false; @Output() change: EventEmitter < boolean > = new EventEmitter(); toggle() { this.Istoggle= !this.Istoggle; this.toggle.emit(this.Istoggle); } search.ts submit():void{ this.service.toggle(); } Home.ts ngOnInit() { this.service.change.subscribe(_toggle=> { //some code here } } so when I click on submit in Home component toggle subscribe get hit

Issue after upgrading Angular 4 to angular 8

梦想与她 提交于 2020-01-22 01:24:31
问题 Currently I am using Angular 4 in my application with system.js. Now I am updating it to Angular 8. For that I follow below 2 links: upgrade angular 4 project to angular 6 https://www.talkingdotnet.com/upgrade-angular-4-app-angular-5-visual-studio-2017/ I did below changes : Updated all packages in package.json http to httpclient httpmodule to httpclientmodule http request (map.json) rxjs changes When I run application after all changes and I am getting below error: Uncaught SyntaxError: