Questions tagged javascript

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

Adjust speed movement dynamic in angular

I am trying to change movement speed dynamic. Structure of my code: I have multiple coordinate X and Y in a array so i take every coordinate and display in a map so the car move into the path. i have a slider include speed 1x 2x 8x 16x for changing speed of movement. <div […]

By lampard bre
Published
Categorized as angular, dynamic, javascript, slider Tagged , , ,

Capturing product impression without making the website slow

I am working on a website where we have thousands of products. I have to capture the impression of all products users can see in their viewport. So I created a directory and I used IntersectionObserver, and referred to it inside the HTML code of that product. The issue is that it’s causing a performing […]

Angular js setup issue

iam rahim here . while setuping angularcli i encountred the following issue: ‘ng’ is not recognized as an internal or external command, operable program or batch file. C:UsersASUS ROG>ng –version ‘ng’ is not recognized as an internal or external command, operable program or batch file. here bellow it show angularcli installed but i failed to […]

By Sayyed Abdulrahim
Published
Categorized as angular, javascript, node.js Tagged , ,

How to use classes inside module in Angular

I have a class in my Angular module (mo-test) like this: export class TestClass { constructor(n: string) { this.name = n; } getName(): string{ return ‘Your name is’ + this.name; } } I build the module with ng build mo-test –configuration production And publish it with npm publish –access public And install the module in […]

By Morteza
Published
Categorized as angular, javascript Tagged ,

angular js multiple select to single drop down conversion

I have a multiselect drop down but I only want to select one of the options and then when that modal opens have that dropdown selection saved. right now the dropdown is multi and when i close the modal, the values are still selected. I want this same functionality but in a single select dropdown. […]

By megabowser56
Published
Categorized as angular, dropdown, javascript, md-select 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 ,

Adding new row in a connected FormArray and Angular Material Table

I am aware that this question has been asked lots of times, but after trying a lot of solutions and failing… Sorry for the repeat. This may help someone in a similar situation as me. I have an Angular Material Table (Angular 6). I have the rows (data) in the form of a FormArray which […]

Trying to apply the color and Json value of the particular element is not changing

Here is my Plunker, https://angular-ivy-ljxprm.stackblitz.io I am trying to update the color on the circle when I click on the button. But I am left with errors. Suggest me to move further. Source: Angular Questions

By Prasanna kantheti
Published
Categorized as angular, css, javascript Tagged , ,

Unit test a return methods output value

I have a method that a string enters, its transforms then returns a new string value. I have tried numerous ways to get it to test correctly, as you can see below there are a few lines commented out… spec.ts const string = "testing%20this.jpg"; //input const sanitisedString = "testing this"; //expected output it(‘should sanitiseString’, () […]

One of the reducer is not being triggered from effect

I have tried as below to trigger the reducer from an effect. The issue is that the effect is not trigger the reducer ‘OpenINFOWIdgetSuccess’ while returning the action. @Effect() loadInfo$ = this.actions.ofType(fromHeaderActions.EInfoActions.OPEN_INFO).pipe( withLatestFrom( this.store.select(fromSelectors.GetINFOPayload)), switchMap(([action, infoPayLoad]) => { let cAction: fromHeaderActions.OpenINFOWIdget = <fromHeaderActions.OpenINFOWIdget>action; return this.infoService.loadINFO(infoPayLoad).pipe( // Dispatch success action map(response => new fromHeaderActions.OpenINFOWIdgetSuccess(response)), catchError(error => […]

1 859

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