AngularJS directives are a way to teach HTML new tricks by extending the HTML vocabulary. Directives allow you to manage DOM elements in a declarative pattern, freeing you from low level DOM manipulation tasks.

learn more… | top users | synonyms

0
votes
0answers
5 views

Angular2: Property binding permission not used by any directive on an embedded template

I have create one directives in angular2. but, not working and return error template parse. my directives : import { Directive, Input } from '@angular/core'; import { TemplateRef, ViewContainerRef }...
0
votes
0answers
16 views

D3 (as AngularJS directive) - how to apply changed property of nested data object to DOM?

Situation I have an AngularJS1 directive for my editable D3 network topology graph, consisting of nodes (<image>) and links (<line>). Insert and deletion of nodes / links works as expected ...
1
vote
0answers
24 views

AngularJS 1.5 component get parent ngModel

I can't change ngModel defined in $ctrl. It looks like this: 1. I have next code, defining component in index.html: <div ng-controller="appControllerData"> ... <div ng-controller="...
0
votes
3answers
53 views

AngularJS dynamic search box on same page

I am new in AngularJS but I have basic HTML and JavaScript knowledge. I have a list of links on page, and a search box. I want to filter list elements dynamically according to the text typed in the ...
0
votes
1answer
34 views

Duplicates in a repeater are not allowed?Use 'track by' expression to specify unique keys.?

I have created notification service globally for the application, while sending the db call, capturing the error code in interceptors and show alert. how to avoid the duplicated Error mesage in ...
0
votes
1answer
41 views

how can I show a div and perform a task on ng-click Angular JS?

I have a list of users in a page and a form in which I edit the details of those users. the form is hidden, I want to display the form when I click on edit button and also perform the task to edit it ...
1
vote
1answer
18 views

Isolate scope in Directive with TypeScript and Angular 1

I am stuck on an issue when trying to create a new angular directive using TypeScript. The issue only happens if I am planning to use the isolate scope in the directive. Following is what I am doing: ...
-1
votes
0answers
8 views

Plot 23+ waypoints in google map direction api in angularjs?

I am using ng-map directive for creating route on google map. its working fine with less than 23 ways poits but when waypoits exceed more than 23 route cannot display on google map. <ng-map zoom="...
1
vote
3answers
35 views

how to get the scope I bind to template inside directive link

in html,i bind id inside directive: <my-customer data="id"></my-customer> in js: angular.module('Main', []) .controller('Controller', ['$scope', function($scope) { $scope.id= 'divId'...
1
vote
4answers
28 views

why the factory is not able to access inside the controller

I have created notification factory and pass inside controller,Inside controller when assign the factory to the scope getting error. alertsManager MyApp.factory('alertsManager', function() { ...
0
votes
0answers
10 views

Notification alert service not working in controller getting typeError: Cannot read property 'alerts' of undefined

I have capturing the application response error ,while capturing the error, i am getting the error. In Interceptor ,according to the response code , have assign the rootscope broadcast and show the ...
0
votes
2answers
19 views

How to sort datetime ng-repeat in Angularjs?

I want to 27 December top 26 , 25 ...sort created_datetime. How to do this? <tbody class="gradeX" ng-repeat="x in Profile | orderBy: x.created_datetime"> ...
0
votes
2answers
23 views

Dynamically manipulate attribute values of Angular directive template

I have a directive in this format: <img id="imgId" src="img/sample.jpg" border="0" width="100%" usemap="#image-maps-sample" alt="" /> <map name="image-maps-sample" id="sampleMap"> <...
2
votes
1answer
33 views

AngularJS - How to refresh directive scope

I've created a simple datepicker directive which have an "options". So I start the datepicker with a set of options, and then because of business logic I change those options, but this are not being ...
2
votes
0answers
32 views

Apply CodeMirror to a ng-model-bound textarea

I am coding a very very basic playground. For some reason, I need to embed the html panel inside an AngularJS app. In this version, I put a JQuery change listener to the CSS panel, and applied ...
2
votes
0answers
28 views

Calling a jqLite function inside a AngularJS directive

I need to call the jqLite slideToggle function inside a AngularJS directive to animate the collapsing of each content-box. I want to slideDown/slideUp the following div.. <div class="ibox-content"...
0
votes
0answers
35 views

dymanic value passing in templateUrl in angularjs

What i am doing is creating one custom control with form-name, name, model, title attributes , that replace with a template with the textbox with respective validations HMTL: <form name="usrForm"...
0
votes
1answer
39 views

Angularjs Data Binding among Controller, Directive, and Service

I am trying to update content of a directive with the data coming from a service. It works like this: Service (html5 canvas service) -> calls a method in controller on some action Controller updates $...
-1
votes
0answers
16 views

I want to know that maximum numbers of column can be shown in ng-gird?

I have more than 30 colums in ng-grid and but few of the columns are missing and though they are visible on choose column option. http://embed.plnkr.co/FADs8F/
0
votes
1answer
26 views

why does angular directive disable text filter?

I am adding a readmore directive to an angular app. The read-more works great, but try to use a filter for text and it does not interpret the filter string correctly. Example: http://plnkr.co/edit/...
1
vote
1answer
27 views

Using ag-grid, how can I get the `api` attribute to not be null when working with angular 1.5 and directives?

Disclaimer First, I'd like to note I'm completely new to Angular so I am probably doing something wrong / dumb. I have finally come to the point where I'm not sure what else to try. Context I an ...
0
votes
0answers
32 views

execute directive function after ng-cloak

My content use ng-cloak directive and i would like to get a element height with innerHeight() in a directive. But, when the innerHeight() is use the element is hide by ng-cloak so the result is ...
0
votes
0answers
16 views

download Excel with filtering in Angular JS

I would like to implement exactly excel-like filtering such as If there are 2 columns, one of name and other would be of age. Now when no filter is applied, filters are showing all data. When we ...
0
votes
1answer
14 views

angularjs directive refresh $compile:tpload exception

I have a directive on my application that contains tempateUrl for view. app.directive("testDir", function($window, $rootScope, $timeout) { return { templateUrl : "app/tpl/test.html", ...
4
votes
2answers
63 views

Creating and updating the global list with with angularjs in ionic

I try to declare a global list in my ionic project with rootScope variable. My aim is to update this list with specific messages. According to my scenario, I have different views with their forms. I ...
-2
votes
1answer
20 views

Angularjs Custom Directive for table creation

I want to create a angularjs directive which can be used in many pages, The directive should handle the html table creation, It can have different columns depending upon the requirement of the page. ...
2
votes
2answers
55 views

Can someone explain this piece of angularjs directive code?

I come from stricter languages such as Java, C#, C++ and have been using this code to read file into textarea without understanding how it worked due to time issue. Now I'm trying to learn directives ...
0
votes
1answer
34 views

how to pass value from dropdown ng-change event

i want car_id how to get car_id from dropdown and pass to ng-change event please help me <select ng-change="carsCtrl.ok(car_id)"> <option ng-repeat="item in carsCtrl.current_job....
0
votes
1answer
22 views

Get first and last enabled item

I would like to get the first and last enabled item or where disabled = false from the object. I have tried: $scope.firstEnabled = function(obj) { for(var i = 0; i < obj.length; i++){ ...
0
votes
1answer
43 views

Angular.js - ngModel value is undefined when ng-pattern is set in directive

something similar may have been answered (ng-pattern + ng-change) but all responses were unable to fix this issue. I have two imbricated directives for creating a form input, a parent directive to ...
0
votes
0answers
31 views

HTML Page view page source not showing content load from angularjs

I am using angularjs for load data from webservice. i am getting JSON data from webservices and bind it to html page using ng-repeat in angularjs directive. After successfully page load when i right ...
1
vote
1answer
29 views

angular2 dynamic html insertion using directive

I am trying to insert html using component, and I need to bind the newly created HTML element. Following is my code snippet. whenever the user tries to enter text to the textarea, the textarea should ...
0
votes
1answer
20 views

bind or print from directive

I am accessing my selected file using a directive as suggested by some SO answers,and i am able to console my file name in the directive.Now i want to bind that name to html from that directive........
0
votes
1answer
34 views

How to properly bind object in 'bindings' using $compile in angular.js 1?

I want to dynamically compile component for inserting this to specific DOM element (DOM also dynamically created by 3rd party library). So, I use $compile, $scope. https://jsbin.com/gutekat/edit?...
1
vote
2answers
34 views

disable button if none of the options are selected angularJS

I would like to disable the add button if none of the options in the list are selected or if the selected class is not there in the list. HTML: <div ng-repeat="json in myJson" ng-class="{'...
0
votes
1answer
24 views

unit testing directive and isolatedScope not a function

I am trying to unit test a directive that was previously written and for my first unit test all I want to do is check a variable inside the scope of the directive. However, every time I try to run ...
0
votes
0answers
18 views

angular 1.3 directive CSS optization

I use angular 1.3 (so I can not use components), and I created a directive with some style in the templateURL. So each time I use this directive the CSS is loaded. So I would like to know is there is ...
1
vote
1answer
46 views

Writing a jQuery function as a AngularJS directive

I need to write a jQuery function as a AngularJS directive but I don't know how to use specific jqLite functions (closest, find..) and $(this) inside my directive. I've tried it like this: jQuery ...
1
vote
1answer
20 views

Angular nvd3 line chart is wrongly alligned when we use DateTime as X-Axis ticks

I am currently working with NVD3 using Angular Directive (angular-nvd3). I have a very simple line chart with very simple data. The problem I have encountered now is that my data is wrongly aligned ...
-3
votes
0answers
17 views

how to sum ng-repeat sum values and add in total

how to sum item.cost show in total when i change 2 + 2 its how old value 19 not 4 <tr ng-repeat="item in submittedinvoicesCtrl.current_job.invoice.work_items"> <td><input type="...
0
votes
1answer
21 views

Using angular 1.5 angular.js:Unknown provider: $uibModalInstanceProvider

I have an Angular 1.2 project, and I have a controller which I want to replace using Component. This new component is open from uibModal and it contains another directive. Before changing it to a ...
0
votes
3answers
38 views

how to call method inside $http body angularjs

I want to call editopenComponentModal in my other method its show error angular.js:13920 TypeError: Cannot read property 'editopenComponentModal' of undefined EditCurrentJob(job) { this....
0
votes
0answers
10 views

AngularJS MultiSelect MultiOptions with Header drop down box directive

I`m looking for directive or any other implementation for extended drop down box with option to show more then one columns in options and multi select feature. Above example of Telerik component
0
votes
0answers
29 views

why angular $q service response gets null with mvc json response

I have created an small login page with angular js with mvc . When submit the login ,it goes into the below function. function LoginController($scope, $rootScope, LoginService,$location, $...
0
votes
1answer
23 views

two way binding reflecting change in parent template but not in parent controller

I have created one custom directive using isolate scope for way data binding. I am broadcasting event from parent to change one of the variable value and then binding this changed value to variable ...
0
votes
1answer
20 views

Angular attribute directive add ng-change

I have a directive defined as: module.directive('inputChanged', function () { function link(scope, element, attrs) { var field = attrs.ngModel; if (field) { ...
0
votes
0answers
16 views

How can i back-port angularjs directive features from latest version?

I am new to Angularjs, how can I back-port 'md-datepicker' directives features of angular material version1.1.1/css to angular materail version1.0.1-rc2/css, please suggest easy way to do it. Thanks
1
vote
2answers
62 views
+50

AngularJS bootstrap popover custom directive

I have created a directive using bootstrap custom popover. That works taking an input from a user for a group name and it has two buttons for apply that value to model and show that value on tooltip ...
2
votes
3answers
46 views

Directive showing empty tab

I want to implement directives in my app, but I can't even start with the simplest one. Can someone tell me why? JS: angular .module('app.admin.catalog.nutritional_facts') .directive(...
0
votes
0answers
22 views

Defining a dynamic directive template based on link function

I want to build my own "ng-repeat" as practice in Angular 1.6. So I was thinking: I get the element at the end (link), do a "forEach" loop on the element based on the scope variable and so on... The ...