Questions tagged [angular]

77307 questions
1

votes
0

answer
602

Views

How to use ng2-file-upload to post a request without the file?

I come across a question about ng2-file-upload, If I use it to upload at least a file, it works well. But if I do not select any file, it will crash and reload, and I can't get any error. Anyone know how to use ng2-file-upload to post a request without the file? This is my code: Upload: uploader...
ZhangXu
1

votes
0

answer
858

Views

How to integrate Tinymce with angular 4.0

I am getting error that SimpleTinyComponent is not an NgModule Copied the sample code from 'https://www.tinymce.com/docs/integrations/angular2/' Created one component for tinymce where I based the basic setup code of TinyMCE then on Basic component HTML used the selector of tinymce. Basic.component...
Kunal Vashist
1

votes
2

answer
50

Views

Binding a string with value in Angular 2

How to concatenate string with a value as we do in JAVA 'The total pay is ' + totalPay. I want to do it in Angular 2+ like 'Hi Hello' +req.body.hello
Chris
1

votes
0

answer
75

Views

Pass object in POST method from Angular

I'm new with angular and i try to consume a post method of a WCF. For this i use HttpClient from '@angular/common/http' My rest service has this sign [OperationContract] [WebInvoke(Method = 'POST', ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, UriTemplate = 'SaveUser...
user1898765
1

votes
1

answer
233

Views

How to install bootstrap 4 version beta.2 in an angular 4 application?

I tried installing bootstrap 4 version beta.2 and its dependencies (jquery and popper.js). but there is something very weird going on. for some reason, I keep getting an error message in the console, saying 'SyntaxError: export declarations may only appear at top level of a module'. when I click to...
Kenchi
1

votes
0

answer
48

Views

how to set default view using angular-route-segment (not in index.html) angular js

In my MEAN application for nested views I am using angular-route-segment. Everything works fine with the nested views except for the initial default screen. my first page (index.html) contains header & footer with buttons connect & disconnect. This theme is common in all the pages. once I click conn...
Krishna Kiriti
1

votes
0

answer
731

Views

Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded - hex is different

I have a legacy classic asp application, that allows us to upload pdf files. The file is saved as hex into a MS SQL DB into an image column. Here is a snip of the data in the column: 0x4A564245526930784C6A634E436957317462573144516F784944416762324A7144516F... We are now working on a rework of the app...
user8408326
1

votes
1

answer
43

Views

Array.Filter and find not giving error angular 4

I have a list and I just want to filter. Array.find and filter are all producing errors. Function : setSupplierDetails(supplierId) { const supplier = this.suppliers.filter(tempSupplier => tempSupplier.id === supplierId)[0]; this.supplierName = supplier.supplierName; } Error : ERROR TypeError: Can...
user3701188
1

votes
0

answer
215

Views

Ngrx not working properly with AOT in Angular

From past couple of days I am trying to use ngrx with AOT, with JIT it works fine, but with AOT it gives this error Uncaught TypeError: Cannot convert undefined or null to object in combineReducers, I believe its because it's getting undefined as the first parameter, here is my code: // reducer.ts...
Dheeraj Agrawal
1

votes
0

answer
144

Views

How can i import d3plus in angular-cli project

Hi I'm using d3 to make chart in angular-cli project I have imported d3 in my component as import * as d3 from 'd3' Now I want to import d3plus to wrap text. I installed d3plus using npm i d3plus --save inside my angular-cli file I add d3plus.js under script tag Then I'm trying to import d3plus as i...
Node Mario
1

votes
0

answer
245

Views

How to pass FormData with Angular to Laravel action method

I have an existing site built using Laravel. I am 'duplicating' the action methods to use Angular, when I duplicated the action that posts a file I didn't get it to work. The $_FILES and $_POST global variables are not being set. Template: I have an input of type file, when a file is selected I wan...
Diego Alves
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
0

answer
142

Views

ng-drag-drop unable to drop to the required div

I am trying ng-drap-drop plugin https://www.npmjs.com/package/ng-drag-drop in angular 4 application. HTML Code Purchase Typex Cost Centerx Categoryx Field 1x Field 2x Field 3x Field 4x Controlling Fields   Drag and Drop app.module.ts import { NgDragDropModule } from 'ng-drag-drop'; imports: [ NgDra...
Nikita Dhiman
1

votes
1

answer
1.4k

Views

Error updating Angular using npm

I am really at a loss here. I have installed ngx-translate for my application, but it requires me to update my @angular/core and rxjs. I decided to update Angular completely, using https://angular-update-guide.firebaseapp.com/. It told me to: npm install @angular/[email protected]'^5.0.0' @angular/[email protected]
Jesper
1

votes
0

answer
292

Views

How to use Azure App Service Authentication for a Angular 4 app?

I have deployed a Angular 4 app to Azure. The app uses a API and the api is also deployed to azure, in the sub folder named 'V1'. The Angular app is deployed in the root. Next I have enabled 'App Service Authentication' in the Azure portal. Now, when I want to access my site I see Azure's login page...
Martijn
1

votes
0

answer
227

Views

ng-bootstrap [ngb-tab] in Angular 4 styles issue

Both tabs looks inactive after page loaded. Also if click anywhere - active tab styles became inactive, logic works but styles not. Works only hover styles
Serhio g. Lazin
1

votes
1

answer
71

Views

Http call are not happening in this code?

CoreService: export class CoreService { constructor(private _http: HttpClient) { Common.Socket.next('https://reqres.in'); } httpget(url): any { return Common.Socket .switchMap((x)=> this._http.get( x + url)); } httppost(url, body): any { return Common.Socket .switchMap((x)=> this._http.post( x + ur...
Dharan G
1

votes
0

answer
475

Views

How to make Push Notification in Asp.Net Web App with Angular?

I need to make Push Notification for every user, when product's price is changed. Just like this: The thing is that I have a job, that runs in the background and checks all the prices and sends emails to everyone informing on changes. I want to add these desktop notifications, so javascript and html...
Nikas Žalias
1

votes
0

answer
139

Views

ionic error : help to resolve it

I have service import {Injectable} from '@angular/core'; import {Http} from '@angular/http'; import 'rxjs/Rx'; @Injectable() export class MainService{ http:any; baseUrl:String; constructor (http:Http){ this.http = http; this.baseUrl = 'https://someurl.ru/api/'; } getCategories(){ return this.http.ge...
Victor Tihomirov
1

votes
0

answer
61

Views

angular2 asynchronous execution

I'm having multiple functions in a ts file like below. reply_click(event) { var target = event.target || event.srcElement || event.currentTarget; var idAttr = target.attributes.id; sessionStorage.setItem('geo', idAttr.nodeValue); var value = sessionStorage.getItem('geo'); var NT = sessionStorage.get...
Depi
1

votes
0

answer
60

Views

angular change header value in singlepage application

In angular2 I build singlepage application, when I change any value in viewcart component then header value need to change, I try below code but I get header.ts file get result but html file not change the value, Please help to solve this problem My header componnent import { Component, OnInit } fr...
Anbuganesh Kannan
1

votes
0

answer
326

Views

Convert a string in the format dd-mm-yyyy into a date in angular 4

How to convert a string in the format dd-mm-yyyy into a date object in angular 4 expression. Example: Test date : {{testDate | date :'dd-MM-yyyy'}} If testDate = '2005/01/21' then date pipe is working fine. But for testDate = '21-01-2005' , it showing invalid date.
Abinash
1

votes
1

answer
155

Views

Angular Forms not working on live server

**I have used Reactive Form but its not working on live but on local it is working fine. The page gets refreshed while submitting the form. There is no error in console. ** I am new to Angular 4, any help will be highly appreciated. Functionality is listed below: signup.html Please enter your Firs...
Anand Kumar
1

votes
0

answer
395

Views

Mock Component Function in Angular 4

I have one function which I am calling in constructor. Now, in that function I am calling api. As its said that we dont call actual api when we do unit test case. The function which is calling api that is private function. So I am not getting how to mock that function. below is just simple example a...
Nitish
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
1

answer
35

Views

Angular2 and Java — is NPM enterprise needed?

I want to use Angular2 with Java as backend technology and will not use Node JS and NPM server, Do I still need NPM enterprise version as I am going to develop for my organisation ?
Gaurav Tyagi
1

votes
1

answer
77

Views

Ionic 3 (cordova) app from http url does not open as app but it opens in the browser

I am using ionic 3 and i want to load my app from cloud. For this I am made changes to the path of index.html.The app opens fine in android but in IOS app opens in the browser. I want to open this as app. Here are the changes to my index.html in the config.xml
Omkar Porje
1

votes
0

answer
47

Views

Retrieving UserAuth data from Firebase in an Ionic project

I'm struggling to retrieve UserAuth data from firebase and presenting it on a list. I managed to put it there, but I can't get it back. I'v been around so many diffrent tutorials and tested a lot of code :( Are there any suggestions to this issue? My code looks like this. It's probably totally wrong...
Peter Bundgaard
1

votes
0

answer
357

Views

Angular 2 - Disable form control based on the value of another form control

I need help in disabling the value of a specific form control based on its value in Angular 2. The field - startDate needs to be disabled whenever the value of another field - period is 'Lifetime'. It needs to be enabled otherwise. Also, whenever the app is loaded, the default value of period is 'L...
Kaushik Rajan
1

votes
1

answer
485

Views

ERROR_APP_NOT_AUTHORIZED Firebase Phonenumber authentication in Ionic App

Iam getting an error unknown error verifying number Error instance: com.google.firebase.auth.FirebaseAuthException Error code: ERROR_APP_NOT_AUTHORIZED While trying to send otp in my ionic app using firebase . this.firebase.verifyPhoneNumber(this.mobileNumber, 60) .then((creds) => { console.log(cre...
Sachin
1

votes
0

answer
114

Views

ng2-bs3 modal dynamic sizing?

I have been using an ng2-bs3 modal for my admin login form, but when the validation message comes, it is overflowing the modal body. How to fix it so that, when the message comes, its size also increases relative to the modal size? Example:
Aditya Vashishtha
1

votes
0

answer
39

Views

How to disable re-sending request after it was canceled in Angular 2

I have a http request like this. let request:Observable = this.http.post( someUrl, someData) Now I want to cancel this request after sending.When I call request.subscribe().unsubscribe() it cancels the request and re-sending it again. I want to prevent re-sending it after cancel.
AngularDev
1

votes
1

answer
134

Views

Angular dynamically check and update validators

I need to dynamically add a validator to an angular form control from a directive. Simplified: @Directive({ selector: 'my-directive' }) export class MyDirective implements AfterViewInit { @Input() myDirective: boolean; control: AbstractControl; constructor(private form: NgForm, private el: ElementR...
Zlatko
1

votes
0

answer
55

Views

Finding device uniqueness using Canvas Fingerprinting

Currently I am using Canvas Fingerprinting and other device parameters to find the unique device. But in recent post i came to hear that Canvas Fingerprinting is going to be blocked by Firefox browser. So i need alternate solution for identifying devices effectively. Can anyone suggest me a effectiv...
Pravin Pravin
1

votes
0

answer
151

Views

Angular dynamic number of inner observables

I have an Angular 5 service and I want to have an observable that maps a dynamic number of, let's call them, callers. Any components injecting this service can get a hold of one observer/subject/whatever, use it to present itself 'on' or 'off' (true/false, whatever), and when done, just complete. An...
Zlatko
1

votes
2

answer
5k

Views

Angular PrimeNG datetimepicker

I use component calendar from PrimeNG 5.0.1, Angular 5.1, which allows to choose both date and time: But timepicker is frozen on time page was reloaded. Is it possible to update time value everytime when picker is shown? I have not found any parameter is in charge for this.
maxx
1

votes
0

answer
347

Views

Angular 4 refresh page route issue

Hi i am newbie in Angularjs 4. When i refresh page then my app couldn't find inline.bundle.js, pollyfills.bundle.js,etc. I thinks it is path problem but not sure. I am trying to explain the issue i.e, my app run at localhost:4200 and i can access module localhost:4200/user/profile from menu but when...
tts
1

votes
1

answer
152

Views

order list of data depending on newest date or older date in ioni2 angular2?

I have json format data : [{date: 2017-10-18T03:00:00+03:00 , name : 'A'}, {date: 2017-11-18T03:00:00+03:00 , name : 'B'}] so how to display these data from the newest date to the oldest date. the result will be : B A because B is newest
Joe Sleiman
1

votes
2

answer
298

Views

what BrowserModule does in Angular2 application

I have seen BrowserModule documentation but its not clear what it exactly does in Angular 2+ application. Can you point to any tutorial that clearly explains what it does.
user1388835
1

votes
0

answer
37

Views

Composite component with ReactiveFormsModule - ExpressionChangedAfterItHasBeenCheckedError

I'm trying to create a composite component (a component that contains other 'input' components). However, I can't make it work due to ExpressionChangedAfterItHasBeenCheckedError issue, that is thrown when a component is being initialized. Here's a demo of the issue that I managed to reproduce: https...
dragonfly

View additional questions