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
1answer
24 views

variable is not acting independently when using multiple copies of same angular directive

I'm trying to create a directive with 2 radio button binding with update variable. Now I planned to use the same directive in once again. Now the problem is the scoped variable update is not acting ...
0
votes
0answers
24 views

AngularJS OrderBy not working in angular 1.5

<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.2/angular.min.js"></script> <script> angular.module('...
0
votes
1answer
8 views

Microsoft.Maps.loadModule with Angularjs

I am using Microsoft.Maps.loadModule in a directive for AutoSuggest functionality. Problem is that script is loading async and my directive trigger before script is loaded... Can you provide me with ...
0
votes
1answer
18 views

Reusing code for several UI-Select in angular app

How can I reuse code if i have more than one ui-select in my angular app and all dealing with different remote API to show options? With reference to AngularJS Wrapping a ui-select in a custom ...
1
vote
0answers
20 views

ui-view inside the ui-view

I am creating single page application, when i load the page my index.html will start with login page, in index.html i am using ui-view, login page is load inside the ui-view, and when i logged in home ...
0
votes
2answers
27 views

What is the best way/practice to list titles of the months (Angularjs)

What is the best way/practice to include the titles of the months in html if you are making Angularjs project? here is snippet of the ugly hard-code that I want to make better: <div> <...
0
votes
1answer
21 views

How to have data synced between directive controller and parent scope

I know that this probably have been answered several times, and it might even be pointed out in Angular documentation, but I can't for my life understand how to do this 'correct'. I have a directive ...
0
votes
3answers
35 views

Not Able to access ng-model value in controller

I am having a code in which I am trying to access the ng-model values inside the angular controller but getting undefined everytime I am trying to call the ng-model value. Code var app = angular....
0
votes
0answers
30 views

No api call in angular directive

I have come to know that api calls should always be handled in services and not done in directive. Can somebody throw some light on it? What are pros and cons if I make api call from directive?
0
votes
1answer
38 views

AngularJS Directives - why do I need to call $compile in link() for expression defined in compile()?

I have this code: app.directive('foo', function($compile) { return { restrict: 'E', scope: {}, template: '<span>{{bar}}</span>', compile: function(element, attrs) { ...
-1
votes
0answers
21 views

$digest 10 times inside directive with default filtering

I am trying to implement pagination and filtering within a custom directive. Everything works fine but there are many errors showing 10 $digest iterations reached. The filtering works as follows: &...
0
votes
0answers
14 views

Angular 1.5 component templateUrl not working

I have just started using Angular 1.5 components and have the following snippet of code angular.module('vizzle').component('teacher', { bindings: {}, /* @ngInject */ templateUrl: '/app/...
1
vote
1answer
33 views

How to add item cost in Angularjs?

I want to add work item cost but its show original value. Example: item[1].cost =2 ,item[2].cost = 2 .. When I add 3rd item[3].cost = 8 it's Total = 228. I want add SUM, how to do this? I want ...
1
vote
3answers
34 views

Angular, directive isolate scope

Still trying to learn Angular I have a plunker here https://plnkr.co/edit/3FLmBtHP5TuOwWZHBMLK?p=preview I'm just trying to create an example of a directive with isolate scope. I'm using $http and ...
0
votes
0answers
21 views

ng-enter not working when I use controller as syntax

I am trying to use ngEnter directive in my angular app app.directive('ngEnter', function () { return function (scope, element, attrs) { element.bind("keydown keypress", function (event) { ...
-1
votes
4answers
41 views

AngularJS - TypeError: Cannot read property 'push' of undefined when ng-repeat a div

I am creating an ionic mobile Apps project. I want to display a particular div multiple times in a html page. After that, I would like to display images etc. for each of the div. Here are my codes ...
0
votes
0answers
22 views

High chart with angular directive in dynamic ionic slide box

I want to create dynamic slide box with high chart with directive . I created directive to show high chart and it is working fine . codepen.io/anujsphinx/pen/JbVpvp Now my json response( vm.items) ...
0
votes
2answers
22 views

AngularJS access directive controller variable in directive link function

Although this question has been asked before, it is not working for me. The controller variable "myVar" is set before the link function is called. And according to docs and other posts myVar should ...
1
vote
0answers
19 views

Group within table angularjs

I'm relatively new to Angular but using it to build out a dynamic pivot table structure. Here's basically what the end result is supposed to look like (sorry for poor image quality): both the ...
0
votes
2answers
34 views

How to access directive's controller variables in directive's template?

Need to use variable (defined inside the controller element of directive) in the template element. angular.module('home').directive('mediaTile', function(){ return { restrict: "AE", ...
1
vote
1answer
33 views

ng-repeat refusing to execute

I have my Javascript (Angular custom directive) as follows: var addedSubject = function($rootScope){ return{ restrict:'E', templateUrl:'/static/html/marks_app/directives/...
0
votes
2answers
18 views

Edit the selected option text in “ng-options” select-list

I need to add the text "(Default)" to the selected-option text. please help me... The text should be "Visa 1881 (Default)". But its only showing "Visa 1881". Here is my code: <select ng-...
0
votes
1answer
34 views

Angular directive not rendering with templateUrl in ionic app

In chrome - both variants work. However, when emulating ios - the directive using templateUrl does not work. This does not work in the ios emulator but does work in the browser: angular.directive('...
0
votes
1answer
19 views

unable to show c3 simple chart directives with in angularjs gridster

I am trying to show angularjs c3 charts in angular gridster. I am using c3 chart directives from https://github.com/wasilak/angular-c3-simple. Even though the gridster is appearing the charts with in ...
0
votes
1answer
21 views

AngularJS directive - initial invoke function

I use this directive: function communicationCreateFormDirective($timeout) { var directive = { restrict: 'E', scope: { selectedCommunicationGroups: '=', ...
0
votes
0answers
7 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
24 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
28 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
1answer
39 views

reload the angularjs after update , date not updated

i am working in angularjs 1.i am trying to make CRUD in angularjs and laravel.i have successfully make the CRUD and CRUD is working fine , in my application their is child and parent routing present ...
0
votes
3answers
64 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
40 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
51 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
27 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
vote
2answers
43 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
31 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
24 views

How to sort by descending datetime ng-repeat in Angularjs?

I want to sort my data by descending date, ie 27, 26 , 25 .... How to do this? <tbody class="gradeX" ng-repeat="x in Profile | orderBy: x.created_datetime"> <tr> <td>{{x....
0
votes
2answers
26 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
36 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 ...
6
votes
1answer
76 views
+50

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
30 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
36 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
47 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 $...
-2
votes
0answers
21 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/ When defining a rather large number ...
0
votes
1answer
27 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
29 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
18 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
65 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 ...