angular6

Angular 6 Reactive Form - Select options: disable previously selected options

老子叫甜甜 提交于 2019-12-11 05:19:41
问题 I have 3 dropdown menus that must have unique values (I am assigning network adapters here), so if one nic is selected in dropdown 1, it must be disabled in dropdowns 2 and 3. I have found this answer and a few other's, but I can't get them to work. component.ts nicAdapters: any[] = ['nic0','nic1','nic2','nic3','nic4','nic5','nic6','nic7','nic8','nic9','nic10'] this.inputForm = this.fb.group({ upLinks: this.fb.group ({ NumberUplinks: ['2'], uplinksMgmt: this.fb.group ({ uplink1: ['nic0'],

Stacked Column Highchart with Angular6 is not working

时光毁灭记忆、已成空白 提交于 2019-12-11 05:06:55
问题 I am trying to implement the stacked column chart for the first time with angular6 by following the Angular standard example from the link https://www.tutorialspoint.com/angular_highcharts/angular_highcharts_column_stacked.htm But this give me blank container on the web page. Is there anything needs to be added. Below I am attaching my html and ts files for reference. app.module.ts imports: [ ... HighchartsChartModule ], .HTML file <div id="container" style="min-width: 310px; height: 400px;

How to Change (Upgrade or Downgrade) Angular version?

梦想与她 提交于 2019-12-11 04:06:24
问题 I have recently installed Angular 6 and would like to go back to using Angular 5.2 How can I change my Angular version from whatever version I have to whichever one I choose? Answer: The version of angular used in a project is determined by the version of angular cli installed. any specific version of angular cli can be installed with the following command: npm install --global @angular/cli@x.x.x . example: npm install --global @angular/cli@1.6.6 even if you have another version of angular

Angular 6 to 7 upgrade resulting an error of missing startup module using lazy loading concept

↘锁芯ラ 提交于 2019-12-11 03:24:35
问题 UPDATE On my question I have added "BaseUrl": "./", to tsconfig.app.json and I got the following error: error TS5023: Unknown compiler option 'BaseUrl'. I think they mean in tsconfig.json and the baseUrl already added in. END of Update I updated my angular project to angular 7 using the following commands: npm install @angular/animations@latest @angular/common@latest @angular/compiler@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest

Angular 6 firebase snapshot returns undefined

感情迁移 提交于 2019-12-11 02:59:32
问题 I am uploading object to my database and then trying to retrieve all items. On the second step I get errors. : My object class : export class Data { $key: string; name: string; address: string; address2: string; pscode: string; ccode: string; name2: string; trucks: Trucks; trailers: Trailers; email: string; phone: string; city: string; country: string; } My service upload object (works fine) : busines = {} as Data; createItemAuth() { this.afDatabase.list(`users/${this.auth.userId}/company/`)

Angular 6 with ASP.NET Core, internal CMD not working properly

偶尔善良 提交于 2019-12-11 02:08:10
问题 Hello I have Angular 6 project with ASP.NET Core 2.0. backend. Working in Visual Studio. No server side rendering, just SPA. When i run my project (F5), ng serve command automatically called by .Net, code below. Produces new command line window, but it seems like the styles (line rewriting, text progress bars,...) not working. app.UseSpa(spa => { spa.Options.SourcePath = "ClientApp"; if (env.IsDevelopment()) { spa.UseAngularCliServer(npmScript: "start"); } }); Text stops rendering, but

Error: { Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'fontawesome-webfont.woff2'

女生的网名这么多〃 提交于 2019-12-11 01:58:36
问题 After searching a lot I'm still not able to fix this error in my SSR angular project: Node Express server listening on http://localhost:4000 ERROR Something went wrong please try again later! ERROR { Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'fontawesome-webfont.woff2' Error: Cannot match any routes. URL Segment: 'fontawesome-webfont.woff2' __zone_symbol__value: Error: Cannot match any routes. URL Segment: 'fontawesome-webfont.woff2' And a lot more of error

Access element over the router-outlet Angular 6

主宰稳场 提交于 2019-12-11 00:54:54
问题 <side-nav [navTitle]="navTitle"></side-nav> <router-outlet> </router-outlet> I have navigation bar at the root component. I created [navTitle] with @Input Decorator inside the side-nav component. side-nav component is placed in another component( root-component ). However I want access [navTitle] and change from component which loaded inside the router-outlet acording to which component is loaded. How do I achieve that? 回答1: You can't pass any data to router-outlet as to regular component (at

PrimeNg context menu passing data issue

℡╲_俬逩灬. 提交于 2019-12-10 23:36:23
问题 I am using PrimeNg's context menu v6.0.1, the problem is the documentation is not clear and I cannot find it over the web as well on how to pass data to command function e.g.: I have 10 objects rendered on screen and context menu is attached to all of these objects, now if I click on menu item I want to get the id of the target object on which the context menu is rendered, how can this be accomplished? <div id="block-container" *ngFor="let block of blocks"> <!-- where to attach this block

Angular6 universal giving continues Error on console

六月ゝ 毕业季﹏ 提交于 2019-12-10 21:07:31
问题 I am using angular 6 and implemented the angular universal for server side page rendering, Everything works fine but I am getting continues error in my console. ERROR [Error] ERROR [Error] And I have declared window as global variable still I am getting errors like this Unhandled Promise rejection: window.some_function is not a function my server.ts file // import 'zone.js/dist/zone-node'; import 'reflect-metadata'; import { enableProdMode } from '@angular/core'; import * as express from