angular2-directives Questions
0
I have building a library with Angular 2.x/4.x to use in another projetcs.
The problem is that : Some app's are legacy, not build in Angular, like ASP NET MVC.
I have tried using the bundle '.js' ...
Shotputter asked 20/10, 2017 at 12:58
2
Solved
I'm trying to create a parent and child component where the child component is going to have a states drop down. Can someone help me understand how I can access the states drop down value in Parent...
Creasy asked 30/3, 2016 at 18:30
1
Solved
I am trying to use the excellent holderjs library in an angular2 project. Someone wrote up a very simple attribute directive which I am trying to use.
holderjs is basically a client side image pla...
Catmint asked 10/10, 2017 at 17:29
3
Solved
I examined ngStyle, ngClass directives here but I still couldn't understand how these work:
<div [attr.role]="myAriaRole">
<div [class.extra-sparkle]="isDelightful">
<div [style.wid...
Individually asked 8/10, 2017 at 13:36
4
If a certain attribute directive is present on an HMTL element, I would like to show some additional html content. I have searched but can't find what am looking for. For example if P tag has a dir...
Jadwigajae asked 14/8, 2016 at 23:38
2
I'm wading my way into Angular2. My objective is to create a responsive app that loads different components in response to different media-queries for device widths. My working example has a MatchM...
Insurance asked 18/7, 2016 at 16:49
2
Solved
I have three nested components, called level0, level1 and level2, defined like so:
@Component({
selector: 'level2',
template: `<div>I am level 2</div>`,
})
export class Level2 {
getNa...
Quarles asked 15/4, 2016 at 18:22
2
Solved
I am working on an application where i am getting responses in html format from a server.
I am using the DomSanitizer's bypassSecurityTrustHtml and adding the sanitized html to my component ().
My...
Timbal asked 14/9, 2017 at 10:47
1
Solved
Im using ngbDatepicker and ng2-datepicker-jalali. I use ngbDatepicker directive like below:
<div class="input-group" dir="ltr">
<input class="form-control"
placeholder="yyyy/m/d"
na...
Hamnet asked 28/9, 2017 at 10:14
3
I'm aware with basic 2-way binding in angular 2 as shown in the docs.
I have an array of persons, which I'm using to build an html list:
Now, when I click on a person's row, I can edit it using 2...
Pseudaxis asked 3/10, 2016 at 13:7
2
Solved
I'm developing a Github repo which follows the offical tutorial of Angular (Tour of Heroes). You can see all the code here.
My problem, is that I have a directive declared in the main module of th...
Dominions asked 6/1, 2017 at 12:8
6
Solved
I'm trying to create an Angular 4 Directive that will add class="active" on the label when the textfield is not empty
<div class="md-form">
<input appMdbInputInit type="text" name="" i...
Wellman asked 28/6, 2017 at 19:1
1
I've created a directive in Angular that checks if two controls have value. If one of them has been filled, the other must be filled too, so they have to be both empty or both filled. This is worki...
Floweret asked 22/9, 2017 at 7:32
3
Solved
I am new in angular 2. How can I move focus to next control on key enter in Angular 2. I implement this code but how not working properly. Please suggest me how I do this. Thanks
My component code...
Robledo asked 17/4, 2017 at 5:13
1
Solved
I'm looking to create angular 2/4 countdown pipe.
Of course I can make individual countdowns, but how do I create multiple ones?
I want the following input:
<span [time]="unix timestamp here"...
Murrelet asked 20/7, 2017 at 0:19
7
I want to wrap some jQuery code in an Angular2 directive.
I installed jQuery library for Typings into my project with the following command:
typings install dt~jquery --save --global
So now i ha...
Sheply asked 15/9, 2016 at 13:3
1
Solved
Here is my HTML:
<tr *ngFor="let row of formData; let i = index" [attr.data-index]="i">
<td *ngFor="let rowdata of formData[i]; let j = index" [attr.data-index]="j">
<input type="...
Foxhole asked 5/9, 2017 at 9:46
1
I have used a custom directive to detect click outside an element in angular 2 but the same is not possible in angular 4.
[plunkr] https://plnkr.co/edit/aKcZVQ?p=info
When I try using the same co...
Halbeib asked 2/9, 2017 at 5:47
4
Solved
Suppose I have a component with this template:
<div class="frame">
<span class="user-defined-text">{{text}}</span>
</div>
<style>
span { font-size: 3em; }
.frame {...
Henriettahenriette asked 29/1, 2016 at 5:47
2
I'm pretty new building directives with Angular2. What I want is to create a popup directive that will wrap the content with some css classes.
Content
Content can be pure text and headers like:
...
Immigration asked 15/12, 2016 at 13:32
2
Solved
Please help. I'm having trouble creating a directive that will always set text inputs to uppercase. It seems to be working looking at the user interface but the model binding is showing the last ty...
Cristal asked 10/6, 2017 at 1:41
2
Solved
I have a simple Angular 2 directive that modifies the input value of a textbox. Note that i'm using the Model-Driven form approach.
@Directive({
selector: '[appUpperCase]'
})
export class UpperCa...
Caucasian asked 18/11, 2016 at 17:20
2
I have a component with the name EasyBoxComponent,
and a @Directive with this @Viewchild:
@ViewChild(EasyBoxComponent) myComponent: EasyBoxComponent;
I thought this was the correct syntax, but thi...
Autocrat asked 7/4, 2017 at 6:44
2
Solved
I have been trying to implement a simple ngFor with Angular2 but I don't know what went wrong which lead to error 'Generic TYpe Array requires one argument(s). PLease favour
import { Component } f...
Remission asked 1/7, 2017 at 19:25
1
Solved
I'm building a data table component that is being designed as very generic component.
The idea is to define the table as this:
<app-datatable [items]="currentPageResult">
<app-datatable...
Galateah asked 14/7, 2017 at 23:3
© 2022 - 2024 — McMap. All rights reserved.