Questions tagged [angular-input]

49 questions
0
votes
2 answers

cannot access input variables in ngOnInit angular

I have the following component @Component({ selector: 'app-models-sd-htmlview', styleUrls: ['./sd.component.scss'], template: ` ` }) export class…
wheeeee
  • 1,046
  • 2
  • 14
  • 33
0
votes
1 answer

Can't bind to "attribute" && "app-component" isn't a known element

I've a HUGE problem. The entire thing started with this: Fix corrupted HTML file or decompile Angular Component My PC suddently crashed and from that event it become worse every second. I get weird errors such as "'app-component' is not a known…
0
votes
1 answer

matInput binded to context property conflicts with i18n extraction but not on regular serve

I have that piece of code of a reactive form that compiles right and is well executed with the matInput directive which is binded, but when I run the angular cli command for internationalisation (ng xi18n), then I got the following error ERROR in…
0
votes
1 answer

Angular 11: Is it possible to inject service by condition from an input

I have a really big component which works with a service for loading datas and instead of re-writing a similar component for working with a new service, I wrote a service with all the same functions that the first one and I try to dynamically change…
0
votes
1 answer

Button Status can not be changed in a child component

I have a problem in my angular application that Button Status can not be changed in a child componnent, now I show my code firstly. this is a child component
user1938143
  • 1,022
  • 2
  • 22
  • 46
0
votes
1 answer

Angular 7 correctly upload doc/docx file

I'm having troubles uploading doc and docx files, because I can't get the right type of file when converting it to base64. This is my input:
Usr
  • 2,628
  • 10
  • 51
  • 91
0
votes
1 answer

unable to access template ref variables

At child.ts, I have a function onButtonClicked which modify revertDisabled from true to false. Having an issue where the template reference variable at parent.html is still getting value true for revertDisabled variable, even after the user have…
user21
  • 1,261
  • 5
  • 20
  • 41
0
votes
1 answer

Angular 2+ NgOnInit assigning value to input array but throws an error of undefined

I have a component which expects some inputs, the input that i care about is the feedList. In the feedList there are feed objects with their own data filled in. However, depending on the feed sometimes some data are not provided when the object is…
0
votes
2 answers

enum value is not properly evaluated in Angular 9 template

app.component.html

value : {{file.type}}

bool : {{file.type === FileAccessType.ENTRY_CREATE}}

app.component.ts export class AppComponent{ files : FileAccess[]; FileAccessType :…
0
votes
1 answer

Angular Behavior Subject in service is getting messed up when initializing two of the same components

I created a component which is called sidebar. That component has let's say 2 inputs, sideBarMode and sideBarSide. In the app.component I add this component like this . When I use…
0
votes
1 answer

What is the correct way to handle this scenario on 'ngChanges'

I am supplying a downloadable data to child through @input value. when user click on download link it's downloading the file without any issue. But whenever there is a change going on and observed by ngOnchanges - triggers the download again and…
3gwebtrain
  • 14,640
  • 25
  • 121
  • 247
0
votes
2 answers

Get input field data by clicking on the button and get value in p element in angular7

I am new in angular and my sir give me the exercise to get input field data in p element by clicking on a button using angular 7.I do so much attempts using some functions (onClick,onClickSubmit,myFunction) but i failed in every attempt.I think i…
0
votes
2 answers

ngOnChange dont detect change when i set value in Input

I have an @Input that does something when it's true ngOnChange doesn't detect when it's false @Input() viewMode: boolean; ngOnChanges(changes: SimpleChanges) { if (changes.viewMode.currentValue !== undefined) { if…
user3140824
  • 338
  • 5
  • 25
0
votes
2 answers

Angular - Changing Input() from child component doesn't notify the parent that it was updated

I have a parent component which is passing some data (selectedId) to the child component using @Input(). Parent Template The child component is using the selectedId as follows: Child…
Dino
  • 7,779
  • 12
  • 46
  • 85
0
votes
1 answer

Problem with @Input property change an Angular 6

I have a problem where I am trying to implement an accordion using angular and css only with expand all and collapse all. Expand All/ Collapse All links are in parent component where as the accordions are in child component. On click of expand all/…