A concept of 'command' used by many programming languages and frameworks. Use this tag with a language and/or framework to indicate context. The C/C++ pre-processor is one language that relies heavily on directives. They call it "pragmas".
Questions tagged [directive]
2065 questions
0
votes
1 answer
How to load an action in angular directive as a modal
How can i load ActionResult in directive?
i am new in angular and got this bad challenge and i don't know how shuld i do this.
is there any simple way for using modal in angular and load an MVC action in that?!

MehdiZohrevand
- 1
- 1
0
votes
1 answer
Two-way communication between parent directive and child directive in AngularJS
I need to pass in a value from the parent directive to the child directive, update it, then pass it back. When I pass in the parent function, and create a two-way binding, I get the error:
scope.updateItem is not a function
How can I accomplish…

user3871
- 12,432
- 33
- 128
- 268
0
votes
0 answers
call multiple time to function in ng-if in directive template
HI have directive with template .
in the template I use with long ng-if like:
ng-if="exp1 && (exp== '' || exp == null) && ..."
how can I add the ng-if into a function that return true or false?
it should be updated if the scope has changed.
when…

Scopi
- 663
- 1
- 6
- 21
0
votes
1 answer
$parse fails on date expressions
I have a component that somewhere inside that component it has a code like this:
var getAttribute = $parse(attrs[key]);
when $parse service is passed a string like this2017-03-06 14:40:19 it fails and produce the following error:
Error:…

Rathma
- 1,196
- 2
- 33
- 65
0
votes
1 answer
Angular2 *ngIf with child directive
I can't seem to get my directive to work and wonder if it is due to the use of an *ngif.
Component HTML:
{{ticket.raisedBy.firstName}}…

Mad Eddie
- 943
- 3
- 12
- 23
0
votes
1 answer
Passing scope variable to directive's controller
My directive has separate controller in js file, which has a scope variable parameterDatabase which need to be populated from calling page. I am unable to find the way to pass value to it.
Directive…

user3513192
- 97
- 2
- 14
0
votes
0 answers
Ionic 2 How to bind a dynamically added div text to model?
What I need to accomplish is to have a ion-input binded to model, but displaying a formatted value while keeping the raw value in model.
Text-mask does not apply here as afaik, it would transform the raw value too.
So I went to a solution where I…

Emmanuel FRANCOIS
- 43
- 1
- 9
0
votes
2 answers
VueJS update $data inside directive
We got a component and directive. Our component data structure looks like this:
{
langs: [
{
title: '',
content: ''
},
{
title: '',
content: ''
}
]
}
Inside our…

Flappy
- 848
- 15
- 31
0
votes
0 answers
Dynamic add directive in controller in angularjs
I wrote the followings in a controller in angularjs:
var firstName = angular.element('
0
votes
1 answer
angular why collection isn't rendering in template
I would like to know why my collection of persons isn't rendering in this directive:
http://codepen.io/agustincba/pen/vgOLVV
modulo.directive('personRenderer', function(){
return {
restrict: 'E',
template: `
…