Questions tagged [directive]

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".

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?!
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…
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: ` …
0
votes
0 answers

Angular directive - sharing an ng-model with multiple child input elements

I have an angular directive the contains 2 input elements. I want to pass in an object to ng-model and have the two inputs update properties of the object. How can I accomplis this? This will…
Maverik Minett
  • 2,131
  • 3
  • 17
  • 28
0
votes
1 answer

Refresh cache for a directive

I have a mini application about the weather forecast. This is the flow for getting the weather information for a location: Search for a location Click on the result list below. The map will update and show a marker. Click on the marker and the…
vuquanghoang
  • 370
  • 2
  • 5
  • 15
0
votes
1 answer

AngularJS Custom directive How to access object value?

Here is my html code where i am calling directive
Subodh Joshi
  • 12,717
  • 29
  • 108
  • 202
0
votes
1 answer

HTTP Error 403.14 - Forbidden when uploading file angularjs

I am creating a web app in which I am storing user images in my folder, after a while I found an example which helps me, but I am getting the error HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this…
user6656728
0
votes
1 answer

Manipulate dom with AngularJS

I want to convert DOM mean the following list to a dropdown list of menu. in DOM through AngularJS
  • Option 1
  • Option 2