Questions tagged [angular2-directives]

Use for questions about Angular 2+ directives

1806 questions
0
votes
0 answers

Angular 2 or 4 passing directive as @input to component html dynamically

I have created the text input field as component. Now i am using the component in a form multiple times. I want to apply a directive only to selected fields. I want to pass the directive name as the @input to component and pass it to component html…
0
votes
1 answer

Angular 2 set boolean at end of iteration using *ngFor

I am loading some data via rest-endport to safe it in an array. In an *ngFor directive i am currently iterating through all that data. So everthing is working. Is there any possible way in Angular to e.g. set a boolean whenever the iteration of the…
0
votes
1 answer

How to do Angular2 work with templates?

I am trying to use templates with Angular2 and it is not working as expected. Here is what I have tried so far. Does anyone have any ideas or maybe another way that I could approach it? First of all, I am using MEAN stack that express generates an…
0
votes
2 answers

Angular 2: Custom Directive which detects screen resize

I want to create a custom directive which can detect the change in browser height and width. My Directive: import { Directive, ElementRef, Input, NgZone} from '@angular/core'; @Directive({ selector: '[resize]' }) export…
Kishore L
  • 188
  • 1
  • 14
0
votes
1 answer

Mediawiki images 403 denied access

I have set up MediaWiki on Ubuntu 16 following Wiki family drupal style sites and no matter what I do I get 403 forbidden on all images. That is, images do not show on the wiki, nor when directly navigated to in the URL. The images directory is…
petergus
  • 1,192
  • 1
  • 12
  • 18
0
votes
0 answers

Modal is not opening in Angular2

I am trying to open bootstrap dialog box in Angular2 application. When I open it on click of button, it's working fine, But when I try to open it from component, It's not working and showing error "Property Open doest not exist on type…
0
votes
1 answer

How to iterate table loop without hard coded in angular 2

I am new to Angular2 and I have json data something like this which I need to iterate in my table. every key value is different so do I need to interpolate every key value or something can do smarter way. what if I have hundreds of rows. [ …
U rock
  • 717
  • 2
  • 13
  • 32
0
votes
2 answers

How to get value/id of other elements when button clicked

I made a simple application using angular2. In my application In a table some records are shown. When user selects any of the records then that particular field is editable and button shown next to it changes its title to 'Save' fro 'Delete'. My…
Rahul
  • 5,594
  • 7
  • 38
  • 92
0
votes
1 answer

Shared angular 2 module throwing error while building aot

I have created a shared angular 2 module for separating the reusable components. Everything works fine but getting the below error while building aot, pfb the error Error encountered resolving symbol values statically. Calling function…
Prats
  • 1,745
  • 4
  • 24
  • 28
0
votes
1 answer

Add lines of code depending on folder structure - Precompiler?

I have objects of different types. Nevertheless, I want to display all types in one Angular2 component of mine. Here's the code I use for that: in for-loop:
user2065501
  • 99
  • 2
  • 9
0
votes
1 answer
0
votes
1 answer

Which version of flex-layout is supported is Angular v2.x?

I am using Angular v2.4.10. I want to install flex-layout for Angular v2. But the latest version (2.0.0-beta.8) of @angular/flex-layout will require Angular v4.x and will not be compatible with Angular v2.x from this link…
user2301
  • 1,857
  • 6
  • 32
  • 63
0
votes
0 answers

nested component in angular are not trigger for id

i am trying nested component in angular 2 where we add dynamically component on click multiple time but the problem is when we click on check box of second component it always trigger the first component checkbox..my code in html is follow how to…
0
votes
1 answer

Seeking advice about Directive Implementation in Angular 2

I am designing a text editing component. I have developed the basic text editor to a minimally viable state. Now, I want to be able to add the ability to implement field text / templates. I am imagining that the markup will look something like…
Jared Clemence
  • 1,062
  • 11
  • 26
0
votes
2 answers

How can I execute action after data-bind in Angular 2?

I'm developing an Angular 2 SPA. My application is composed by: One component One directive I've builded one directive that format text input using onfocus and onblur events. On focus event remove dots to text value, on blur event add thousand…
ilMattion
  • 1,841
  • 2
  • 24
  • 47