angular5

How to always open PrimeNg's p-calendar on today's date

流过昼夜 提交于 2020-01-16 19:58:06
问题 ''I am using PrimeNg's calendar in my Angular Application. I am using multiple selectionMode and binding the calendar to an array of dates from the database. The calendar starts on the latest date in the range from the database but I want it to always start off with today's date and then the user can navigate backwards and forwards to see the previously selected dates from the database. I set the defaultDate but it doesn't make any difference. Please help. Thanks, my html: <p-calendar [

how to show loader on each service call in angular [duplicate]

亡梦爱人 提交于 2020-01-16 19:48:46
问题 This question already has answers here : Angular 2 loader on each http request (4 answers) Closed 2 years ago . I want to show loader on each service call in angular. I am using ngx-loading. I have tried below code but it works only on route change, not getting the way to get it solved. import { LoadingModule, ANIMATION_TYPES } from 'ngx-loading'; <router-outlet (activate)="onActivate($event)"></router-outlet> <ngx-loading [show]="loading" [config]="{ backdropBorderRadius: '14px' }"></ngx

Highmaps chart is empty in Angular 5

不问归期 提交于 2020-01-16 07:33:00
问题 I have a component where I have to show high maps. No errors but the maps is always empty My chart options object : let chartData = [{ code3: "ABW", z: 105 }, { code3: "AFG", z: 35530 }]; this.chartConfigObject = new MapChart(<any>{ chart: { borderWidth: 1, map: 'custom/world' }, title: { text: 'World population 2013 by country' }, subtitle: { text: 'Demo of Highcharts map with bubbles' }, legend: { enabled: false }, mapNavigation: { enabled: true, buttonOptions: { verticalAlign: 'bottom' } }

Highmaps chart is empty in Angular 5

北城以北 提交于 2020-01-16 07:32:21
问题 I have a component where I have to show high maps. No errors but the maps is always empty My chart options object : let chartData = [{ code3: "ABW", z: 105 }, { code3: "AFG", z: 35530 }]; this.chartConfigObject = new MapChart(<any>{ chart: { borderWidth: 1, map: 'custom/world' }, title: { text: 'World population 2013 by country' }, subtitle: { text: 'Demo of Highcharts map with bubbles' }, legend: { enabled: false }, mapNavigation: { enabled: true, buttonOptions: { verticalAlign: 'bottom' } }

Custom NgbModal service to set default config on open does not find an entry component

扶醉桌前 提交于 2020-01-16 05:39:48
问题 I want all the modals in our application to have a set of default options, and not have to apply them individually each time a modal is opened. So I created a service that extends NgbModal so I could overwrite the open method since in NgBootstrap v1.1.2 there is no global config, but the entry component though listed in the feature module is not found. I'm wondering if the service being provided in /core doesn't see entry components loaded in a feature module? Using NgbModal directly the

Angular 5: Use ngClass to switch classes for mobile and desktop views

自闭症网瘾萝莉.ら 提交于 2020-01-15 10:46:08
问题 My application uses these classes: " large-screen " for desktop view and " small-screen " for mobile view. I am trying to use ngClass so I can switch between these classes in the container or wrapper div for various components but all of my implementations don't seem to work. Requirement is to switch to "large-screen" for desktop view and switch to "small-screen" for mobile view. Below are the media queries already in place. @media only screen and (max-width: 415px) { .large-screen { display:

Why am I obtaining this error trying to bind the properties from an Angular parent component to a child component?

爷,独闯天下 提交于 2020-01-15 10:37:28
问题 I am very new in Angular and I am finding some dificulties trying to add a component and use it into a project on which I am working on. I have a parent component view that contains thE referenceS to 2 child components, these one (used to show two different sidebar made using PrimeNG but I think taht it is not important): <mail-detail-sidebar *ngIf="visibleSidebar" [selectedMail]="selectedMail" [visibleSidebar]="visibleSidebar" (visibleSidebarEmitter)="visibleSidebarEmitter($event)"> </mail

Can we use multiple libraries in angular(2/4/5/6) because it supports TreeShaking ? Without hitting the performance and build size

你说的曾经没有我的故事 提交于 2020-01-15 09:42:08
问题 I have gone through this article : https://www.reddit.com/r/Angular2/comments/6a678s/primeng_vs_material2/ In the comment they mentioned we can use Prime Ng and Angular material together in app. In PrimeNg components are standalone modules mostly so you can add only the ones you need and same is true for Angular material after couple of updates. My question is... Can we use multiple number of libraries as many as we want with Angular app Like: PrimeNg, Angular material, Fuse and many more.

Implementation of Proxy Server in Angular4-5

懵懂的女人 提交于 2020-01-14 07:02:31
问题 Problem Statement: Client/UI developed using angular-cli and Angular-5, UI is running on http://localhost:4200 and we have back-end server running on http://localhost:8000 that means all api's called like http://localhost:8000/users/getuserinfo and returns some json data properly. Also having other routes like http://localhost:8000/student/getresult etc. So i have to create proxy for this as when i run ng serve my application open-up in browser on http://localhost:4200, but while making call

Parse JSON strnig from API in angular

随声附和 提交于 2020-01-13 19:00:32
问题 I have a API returning following data: [ { "id": 1, "symbol": "20MICRONS", "series": "EQ", "isin": "INE144J01027", "created_at": "2018-03-05 16:24:10", "updated_at": "2018-03-05 16:24:10" }, { "id": 2, "symbol": "3IINFOTECH", "series": "EQ", "isin": "INE748C01020", "created_at": "2018-03-05 16:24:10", "updated_at": "2018-03-05 16:24:10" }, { "id": 3, "symbol": "63MOONS", "series": "EQ", "isin": "INE111B01023", "created_at": "2018-03-05 16:24:10", "updated_at": "2018-03-05 16:24:10" }, { "id":