In our Angular 4 app, we've a <parent-component> which has a <form> The <form> has <level-1-child> The <level-1-child> has <level-2-child> The <level-2-child> has <textarea> What we need to do?...
My target is to send data from Angular component to service and use service methods to work on it. Example: export class SomeComponent { public data: Array<any> = MyData; public constructor(private myService: MyService) { this.my...
This is in continuation of the previous question I asked on SO: Add directives to component selector when it is declared - Angular 7 I am dynamically creating components on a button click. The components are displayed one below another in a list lik...
Sorry if it's a silly question but i am a noob in angular 1.5.x I am using es6 class based components with one way data bindings throughout the app(best practices as far as i know). I have a Container Component. It has a Sidebar Component and...
I have a strange problem where by the form submit event of my child form is firing twice on my parent form. child.component.html <form [formGroup]="childForm" (ngSubmit)="childFormSubmit()"> ... </form> child.compone...
I'm writing an AngularJS component and I was wondering what's the correct way to add ngdoc annotation both to the component itself and to the controller function. Do you have any examples?...
Taken from the AngularJS 1 documentation: You can also make the binding optional by adding ? : <? or <?attr. How does the optional one differ from the non-optional one for the one-way binding? I can seem to figure out the differences for...
I am new to Angular and am running into an issue with the constructor on a child component being called twice, and the second time it is called it is clearing the properties set the first time. This is the parent component: @Component({ selecto...
Error compiler.js:215 Uncaught Error: Template parse errors: Can't bind to 'ngbCollapse' since it isn't a known property of 'div'. ("][ngbCollapse]="isHidden"> I have a NavbarComponent and a FooterCompon...
I have piece of html I want to show as a component, as I'm not manipulating the DOM. As a directive it works fine, but as a component it doesn't. I have made components before with no problem, just can't see what the issue is here. If I...
©2020 All rights reserved.