Questions tagged [angular5]

1

votes
1

answer
1.3k

Views

Angular-Redux Epics

Getting the following error message in console when using the angular-redux library. Also, Redux won't catch or listen for actions after the error occurs. I've searched, including the documentation but nothing points out to fix the error. Am I missing something? Error core.js:1427 ERROR Error: Actio...
Ben Isaac
1

votes
1

answer
2.8k

Views

Angular - Access values of object stored in array of objects inside template

I've got a single class as below: export class SettingsTab { id: number; class: string; name: Object = {}; } Also I mock it into simple array: export const SETTINGSTABS: SettingsTab[] = [ { id: 1, class: 'classOne', name: [{ 'pl': 'Tekst po polsku' }, { 'en': 'Text in english' }] }, { id: 2, class:...
Ashiv3r
1

votes
1

answer
3.9k

Views

Implementing Google Calendar API with Angular 5

I'm trying to connect to the Google Calendar API using Angular 5 so that I can display upcoming events on the web application I am building. I'm new in Angular and i'm looking for a way to integrate the API in my app. I searched alot but i didn't find a way to do it.
Eve
1

votes
3

answer
107

Views

How dependency injection in Angular is useful since it doesn't solve anything apparently?

How this can improve my code? How it can remove dependency ? I still don't see any benefit of using this ? @Component({ selector: 'talk-list', templateUrl: 'talks.html', providers: [TalksAppBackend] }) class TalkList { constructor(backend:TalksAppBackend) { this.talks = backend.fetchTalks();...
Jameela Khan
1

votes
2

answer
44

Views

Angular - Check if all Subscriber in a list are finished

I use an interval to post a variable amount of data in a forEach loop to a backend. What I want to do is: If the first call of the post method is not finished but the interval already wants to call the method a second time, the call should be blocked until the first call it finished. I try to show t...
WeSt
1

votes
2

answer
69

Views

How to set dynamic value to formControl in angular 7

I have drag and drop formBuilder we can able to create form using drag and drop so now i am facing problem i have hidden field in html which is TempleteJson. Here is html code Form Name: CreatedOn: Submit Here is component.ts file formBuilder: any; formData: any; data: any; ngOnInit() { var id = thi...
Ronak Dumaniya
1

votes
2

answer
721

Views

Angular 5 – Form with multiple components

I'm trying to make a form with multiple components. I tried doing this using template driven form. Here is the code I'm having problems with: Here is the employee component: Name Name Is Required Name at least 3 haracters Address Address Is Required Address at least 3 haracters Gender: Male Fema...
Mekadoo
1

votes
1

answer
957

Views

Mat-select panel min-width

I'm trying to customize mat-select with multiple checkboxes. for some reason the panel get wrong min-width as below: and I don't know where its calculating this min-width. also I tried to add panelClass and override the min-width from this class, for example: &.multiple-panel { min-width: 200px !i...
Tomer Aronovsky
1

votes
4

answer
62

Views

How to call a function only after completing the execution of a thread in angular 5?

I am trying to call a function after a thread. But the function is getting called before completing thread. Where do I need to change? this._listService.getListById(this.userName) .subscribe((response: any) => { // getting proper response. if (response) { this._listServiceMod.loadListModel(respo...
unknown123
0

votes
1

answer
3k

Views

TypeError: path must be a string or Buffer MEAN stack

I am using Angular 5 on front-end, Node on back-end and Mongo as the database. Now I am trying to save an image to the database but constantly getting this error. I can't figure out if I'm making mistake on front or back because this is my first time working with files. I did my research but it poin...
JKshort
1

votes
1

answer
4.4k

Views

Window object in angular 5 service

I have project in Angular, user's panel in specific. All page is in php, just panel in angular. How to use window object in service? I want use window.location exactly for the same action as href='/' in HTML, which return me to outside the angular project(panel) to main site. Why? When I was trying...
Foliano
1

votes
0

answer
848

Views

Angular: ng2 smart table use rendercomponent for displaying custom actions

Can we display custom actions with a component? Like we do with the columns? I want to show the activate button when the user is blocked and the blocked button when the user is activated. actions: { position: 'right', add: false, edit: false, delete: false, custom: [ { name: 'activate', title: 'Acti...
sandeep kumar
1

votes
0

answer
346

Views

AngularMaterialize in angular 5, __WEBPACK_IMPORTED_MODULE_1_jquery__(…).sideNav is not a function Error

I am using Materialize css in my angular 5 project. i am implementing materialize mobile collapse navbar and my code is this Logo menu Components Javascript Mobile Sass Components Javascript Mobile I have included these files in my angular-cli.json file like this In scripts '../node_modules/jquer...
Fahad_SUbzwari
1

votes
0

answer
724

Views

Angular HttpClient giving error as “Backend returned code undefined,message was: Cannot read property 'toLowerCase' of undefined ”

I have a component.ts file as follows. import { Component, OnInit } from '@angular/core'; import { HttpClient, HttpRequest, HttpResponse, HttpErrorResponse } from '@angular/common/http'; import 'rxjs/add/operator/retry'; @Component({ selector: 'app-add-candidate-emp-referral', templateUrl: './add-ca...
roopteja
1

votes
1

answer
211

Views

Dynamically populating a template with Angular 4 / 5

Our application layout features a toolbar and the actual contents area. Since the toolbar has a somewhat complex DOM structure we have decided to create a component out of it. We could reuse this component on each page, but the toolbar position is actually not next to the contents (some other compon...
cafonso
1

votes
1

answer
885

Views

How to spy/mock method calls in the constructor of a Angular 5 service?

I have a service, that makes 2 method calls in the constructor: constructor(private http: HttpClient) { this.apiURL = environment.apiURL; this.method(); this.method2().subscribe(); } I'm trying to test this service in the TestBed. However, I am unable to spyOn, using Jasmine's spies, before the Test...
Ka Mok
1

votes
1

answer
270

Views

Runtime error on Angular app when AoT is enabled

I recently updated my app's Angular version from 2.4 to 5.1.2, following the guidelines in this tool: https://angular-update-guide.firebaseapp.com/. I'm also using angular-cli 1.6.3 Now, after updating, everything works in dev mode when running ng serve. Also ng build (with or without --aot flag) ru...
Koja
1

votes
0

answer
570

Views

ERROR in ./node_modules/ng4-files/index.ts is not part of the compilation output

I Started using Angular5 few days ago Recently I got an error that - * ./node_modules/ng4-files/index.ts is not part of the compilation output. Please check the other error messages for details. * same issue is mentioned here also - https://github.com/bonjurmrfirst/ng4-files/issues/17 Problem is th...
Anil Kumar
1

votes
0

answer
179

Views

Range Slider with no maximum value

I'm making a range slider with ng2-ion-range-slider Angular 5 But I want make a slider with no maximum value which is infinite slider Any recommendations?
Rania Elgenedy
1

votes
0

answer
269

Views

How to assign part of String data to an Array in Angular5

Hi I Want to assign a string that contains json data to the array. Please see the data contained in screenshot. Here is my Service code to Retrive Json data. import { Injectable } from '@angular/core'; import {Http,Response,Request,RequestOptions,Headers} from '@angular/http'; import 'rxjs/RX'; impo...
Santoshraju V
1

votes
0

answer
1k

Views

How to navigate to complete different application in angular 5 using router

I am having an angular 5 application running on localhost:3000 and on click of logout I need to route back to completely different application on another port. I am using this.router.navigateByUrl('localhost:3000/home'); But what it does, its not going to new URL. In fact its appending that URL to...
hammy
1

votes
0

answer
496

Views

Angular 5 and jQuery, the unholy alliance

I need to get a single (changing) value from a jQuery Component into an Angular component. Background: There is a jQuery-Plugin (jquery.reel) used to display a oh-so-cool 360°-view. It's able to spit out after frameChange the current frame it is on. So far not so special. Now I'm trying to get thi...
cjung
1

votes
1

answer
278

Views

Custom build using Angular-Cli

In my previous Angluar 5 project I used Grunt to build custom components and assets for my clients. That means I had src/ folder for my basic components and clients/ folder with custom components for my clients. I used grunt:main to build main app and grunt:client1 to bulid app for my client. Is thi...
S01C83L
1

votes
0

answer
628

Views

Angular wrapped Iframe-resizer(Get Iframe target site height)

I tried to get the content window height to set the iframe height in angular 5, but iam unable to do that because iam using different domain url in my src tag. Im getting exception like 'blocked because of cors'. HTML: HomeComponent.ts resizeIframe(obj) { var height = obj.target.contentDocument.inn...
Ajay
1

votes
0

answer
275

Views

Angular 5 ngForm prefilled with value=“{{variable}}” is undefined on submit

I use the same form to create and update my data. When i select a record to update, it fills the form correctly but if I submit, the values are undefined Name(*) Datum(*) The variables are defined like this: current_name:string; current_timestamp:number; The submitted form contains the values like t...
Simon Tribus
1

votes
2

answer
229

Views

ng build error showing up after upgrading angular 2.4 to angular 5.0

I have upgraded my angular 2.4 app to angular 5.0. after successful installation process whoich includes - cli upgrade and angular version, when im trying to do ng build. the folloing error show up. any idea how to solve it. i did npm install and then after ng build same error shows up. below is...
user8819437
1

votes
0

answer
235

Views

Angular 5 Error ng build --deploy-url

I was working with angular 4 with MVC. Recently we upgraded to Angular 5. I got error in index.cshtml in the path $/Views/Home in MVC project at the following line: fileEntries = Directory.EnumerateFiles(Server.MapPath('~/dist')); The command 'ng build --deploy-url http://localhost:60859/dist/' exit...
Alaa'
1

votes
0

answer
248

Views

Babel6 not transform class definitions with Angular 5, Webpack 3.8.1

Why babel does not transform my classes? Syntax error main.js (24,25) IMAGE: IE11 transformed main.js file Maybe my configuration is not right? I try to add support of IE 11 by my app, but babel not work correctly. I had also added polyfills.ts from angular.io documentation to support IE. Here I'll...
Alex Vasil
1

votes
1

answer
744

Views

Angular 5: Hiding elements (if user isn't authenticated) not working

this is app.component.html Posts Profile Settings Register Login Administration authentication.service.ts import { Injectable } from '@angular/core'; import {HttpClient} from '@angular/common/http'; import {User} from '../../interfaces/user.interface'; @Injectable() export class AuthenticationServic...
emil
1

votes
0

answer
120

Views

how to get length of certain nested object in Angularfire2?

How to find length of certain nested object in Angularfire2? how to find total completed items (todos)? in items list how to find a length of a certain object in array Todo List: {{(items | async)?.length}}
Qusay Saad
1

votes
1

answer
905

Views

Angular 5 and Angular Universal state transfer with http interceptor and localstorage

I have the problem on the server side, when I refresh page there is no way to retrieve jwt token on server from local storage because of localstorage only exists on the browser. Also when I log in I save token in the transfer state and again after the page is refreshed state variable disappear, is i...
Vladimir
1

votes
0

answer
240

Views

Angular 5 --prod --aot build issue with ngCli

In My project ng build command executing successfully and running as well. But when I build ng build --prod --aot, build is successful but not running. Error: StaticInjectorError[n]: StaticInjectorError[n]: NullInjectorError: No provider for n! Please help.
Sanjib
1

votes
0

answer
892

Views

I cannot use Angular 5 as OpaqueToken has been removed

I've updated my angular 4 project to angular 5.2x. While building the app it keeps throwing @angular/core/core'' has no exported member 'OpaqueToken'. error. I've already tried so many suggestions from github but still this having the same error again and again. npm uninstall @angular/flex-layout...
Kirubel
1

votes
0

answer
227

Views

Cannot send a variable through Angular 5 HttpClient Post to insert it in database using PHP

I want to insert a field in my database using Angular 5 and PHP. I started by adding a new function inside my api.ts file: public partnerName: String; constructor(private http: HttpClient){ } addPartners(partnerName) { return this.http.post('http://aff.local/addPartners.php', this.partnerName).pipe(...
alim1990
1

votes
1

answer
88

Views

Angular - How to output a section of application as secondary standalone build

I've have an Angular 4 (or 5) application with the following structure: How can I build a second standalone angular application, so that only a set of Angular components from documents directory outputs into a second dist directory. One of the components from documents directory will serve as main...
abdul-wahab
1

votes
0

answer
205

Views

Angular 5: How to load multiple custom child components for a screen?

Background I'm writing an enterprise application in Angular 5. One of the large screens I'm working on has many tabs and child components. A majority of clients will get the same version of the screen, but a client or two want custom changes under a couple of tabs. Question How do I dynamically load...
Andrew
1

votes
0

answer
384

Views

Angular5 + CLI ng serve: background-image URL doesn't converted to base64

Angular4 + [email protected] _variables.scss file contains: $brand-logo: url('~assets/images/logo.png') After 'ng serve' in style tag this image URL rebased to data:image/png;base64 and that's cool :) Migrated to Angular5 + [email protected] Now I have an error when run 'ng serve' - fixed like described here https:...
Alex
1

votes
0

answer
1.2k

Views

Multiple radio buttons, only 1 can be selected - Angular 5

I have a little app, where in the navigation bar, i want some options for filtering, and ordering of data. My idea was to use radio buttons to select from the options, from example, ordering asc or desc: Asc. Desc. With this, when they select something, it unselects the other radio button, and i can...
1

votes
0

answer
320

Views

Uncaught TypeError: Cannot read property '_name' of null

After clearing browsing data and running project I am getting below error 'jsstore.min.js:6 Uncaught TypeError: Cannot read property '_name' of null' while creating indexeddb using jsstore.
kamalav
1

votes
0

answer
417

Views

Using RequireJS with Angular 5

Is there any guide anywhere to use Angular 5 with requireJS? I'm trying to insert an Angular5 app into an AngularJS ngView (route of route) index.html // routes $routeProvider .when('/home', { templateUrl: 'views/home.html', controller: 'mainController', controllerAs: 'main', resolve: { dummy: funct...
Sampgun

View additional questions