Questions tagged [angular6]

Questions about Angular version 6, the web framework from Google. Use this tag for Angular questions which are specific to only version 6. Use tag Angular for any Angular questions which are not specific to an individual version.

Questions about Angular version 6, the web framework from Google.

You can read more about Angular version 6 here

You can find Angular version 6 official documents here

7869 questions
20
votes
7 answers

Angular 6 - run method in service every 10 seconds

I have this service using HttpClient to get some data : checkData() { return this.http.get('my url'); } The on the footer component I call it and display the result : ngOnInit() { this.myservice.checkdata().subscribe( result => {…
user9597092
19
votes
2 answers

mat-select display different value than mat-options selected value

I have a mat-select dropdown, here I am looping through my frequencyArr object. In ts frequencyArr = [ {key : "Once daily", abbriviation : '0-0-1'}, {key : "Twice daily", abbriviation : '1-0-1'}, {key : "Thrice daily", abbriviation : '1-1-1'}, {key…
Rahul Pandey
  • 435
  • 1
  • 3
  • 13
19
votes
4 answers

How to set default values in ng-select in angular6?

I am using angular6 multi-select which have a list of items coming in an array of objects from angular service on ngOnInit like this which is passing into multi-select : this.sensorTypes = [ { label : "Power", value : "P"}, { label : "Current",…
Fahad Subzwari
  • 2,109
  • 3
  • 24
  • 52
19
votes
2 answers

Is there a way to skip a unit test suite in Angular?

I have some unit test that should not be run, as of now, is there a way I can skip them? Other than using fdescribe on the ones I want to run.
matchifang
  • 5,190
  • 12
  • 47
  • 76
19
votes
3 answers

What is the point of import { DOCUMENT } from '@angular/common'; if I can already access the document

Why should we bother using import { DOCUMENT } from '@angular/common'? Even without it I can access the document module document.getElementById('TestID).focus() The only difference I see with the import is having it attached to this…
L1ghtk3ira
  • 3,021
  • 6
  • 31
  • 70
19
votes
2 answers

What is the "let-" attribute in Angular 6?

In the ng-bootstrap modal documentation there are uses of some kind of let-* attribute that seemed to be used to link a function or event for later use. If you look at the (click) events and the let-c / let-d attributes at the top of the examples,…
pbristow
  • 1,997
  • 4
  • 26
  • 46
19
votes
2 answers

Angular 6 [WDS] Disconnected Error on Firefox

I use Angular and i get console error only on Firefox "[WDS] Disconnected!". Here is my Angular-Cli version. Angular CLI: 6.0.1 Node: 8.11.1 OS: win32 x64 Angular: 6.0.1 ... cli, common, compiler, compiler-cli, core, forms, http ...…
mehmetdemiray
  • 976
  • 4
  • 13
  • 32
19
votes
4 answers

Multiple application under single project in Angular 6

How to create multiple application under single project in Angular 6? In new angular.json file, there is no "app":[] array, where before we used to create/add multiple applications manually. Also there is no proper documentation I found at this…
BhargavG
  • 896
  • 1
  • 6
  • 15
18
votes
3 answers

Share a angular library across multiple projects

I am working on a angular 7+ project which is composed of backend + frontend. Now i am shot with a requirement where i need to create one more project which comprises of frontend+backend. But there are some reusable frontend code that is present…
Vikhyath Maiya
  • 3,122
  • 3
  • 34
  • 68
18
votes
3 answers

How to create a Dictionary with Key/Value pairs in angular?

Using the concept Dictionary I want to do the following task. 1. Closed 2. Open 3. Cancelled 4. Rejected 5. Saved 6. Draft 7. Pending Approval This the different statuses . Now my table is like following Purchase Order Status PO1 …
Angel Reji
  • 533
  • 2
  • 11
  • 26
18
votes
4 answers

Angular Stepper with selectedIndex set matStepperNext/matStepperPrevious not working

Im using a matStepper and when i set the selectedIndex to 3 i cannot navigate using next and previous. i can click the (1) in the horizontal stepper and then use the next/prev as usual. All the forms are valid and i can navigate using next from 1-7…
18
votes
2 answers

Angular 6. Is it possible to inject service by condition?

In my angular app (with the angular material) I have a filter panel and I want besides select to be able to make autocomplete (user input value and it sends to the back-end, whereby $regexp query we find the match in MongoDB collection). But to do…
Alex Bryanskiy
  • 395
  • 1
  • 3
  • 19
18
votes
6 answers

Specified module does not exist Angular 6

Can you tell me why I cannot use below CLI? It says Specified module does not exist. Same error for both CLI commands. Note: I have upgraded this app from ng 5 to ng 6. Is that this error due to some issue on upgrading? ng generate component…
Sampath
  • 63,341
  • 64
  • 307
  • 441
18
votes
3 answers

Angular 6 - browser-crypto.js:3 Uncaught ReferenceError: global is not defined

I am implementing socketjs. however i have encountered below error. Below are the socket and stomp packages which i am using. import * as SockJS from 'sockjs-client'; import * as Stomp from 'stompjs/lib/stomp.js'; Thanks in Advance. Here is my…
Unicorn
  • 295
  • 3
  • 10
  • 24
18
votes
2 answers

Angular 6 i18n runtime translation support

I've read i18n runtime support is coming in angular 6, but cant find anything in rc3. Is it postponed or not yet documented? The i18n documentation still states than one have to build a separate build for each…
RockBop
  • 181
  • 1
  • 4