Questions tagged [angular-components]

A component controls a patch of screen called a view. Component decorator allows you to mark a class as an Angular component and provide additional metadata that determines how the component should be processed, instantiated and used at run time.

Components are the most basic building block of an UI in an Angular application. An Angular application is a tree of Angular components. Angular components are a subset of directives. Unlike directives, components always have a template and only one component can be instantiated per an element in a template.You can see more information on components here

2024 questions
0
votes
2 answers

BSModelservice callback function returning error. I am using angular 6 and ngx-bootstrap/modal

I am getting below exception. ERROR TypeError: this.callBackOnSave.emit is not a function Child Component @Input() showDeleteBtn: boolean = true; @Input() showGrid: boolean = true; @Output() callBackOnSave: EventEmitter = new…
0
votes
1 answer

Angular component input static typing

I have 2 angular components. ButtonComponent that has an input of type ButtonText @Component({ selector: 'app-button', template: '

', }) export class ButtonComponent { @Input() text: ButtonText; } export class ButtonText { …
0
votes
2 answers

Angular 2+ ng-bootstrap modal pass Html

Okay, I have my modal set up like this. Please remember that I am working in a Component Library not just the application. Inside my Component Library... I have my template
Funn_Bobby
  • 647
  • 1
  • 20
  • 57
0
votes
2 answers

Angular 2+ add ng-bootstrap Modal to component library

I'm working with ng-bootstrap and I would like to add a reuseable modal to the component library I've built. I have my template

0
votes
0 answers

How to identify if child dynamic component is loaded or not

I am working on solution. I have created a table having each row with expand button. On click of an expand button i am loading dynamic child component after that specific row. After rendering child component that button should be updated with (-)…
Ripul Chhabra
  • 234
  • 2
  • 17
0
votes
1 answer

When is HTML rendered in Angular2 apps

Consider there's an Angular2+ app containing components numbered 1-10. Component 1,2,3 are in Home Page. Component 1 is the bootstrapped component. Component 9 and 10 are configured to lazy load. Now when is the HTML/CSS/JS of the Components…
0
votes
1 answer

Angular How to get initial value of a FormControl in Childcomponent

How can I get the initially set FormControl value of a custom component in it's ngOnInit method? If you set up a form control like so: testControl = new FormControl("abc123"); Then bind it to your custom component in the html with the attribute…
0
votes
2 answers

how to create existing component multiple times on button click - Angular

I'm trying to create a component several times on a button click. The button is in the parent component and when the click "Add more" it will create the child component as many times as they click "Add more". By default there's only one child…
Patricio Vargas
  • 5,236
  • 11
  • 49
  • 100
0
votes
1 answer

Angular 5: How to embed a component into another

imagine, I have a generic table component with expandable rows and I need to inject another dynamic content (a dynamic SVG in this case) into this expandable rows from within a component, that uses the table. Example: my-table.component.html //…
Tea-Kay
  • 11
  • 3
0
votes
4 answers

Any other way to establish communication between components angular 5

I have established the following ways to build communication between the components. 1.@input and @output decorator(but only limited to parent child) for sibling components 2.creating a service with getter and setter method(but limitation is if we…
Abhiz
  • 970
  • 1
  • 16
  • 36
0
votes
1 answer

How do I create a dynamic Component as a parameter - angular agGrid cellEditorFramework

Not sure if it matters, but I am using agGrid, but it is basically creating a dynamic component as a parameter. This works fine as my GridOptions: ... children: [ ... cellEditorFramework: SelectCellComponent, ... ] ... but what if I…
naspinski
  • 34,020
  • 36
  • 111
  • 167
0
votes
1 answer

Access Angular 6 component library values with 2 way binding

Working in Angular 6 I've successfully created a Angular Component Library and added a component that has a drop down control in it. I've added the neccessary imports in app.module and got my library component to show up!!! ..using its selector…
Funn_Bobby
  • 647
  • 1
  • 20
  • 57
0
votes
2 answers

Use Angular Material globally with Component Library

I've created a component library in angular 6 and I would like to use Angular material components globally in my component library. I've tried importing into app.module.ts (not exposed to library) I've tried altering my main.ts to include @NgModule…
0
votes
1 answer

TS2307: Cannot find module (all modules) - after moving folders

I decided to moving folders in order to organize modules as follows: Automatically was changed app.module.ts: app.module.ts with important part of debug.log But, when I try to use npm install or ng serve I get: ERROR in : Can't resolve all…
plkpiotr
  • 345
  • 2
  • 9
  • 23
0
votes
1 answer

How can I expose a menu component throughout the application in Angular 6?

I am currently getting my feet wet with a small Angular 6 application structure as follows: (shared.module.ts) import { NgModule } from '@angular/core'; import { MainMenuComponent } from './main-menu/main-menu.component'; import { MainRoutingModule…
Andrei Dascalu
  • 1,059
  • 2
  • 14
  • 26
1 2 3
99
100