Questions tagged angularjs

Explore the latest questions and answers asked by our top developers.

How to work with dropdown in formarray in Angular?

Here I am trying to dynamically select the dropdown value but the issue I am facing is when I am selecting value in dropdown it is getting reflected in all dropdown , It should be for particular index . Any sort of help is appreciated <form [formGroup]="myForm" (ngSubmit)="onSubmit()"> <div formArrayName="arr" *ngFor="let a of myForm.get(‘arr’).controls; let […]

By user15895291
Published
Categorized as angular, angularjs Tagged ,

why two way binding is not working with ng-model as variable but is working with it as an object property?

One way binding works. The checkbox appears selected on the page launch, but the two-way binding is not working. This works perfectly with one-way binding but the checkbox checked status doesn’t reflect inside the controller. <input type="checkbox" ng-model="selected"> Inside controller: $scope.selected = true; If I change the model to an object, two-way binding works. <input […]

By p zankat
Published
Categorized as angular-ngmodel, angularjs Tagged ,

it is impossible to pass parameters from one component to another. Angular

app.component.ts: updateInfo(info: Info){ console.log(‘info: ‘, info) } app.component.html: <app-authorization (onAdd)="updateInfo($event)" ></app-authorization> registration.component.ts: @Output() onAdd = new EventEmitter<Info>() login = "" email = "" passwordF = "" passwordR = "" registration(){ if(this.login.trim() && this.email.trim() && this.passwordF.trim() && this.passwordR.trim()){ const info:Info = { login: this.login, email: this.email, passwordF: this.passwordF, passwordR: this.passwordR } this.onAdd.emit(info) this.login = this.email = […]

By HLEB HLEB
Published
Categorized as angularjs, javascript Tagged ,

code: "auth/argument-error", message: "reCAPTCHA container is either not found or already contains inner elements!", a: null Angular

I am trying to do sms/phone validation of my angular website through fire base until now i have tried the code below firebase.auth().settings.appVerificationDisabledForTesting = true; var phoneNumber = "+16505554567"; var testVerificationCode = "123456"; // This will render a fake reCAPTCHA as appVerificationDisabledForTesting is true. // This will resolve after rendering without app verification. var appVerifier […]

By Hamza
Published
Categorized as angularjs, firebase Tagged ,

How to mock angular.element(document.body).injector().get(‘SomeElement’);

I have controller code like this in an angularjs file… function sendAnalytics(searchParams) { var analyticServiceCall = angular.element(document.body).injector().get(‘SomeElement’); }; When I run test cases attached with the above controller I get the following error * TypeError: Cannot call method "get" of undefined in http://localhost:46309/src/soemFolder/someController.js (line XYZ) What I am understanding is, I need to mock angular.element(document.body).injector().get […]

By Talk is Cheap Show me Code
Published
Categorized as angularjs, jasmine Tagged ,

How to mock angular.element.injector().get;

I have controller code like this in an angularjs file… function sendAnalytics(searchParams) { var analyticServiceCall = angular.element(document.body).injector().get(‘SomeElement’); }; When I run test cases attached with the above controller I get the following error * TypeError: Cannot call method "get" of undefined in http://localhost:46309/src/soemFolder/someController.js (line XYZ) What I am understanding is, I need to mock angular.element(document.body).injector().get […]

By Talk is Cheap Show me Code
Published
Categorized as angularjs, jasmine Tagged ,

How can we write this in <div ng-if= " ". the like expression and everything else

(( (table1.field1 like ‘HR%’) OR (table1.field1 like ‘ABC%’ OR table1.field1 like ‘XYZ%’) )) AND ({# TREEWHERE(‘SD_CATALOG’, ‘CATALOG_GUID’, ‘{D843B2D2-F721-416D-8805-A735D30B0364}’, ‘SD_CATALOG’) #}) AND (Table2.field2 (‘{D63523A6-9659-4CE9-A41F-F6F15653E2C6}’)) AND table1.END_DATE_UT IS NULL Source: AngularJS Questions

By Manisha Tratta
Published
Categorized as angularjs, angularjs-ng-if, html Tagged , ,

Javascript Date changes the timezone in $http.post

This is quire similar to: angular $http.post changing date to UTC date I am working with a system that stores a date without the time part of it. Now when I capture a date (without the time) in the UI and set it to the angularjs model, it remains the date with 00:00 in the […]

By Kangkan
Published
Categorized as angularjs, date, datetime Tagged , ,

NG serve can’t find ssl files

I try to run default ASP.NET 6 angular project template and unfortunately npm start fails by exception "start:windows": "ng serve –port 8001 –ssl –ssl-cert %APPDATA%ASP.NEThttps${npm_package_name}.pem –ssl-key %APPDATA%ASP.NEThttps${npm_package_name.key}", An unhandled exception occurred: ENOENT: no such file or directory, open ‘C:UsersffresDocumentsGitHubNFTMarketPlaceMarketPlaceMarketPlaceClientApp%APPDATA%ASP.NEThttps${npm_package_name}.key’ But weirdly if i remove –ssl-cert parameter, it works fine. Surely i need -ssl-cert parameter as […]

Adding Image to Bootstrap card-body mobile responsive problem

I have got a bootstrap card with an image on the bottom. My Code also uses AngularJS and ASP.net . When the page gets small enough, the image moves out from the card-body (moves to the left). I want the image to stay in the same place no matter what screen size it’s on. Example: […]

By Norbs
Published
Categorized as angularjs, asp.net, bootstrap-4, css, html Tagged , , , ,
1 1,375

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq