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

AngularJS directive - Rendering text as HTML content

I have the following directive: myApp.directive('testimonialCard', [function () { return { restrict: 'E', replace: true, scope: { linkUrl: '@', authorName: '@', authorTitle: '@', …
0
votes
1 answer

read file directive with controller as

I need some help. I build the following directve to translate docx file into html string. (function(){ 'use strict'; angular .module('app.core') .directive('uploadFile', uploadFile); function uploadFile($rootScope, $parse){ …
Pierpaolo Croce
  • 57
  • 2
  • 14
0
votes
1 answer

How can i call a service from a directive in Angular 2

I can't call my service from this directive. I use a template with with wizard.js to make a wizard modal form. I'm not sure if it's a angular 2 problem btw. Here is my directive : import {Directive,Input, EventEmitter, ElementRef, Output} from…
Adrien Castagliola
  • 911
  • 2
  • 11
  • 30
0
votes
1 answer

Angularjs ng-click clear input and update scope

1. Directive: app.directive('inputField', function() { return { restrict: 'E', require: 'ngModel', scope: { words: '=ngModel' }, transclude: true, template: "
andrzej
  • 495
  • 1
  • 7
  • 18
0
votes
1 answer

Kendo-ui angular directive on editor

I'm trying to attach an angular directive to ` { field:"stateID", hidden: true, title: "State", editor: function (container, options) { var _statesDirective = $('
'); …
Mike Gmez
  • 111
  • 3
  • 18
0
votes
1 answer

Angular Js | Lazy Load Directive based on ViewPort

Is it possible to lazy load directives? Say we have 20 Directives on a single page, and on scroll, if the directive is in viewport it should get rendered.Otherwise no action should take take. It should behave as lazy loading of images. Can we…
Kunal Vashist
  • 2,380
  • 6
  • 30
  • 59
0
votes
1 answer

allow only specific ips to access site and allow all to access specific file

I have this configuration in my httpd.conf AllowOverride none Order Deny,Allow Deny from all Allow from 66.220.144.0/20 69.63.176.0/20 Order deny,allow Allow from…
0
votes
1 answer

How to call AngularJS directive function to another controller?

custom.js function config($stateProvider){ $stateProvider .state('test_page', { abstract: true, url: "/test-page", controller: "testController" templateUrl: "test.html", …
Chinmay235
  • 3,236
  • 8
  • 62
  • 93
0
votes
1 answer

Htaccess: Redirecting entire domain while redirecting certain user agents to other domain?

as the title states, I would like to redirect an entire domain to a single URL, while redirecting certain user agents to a different domain. It's important that all redirects are initiated by htaccess. That's my code so far: Options…
0
votes
2 answers

How to define common directives in controllerAs syntax?

I was reading Digging into Angular's "Controller as" syntax article. It shows below snippet to use "Controller as" syntax in directive. app.directive('myDirective', function () { return { restrict: 'EA', replace: true, scope: true, …
Farhan Ghumra
  • 15,180
  • 6
  • 50
  • 115
0
votes
1 answer

Passing Booleans with AngularJS Directive inside other one

I hope than someone could help me :) I am a little newbie in the angular directive world so I try to do something simple I have a directive inside an other directive same in Reactjs I would like pass though my value to the directive inside this is…
0
votes
1 answer

Extending input by using my own service

I want to extend input of type text in angular in such a way that after user enters some text, the text value is passed through a custom filter that do some purification on entering input, here is what I have come until now, but I am getting an…
0
votes
1 answer

Fire $watch only when changed externally

I am writing a Video directive to encapsulate the HTML5 video tag and provide basic binding around it. It all works great but I have a problem with the currentposition property. I…
Chris
  • 26,744
  • 48
  • 193
  • 345
0
votes
2 answers

Having issues changing .word to .equ

I'm having this lab class about microcontrollers (we're using FRDM-KL25Z128) and I'm having trouble with the directives .word and .equ. First, the sample code our professor gave us is meant to blink the red LED on the FRDM board, and it's the…
0
votes
0 answers

Creating a service to dynamically append a directive to a DOM element?

I have a semi-complex directive. Here's the HTML which it uses as a template...
Allenph
  • 1,875
  • 27
  • 46