Questions tagged [angular]

Questions about Angular (not to be confused with AngularJS), the web framework from Google. Use this tag for Angular questions which are not specific to an individual version. For the older AngularJS (1.x) web framework, use the angularjs tag.

0
votes
0answers
4 views

Setting minimum Date on Angular validation

Hello guys I'm trying to make a minimum Date value in a Form. I'm using angular and for some reason that doesn't work I'll post my code: Component: minDate: Date; constructor(private auth: ...
-1
votes
0answers
7 views

Updating Angular 6.1.0 to latest (6.1.9)

This is a proper-way-to-do question! So I have an Angular 6 application generated via the ng-cli a moment ago: @angular/cli 6.2.1 (global) @angular/core 6.1.0 I tried using ng update @angular/core ...
0
votes
1answer
6 views

no access control allow origin in angular 4

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access. request = request.clone({ setHeaders: { ...
-1
votes
0answers
5 views

Map backend messages to frontend ones

I am trying to understand how to implement a mapping between backend messages and frontend displayed ones. The backend is build with Java 1.8 and Spring Boot 2.0. The frontend is build with Angular 5. ...
0
votes
0answers
9 views

Using Angular mat-datepicker, need to be able to dynamically format keyboard input

I'm using the Angular mat-datepicker and would like to be able to dynamically format keyboard input. If a user enters "10", I would display "10/". Then the next numbers would indicate the day, "10/21/"...
1
vote
0answers
9 views

Communicate React<->Angular Iframe

I know people will say don't do this or why use both.. but I have to. I need to pass data from React(child) to Angular (parent) to React(child) in an iframe. So far I can use window.postMessage ...
0
votes
1answer
13 views

Angular 1.7.2/Spring Boot - Infinite template loading when include navbar and footer

My project was migrated from Thymeleaf to Angular. Navbar and footer is being included from another files on all pages. What is interesting - navbar/footer works on most of pages, without Home Page, ...
0
votes
2answers
39 views

Angular adding a row dynamically

I am new to angular. I am trying to create a new row. I am trying to add a new objective in my form, which again has steps, when I create a new objective , then I go ahead and create a new step. but ...
0
votes
1answer
24 views

Angular detect if a popup window is opened

In my board (written in Angular 4), the dialogues are opened like below: Importing ActivatedRoute, Router import { ActivatedRoute, Router } from '@angular/router'; Adding Router and ActivatedRoute ...
0
votes
0answers
10 views

ngx-translate, is there a way to translate a string with multiple keys

If I have a translation file like: { "PRODUCT-NAME": "My Application", "WELCOME": "Welcome to" } Is there a way to get ngx translate to handle something like <p>{{ '{{WELCOME}} {{PRODUCT-...
1
vote
0answers
18 views

Is it possible to configure an Angular 6 build to output JS and CSS into separate subdirectories?

I have an Angular 6 application. i am using the --deploy-url flag to specify a CDN for all assets, JS and CSS (including thankfully the paths to embedded images in my style sheets). This is ...
0
votes
0answers
5 views

Ionic filetransfer.download does not return in build

I am developing an Ionic app for ios that includes a call to download a series of files to device storage. I am using FileTransfer.download which works via Ionic devapp but in the actual build it does ...
-1
votes
0answers
26 views

can't center a div inside another div in angular 6 [duplicate]

I know I'm not the first to ask this ,I have tried to center a div inside another div but is has been centered horizontally but not vertically. I have tried all the solutions which I have found in ...
0
votes
0answers
15 views

How to customize the options in angular-6 datatables?

I am working with angular-datatables. I have successfully configured the same with my angular application. I want to know a few options. On receiving no data on the tables i get an error message, "No ...
0
votes
0answers
15 views

Google Places API issue

So I have two Angular 6 projects with same directives I've wrote for google places API autocomplete the directive looks like this @Output() onSelect: EventEmitter<any> = new EventEmitter(); ...
0
votes
1answer
8 views

IONIC Search button displaying the list item but need to enable the selection as well

I am trying to provide a list for the Search option to auto complete, And the html element is as below <ion-searchbar [(ngModel)]="myInput" [showCancelButton]="shouldShowCancel" (ionInput)="...
0
votes
0answers
24 views

Angular takes URL parameters and write them in input field

I have a system where I have a change password component. The problem here is that my URL parameters from resetPW go into the first input field. when i load the page the params from reset goes into ...
0
votes
0answers
13 views

Angular App Not Working in IE11 Due to Animations class

I have a large Angular 6 application which works fine in all browser except IE11 and below. The debugger shows the error as being with this code in the vendor.js file class AnimationCurves I have ...
0
votes
3answers
23 views

Convert series of nested promises to @Effect

Is there a way to convert a set of nested async promises into an @Effect? I have a transaction that uses multiple async http calls where I have to wait for a result before going to the next step and ...
1
vote
3answers
43 views

Difference between [ngClass]=“computeClass()” and class=“{{computeClass()}}” in Angular 4

What is the difference when computing class using ngClass and directly computing class using the HTML class attribute in Angular 4. [ngClass]="computeClass()" and class="{{computeClass()}}" ...
0
votes
0answers
21 views

Angular ngmodel 2-way binding with pipes

Ok, So I have this: <div *ngFor="let f of fees"> <div style='float:left; width:9.3%; padding-right: 10px;'> <input [ngModel]="f.DESC|emptyObject" (ngModelChange)="f.DESC....
0
votes
0answers
16 views

Can't migrate Angular 4 project with ASP.NET Core backend to latest angular version in VS2017

I have only started working with Angular this year, and being experienced in .NET development, my backend is in ASP.NET Core. The Visual Studio 2017 template (not VS Code) worked fine for Angular 4, ...
1
vote
0answers
54 views

How to apply [ngClass] to :after of an element?

I am trying to modify existing code that styles a progress line to look a little like a London Underground map, with circles for each stop. The CSS is currently selecting the :after property of my &...
0
votes
1answer
27 views

CSS not applying when mat-expansion-panel-header is in child component

I have a component that uses MatExpansionPanel to display a list of products. I'm using some CSS to hide the overflow of the product's description. Please, see this stackblitz for the current looking....
0
votes
1answer
21 views

Ionic Popover button

I want to make a log out button at the end of the navbar. I made something like this: but I want to do like this:
0
votes
1answer
31 views

Angular 6 Build Error when i run “ng build --prod”

NG -V Angular CLI: 6.2.3 Node: 8.11.3 OS: darwin x64 Angular: 6.1.9 ... animations, common, compiler, core, forms, http ... platform-browser, platform-browser-dynamic, router Package ...
0
votes
1answer
22 views

How to get child injectors(services) list from a component in angular 4?

I have a component called Parent component and there is child component1 and child component2. Both child components extends parent component. I injected service A and service B to child component1 I ...
-3
votes
0answers
14 views

Facebook instant game using ANGULAR

the build project can't import a js file in index.html it always return a 404 message in facebook app. I Guest this is a issue with webpack but I'm not sure.
0
votes
0answers
23 views

Angular6 Using fetched config variable in module forRoot()

In my app I need to use ng-intercom https://github.com/CaliStyle/ng-intercom, which requires a config key to be set in forRoot() method. The config key is loaded from an API call, done in main.ts. ...
0
votes
2answers
35 views

Loading a page directly in Angular 6

I have an Angular 6 application with a component called assets. When I navigate to the component through routerLinks, the page load and shows data as expected: http://localhost:4200/assets/2 However ...
0
votes
2answers
18 views

Angular 6 - get file from disk

I have some files on my disc which I would like to download. Is it possible to do in a similar way which I want to do it? I attach example but I didn't work. ngOnInit() { this.fetchPlugin() } ...
0
votes
1answer
20 views

Angular 6: Provider, deps not initialized

i've got a problem while using a custom Provider in angular 6 in combination with ngx-envconfig. My custom provider looks like this: providers: [ { provide: LoggerConfig, useFactory: ...
-1
votes
4answers
32 views

Angular 6 - Validate and submit form from outside the form

<form [formGroup]="exampleForm" (ngSubmit)="onSubmit(exampleForm)"> ... </form> Here I'm using Angular 6 Reactive forms. So my outside button is, <button mat-icon-button type="submit"...
0
votes
1answer
24 views

What causes an Angular app to load it's components halfway through the page?

Context: I've been developing a portfolio page and wanted to put my knowledge of Angular to use. All was going fine on localhost but when I deployed, saw that the page would load mid-page. A better ...
0
votes
0answers
30 views

Can not deploy angular 6 app to github pages

When I try to deploy my angular-6 app to github pages I encounter the following error messages. I googled arounf for the remote-hhtps git command but can find any suitable solution for this. I build ...
-1
votes
0answers
26 views

Angular 2 with UI-Router: wait for async request and then init app/router

I need get some basic configuration from the server before anything in my app start to run I have tried to use APP_INITIALIZER but it works only with angular router I have seen that uirouter for ...
-1
votes
2answers
39 views

Serial api call in angular6

I have parent component with two child component. Every off child components have OnInit api call with some date that will show in that components. Can I call this api's serially? So first load api ...
-1
votes
1answer
36 views

Object inheritance in Typescript

I am trying to extend a class using typescript in angular and I am having this error: export class Product { constructor(public id?: number, public name?: string, public brand?: string, ...
2
votes
0answers
23 views

Ship external javascript library with own angular 6 component library

I am building an Angular 6 component library that will be published privately on Github. It's aim is to be used in several other projects. This means that this library will be installed via npm and ...
0
votes
2answers
52 views

Parse Array without key in nativescript-angular2

JsonStructure: { "share": [ { "id": "1", "name": "Denver", "address": [ "people" ], "iconUrl": "" ...
-1
votes
2answers
24 views

importing sass variables file in Angular components, what's the best way?

i created a _var.scss file in src/assets folder, i want to use these variables inside each component in the application, my question is that is it correct to import this file in every component? I ...
0
votes
1answer
42 views

Observable does not get a value in template

In my Angular component isLoading$ Observable depends on counter$ and defines is it data loading: export class MediaQueriesWidgetComponent implements OnChanges, OnDestroy { // ... some code ...
1
vote
4answers
53 views

How to clear an typed array in typescript and preserving its type?

Now in a class, I declared an array with type: CustomType, like below class Example { public exampleArray: CustomType[]; public clearArray() { this.exampleArray = []; } } As you can see ...
0
votes
1answer
17 views

Scroll to the last tab after adding a new tab in Angular Material Md-tabs

I have an implementation where I have the ability to add new md-tabs. The tabs are lying horizontally like a menu. When I click on the "add tab" button, the md-tabs should scroll to the last one(to ...
0
votes
2answers
42 views

Want to know from where the data is received : TypeScript

I want to know from where my data is coming from which class, from which method let's take an example like EditValue(data) { /* my operations */ } Now there are multiple classes in my project ...
0
votes
1answer
26 views

Create and insert data into Mongo database when npm install is run

I want to create a database and insert a collection of data. I'm using NodeJs and Mongodb with some help of Mongoose. I'm trying to run the script from the package.json in order to prevent the pain of ...
0
votes
1answer
28 views

Angular - How to access Map<K, V> values in DTO from JSON?

I have got 3 DTO-s inside eachother like this: export class firstDTO { public data: secondDTO; } export class secondDTO{ public data: Map<Color, thirdDTO>; } After I receive the JSON ...
1
vote
1answer
25 views

How to make angular material sidenav appear over main view?

I have an angular material sidenav, when I click menu icon, a sidenav opened on the left side but it pushes the main view but if I click the menu button it should open above the main view. I have ...
0
votes
0answers
6 views

AG-GRID implementation with server side rendering in Angular 6

I have implemented ag-grid in angular 6 and enabled server side rendering the sever hits the endpoint ,where the data is been stored but there is no response given to the frontend and there is no ...
1
vote
1answer
38 views

My ngIf Else is not working as expected in Angular 6

I have this code that should show the data when the variable blockusers is not empty (which works), but should show the Nought, nil, nada, nothing, zero, zilch and zip WHEN it is empty, which does not ...