Top "Angular-directive" questions

At a high level, directives are markers on a DOM element (such as an attribute, element name, comment or CSS class) that tells the Angular 2+ framework to attach a specified behavior to that DOM element or even transform the DOM element and its children.

AngularJS: Using $compile on html that contains directives with templateurl

I have a legacy application that has some content inserted into the DOM via jQuery. I would like the legacy …

javascript jquery angularjs angularjs-scope angular-directive
AngularJS Upgrade (1.5 to 1.6,1.7) Makes directive scope bindings undefined

I have the following code: angular .module('myApp') .directive('layout', function () { return { restrict: 'E', template: '<div ng-include="layoutCtrl.…

angularjs angular-directive angular-controller angularjs-1.6
Angular 4 directive error: Can't resolve all parameters for directive

I'm totally new to Angular and trying to inject basic structural directive from Angular guide. Here is my directive: import { …

angular typescript angular-directive
Cannot read property 'viewContainerRef' of undefined

I am trying to display a dynamic component similar (not exact) to the example in angular docs. I have a …

angular angular-directive angular-components
How to restrict Special character in material input

I have a material input control, i have restrict the special character while user enter, but when type some words …

angular angular5 angular2-directives angular6 angular-directive
Error: [$compile:multidir] Multiple directives

I have a custom directive like this : myApp.directive('input', function () { return { restrict: 'E', scope: true, link: function (scope, elem) { …

angularjs angular-directive
Angular 5: Module not found: Error: Can't resolve '@angular/forms/src/validators'

I am trying to create a custom validator using directive but getting below error. ERROR in ./src/app/CustomValidators/white-space-validator.…

angular typescript angular-directive customvalidator angular-validation
Adding Multiple 'require' Options for Angular Directive

Usually in Directives, I use require: 'ngModel' if I want to pass the scope to it. This works fine. But …

javascript angularjs angularjs-directive angularjs-scope angular-directive
When and why to use &?, =?, @? in AngularJS?

I followed some tutorials to create angular directives. In the isolate scope, some tutorials define scope like this: scope: { model: …

javascript angularjs angular-directive
Angular 2.0 Release: Pipes and Directives are not properties of @Component anymore

I just upgraded my app which I built on RC5 to the final release, and I'm confused of the way …

angular angular-directive angular-pipe