All Questions
Tagged with angularjs-directive angular-directive
108 questions
1
vote
0
answers
32
views
What would be your representation of a particule as an angular directive
I believe, the answers will provide nice and complete examples of angular's directives and also different points of view of actual understanding about particules. It applies to Angularjs and Angular ...
3
votes
2
answers
1k
views
Convert angularjs directive to angular 10
I want to use this code in my angular project:
'use strict';
/**
* Floating text animation (random)
*/
angular.module('g1b.text-animation', []).
directive('textAnimation', ['$document', '$interval',...
2
votes
0
answers
336
views
Angular directive for numbers with decimals and key board copy paste support
<input type="text" formControlName="reg_retail" appTwoDigitDecimaNumber/>
@Directive({
selector: '[appTwoDigitDecimaNumber]'
})
export class TwoDigitDecimaNumberDirective {
// Allow decimal ...
0
votes
1
answer
169
views
how to reload directive data in angularjs?
I am using this directives https://embed.plnkr.co/plunk/XArO6p in my app. I want to refresh the data in this directive whenever the user revisits the the same page in my app. how can I do this?
1
vote
0
answers
550
views
nativeElement.value is incorrect in angular 7 directive
I got incorrect value when I'm trying to select nativeElement.offsetwidth and nativeElement.offsetLeft. for both gotten value are the same and is different when I am consol.log full nativEelement.
...
1
vote
1
answer
34
views
Update angular directive attribute value from parent controller
I have a Angular directive like this:
angular.module("app", ["customers"]).run();
angular.module("app").controller("appController", function($scope) {
$scope.customers = [{ name: "Microsoft" }];
...
1
vote
2
answers
78
views
Specify a directive as parameter (plugin) to another directive
I have a "host" directive, into which I wish to display a "plugin" directive one out of multiple possible "plugin" directives (say, plugin1, plugin2, plugin3 etc), and I want the container of the host ...
1
vote
0
answers
28
views
AngularJs directive access in new Angular [duplicate]
I have an Angular v5 application running on the same page as an AngularJs v1.2.23 application. Is it possible to access & use a directive from the older AngularJs application in the new Angular ...
0
votes
1
answer
128
views
TypeScript + AngularJS : Directive returning 0 on scope.$eval
I created a directive to compile some html then bind it to my element.
Here is the directive
export class BindCompileHtmlDirective implements ng.IDirective {
restrict = 'A';
link = ...
1
vote
1
answer
627
views
Query selector in nested AngularJS Directives
I'm using two directives in this HTML code:
<div animations>
<h2>Title</h2>
<span class="animateBtn">Animate!</span>
<info-section></info-section>
&...
0
votes
1
answer
34
views
Reinitialise directive on change of attribute
I have two directives, calling 2nd directive from 1st directive.
This is my 1st directive
var initializeWidget = function ($compile, $timeout, $rootScope) {
return {
restrict: 'EA',...
2
votes
1
answer
3k
views
How pass function inside directive to another directive
I have two separated directives. If some condition is evaluated to true I have to call second directive inside first.
myDirectives.directive('first', function() {
return {
restrict: "E",
...
-2
votes
1
answer
60
views
How to correctly call a controller function with in a directive?
I am using a directive in my html page under the impression of a controller. I need to call a controller function from that directive but I am unable to correctly do that. Every time there are some ...
0
votes
1
answer
174
views
Second AngularJS directive not loading from html attribute
I have this directive which avoids an input to be marked as $pristine:
(function () {
'use strict';
angular
.module('blocks.noDirtyCheck', [])
.directive('noDirtyCheck', function() {
...
0
votes
1
answer
2k
views
Access scope from link function in directive AngularJs?
I am trying to access the data in an ng-repeat from the link or controller function of the directive. My directive code looks like this.
app.directive('ssLeftNavDirective', function($rootScope) {
// ...