Newest 'angular2' Questions

Q&A for professional and enthusiast programmers

After angular 4 release, how to create specific angular 2.4 version app using angular cli

Angular 4 has released, I want to learn angular 2 first. For that i tried to use angular CLI, but when i create new app using ng new test-app It creates the app the angular 4 version. Which command ...

Will upgrading angular v2 to v4 cause any issues with 3rd party plugins?

Upgrading an existing angular v2 application which is using many 3rd party plugins/libraries. Even though v4 is backward compatible, There might be any scenarios it might go wrong for production based ...

Ionic v2 problems with cards

This is will be two parts or two questions, I have researched this a lot over the past few days and I can not find an answer, so if I missed it and it is in the docs or somewhere else please link me. ...

How to get correct intellisense with useClass provider

I've created a class that extends native angular service, and used class provider to override it. Extended service @Injectable() export class ExtendedFormBuilder extends FormBuilder { control( ...

How to know which items are from which array when combining

If I have two arrays and combine them I want to know which items were originally in each array. For example I have these two arrays: primaryTypes = [ new PrimaryType(43), new PrimaryType(86), new ...

Angular2 : Error: Cannot find primary outlet to load (login page and all other pages)

In the app.component.html, I have put a condition to decide which kind of template to use : <div *ngIf="_appService.titleName !== 'Login'"> <router-outlet></router-outlet> </...

Angular 2: Route change still sending request in the network

I am using Angular 2 for my project along with webpack. So whenever I change a route, I still see a request in the network. What's different from the normal process is that I am adding all the ...

How do I create working tooltips in Angular2 with Angular techniques?

I've searched a lot for an easy, simple, and most importantly Ng way to make tooltips, but I can't seem to find a uniform method for doing so. I've tried doing this using ngbToolTip following the ...

Angular 2 keyframe animation with properties with hyphens

I am trying to re-create this animation on my component: https://github.com/daneden/animate.css/blob/master/source/zooming_exits/zoomOutUp.css I can't find any examples of using easing on keyframes. ...

How to wait until Angular 2 updates template and run script?

I have a method that I need to execute after DOM has been updated with a data. When I run my method immediately after setting the property (bound to a template), the script does receive empty div in ...

Angular 2 : Cannot read property 'unsubscribe' of undefined

This is an e-commerce cart built on Angular 2. when I leave this component and load any other component, I get the error "EXCEPTION: Uncaught (in promise): Error: Error in ./ProductsComponent ...

Is nested modules bad in Angular 2?

There is something I wonder about modules. I started Angular 2 a while ago, so i search too many topics but I couldn't find any satisfying answer yet. When we creating angular 2 application, using ...

Angular 2 ver 4.0 component is not renderring

I can't render the very basic module of this stupid Angular 2 Here is main.ts: import {Component, NgModule} from '@angular/core'; import {BrowserModule} from '@angular/platform-browser'; ...

Getting CORS error When Using Spotify Open APIs

I'm getting CORS error while trying to get some data through Spotify's Open APIs such as API/v1/search?type=album&q=... and API/v1/albums/{id} in a Simple Angular 4 Application that searches for ...

How can I display list of all other users with details from firebase excluding currently logged in user?

This code currently displays all users including the logged user accessing this data for display (Search in the future). Typescript: public ngOnInit(): void { if (this._auth$.authenticated) {...

Angular 2 : How to make my own custom KendoGrid in angular 2

I have 4 Components. And I am using KendoGrid for displaying the data in all four components. But now, I dont want to use to setup KendoGrid in all four components. For this, I made a child component ...

Can't update user with PUT Request in Angular 2

I am building an Angular 2 app and I have created an API that is online and that lets me update a user that has name, email and about fields. I tested it with Rest Easy and I could update any user ...

Ionic 2: access main page's services from popover callback

I've been on angularJs for a while now and I just switched over to angular 2. I'm calling a popover from a page and when an item is selected from the popover, I'm supposed to get some data from an api....

How to putform data into json file in Angular 2

I want to put form data into JSON file after submitting and validating form. I am getting the object but I can put it. Here is my code. onAddSubmit() { const data = { institution: this....

Ionic 2 back leads to blank screen with no errors in console

Whether I use router.pop() in class or navPop in template, doesn't matter. Whenever any of the two instructions gets executed, the screen becomes white-blank. No errors on console what-so-ever. I ...

Angular2 Firebase Background Images

I'm using Angular2 and Firebase to bring in data. Right now this works for regular images: <img src="{{brew.image}}"> For some reason, I can't get the image to show as a background image. I'...

Multiple filter for one datatable in Angular 2

I am working on Angular 2. In one of my scenario I have to add multiple filters for one DataTable. I have created custom DataTable for my project. Filters like: After searching on google and review ...

Iterating through JSON object with Angular 2 ngFor

Before I write a service to get json, I just want to use some dummy json to test the front end. What's the correct way to iterate through json with ngFor? I tried the code below with a simple ...

How to add markers dynamically in the onClick event using SebmGoogleMaps? - Angular 2

I have tried to make code and I have searched in the documentation and forums on how to add markers dynamically to a google maps in angular 2. Find SebmGoogleMap and it is very easy to use but does ...

What does this Angular error mean?

I'm trying to upgrade my app from Angular v2 to v4, and I'm using AOT compilation. Can anyone explain how to resolve this error, which doesn't identify any of my own code (only Angular's). Error ...

Angular 2- using *ngIf with multiple conditions

I'm unable to selectively display links on my nav-bar. Based on who logs in (user or admin), I want to change which link shows on my nav-bar. Below is the code for one such instance where the user/...

I want to make chat application with Laravel 5.4 and angular 2 , and pusher [on hold]

I Want to make chat application with Angular 2, Laravel 5.4 and pusher. Here is my code of Laravel and Pusher. i want to fetch messages from controller with the help of pusher so on front end side i ...

Trying to setup aws-sdk in angular2 with webpack: require is not defined

I am following the blog http://andrewhfarmer.com/aws-sdk-with-webpack/ Getting the following error in browser: Uncaught ReferenceError: require is not defined at Object. (browser.js:1) ...

ionic2 - add modal as static function

I have this static openModalInfo() function in my app.component.ts: import { Platform, ModalController } from 'ionic-angular'; export class MyApp { static modalCtrl:ModalController; constructor(...

Having trouble using an external angular2 module via npm

I'm working from the Angular 2 quickstart and trying to add in a third-party component (ng2-split-pane in specific). I installed it with npm, and based on the plunkr example of it I have the ...

django rest framework api and angular 2 integration

I'm developing back-end API with Django Rest Framework and front-end with Angular 2. The django server runs on localhost:8000 and the angular server runs on localhost:3000. When I try to access API ...

Angular2 - How to load to views/ components defining them via Array

I have two list of arrays. menu : That is the list of menu items. In the list I also say waht component I should load from component list. myComponents : List of all components. const menu = [ {...

Angular 2: data returned from Firebase aren't mapped on my array of object

I'm fetching data from Firebase with Angular 2 using Observables, but, even if i get the result from the http call, i can't map the returned object on my entity. I want to map into an Array of Recipe....

Paperjs with Phaser and Ionic 2 Drawing

I am trying to use ionic 2 with phaser and paperjs. What I am trying to do is create a canvas in ionic 2 for a user to be able to draw on. I thought phaser would be a good game engine to use to handle ...

nested function in angular2 Typescript

I am migrating from angular 1 to 2, and I have nested functions in javascript: function normalizeDoc(doc, id) { function normalize(doc){... I removed the "function" but now I get errors from ...

The Angular CLI dependency resolution issue

Here's a project's package.json file (excerpt): "dependencies": { "library-one": "^1.0.0", "library-two": "^1.0.0" } Here's package.json file of library-one: "dependencies": { "...

Cors Origin in Direct Path in laravel when calling images

now I build web application using laravel 5.2 as webserivce and angular2 as front page I use VR Library from http://cdn.pannellum.org My Issue When I call link Of Iamge from my database like mywebsite....

Angular routing error: should only include this file once

I am playing with tutorial Tour of Heroes found here. Everything runs and looks fine. However, after I added routing from root page to dashboard and to hero's detail, I got the following error in the ...

Adding jQuery for Bootstrap in Angular2

Where should one correctly include jQuery for Bootstrap 4 within Angular2, taking into consideration architecture best-practices and potentially performance when loading pages?

angular 2 ng-select how to set selected value by using template expression

angular 2 ng-select how to set selected value by using template. For example something like this, <ng-select [options]="[{label : "first", value : "1"}, {label : "second", value : "2"}]" ...

Since updated angular 2 version, requests are getting cancelled

so since i updated angular 2 and more few packages by npm, some of my requests are just getting cancelled if i send multiple request at the same time, for example if have loop of some groups, and i ...

Angular 2 -> how to hide controls using FormGroup

Is there any way to control visibility of controls using FormGroup (TypeScript Angular 2). I'm manage to write the following code: this.myDoch.controls['text1'].disable(); but it only blocked the ...

Dynamic Popover angular 2 ,bootstrap 4

I am Rendering the Below Text boxes Dynamically,I want to open popover for each text box and only one popover should be opened at a time. This is the markup for rendering the text boxes and the ...

No response sending objects to a <router-outlet> component with an Observable service

I am trying to have a service pass, from a parent component, an object to a child component via a <router-outlet></router-outlet>. I used the docs to guide me https://angular.io/docs/ts/...

Highcharts - x Axis per secound?

My series data looks like this: [Date.UTC(2017,03,25,09,32,21),0.7695], //Date.UTC(yyyy,MM,dd,hh,mm,ss) ... ... but I can only zoom till the days...... How can i zomm till the secounds?

Angular 2 Parent Component Losing Input Binding from Child Component

I'm working with a parent component that references a child component that plays an audio file in Angular 2. Initially, I'm passing the audio file an input variable of _audioState which contains a ...

RewriteRule not working

I'm working with angular 2 and yii2. I use the angular cli command 'ng serve' to build the server but the url is something like 'localhost:4200'. So I decided to write rewriterule to proxy the url (...

Cannot set default selection on <ion-select> on Reactive form

I need to load <ion-select> dynamically in a reactive form.It is working fine.Now I need to set default selection.I have used selected attribute for that.But it is not working.Can you tell me ...

How to pass query parameter in AngularJS 2?

I am using ASP.NET Core and AngularJS 2. There is a problem with http query parameter. No matter what I try, parameter 'quarter' is not passed to controller. Anyone have idea what ma I missing here ? ...

Save the Angular CLI build logs to a file

I've checked here and there's no option that can be passed to the Angular CLI to save logs to a file. I've tried this: ng build |& tee output.txt The problem is that the resulting file is ...
Translating... 0%