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
27 views

Implement Authorization in AngularJS

I want to implement authorization in AngularJS. In my project which is some kind of social media, different roles or even same roles may see a view file differently. For example imagine we have two ...
2
votes
2answers
24 views

Regex to Allow a Special Character (:) and numbers and alphabets only

I am using AngularJS directive for my form input validation .Is there a way to make my regex allow only one special character(:)along with numbers and alphabets . This is the directive i found on ...
0
votes
0answers
10 views

Upload image shows error “Cross-Origin Request Blocked” [duplicate]

When I use the logic below it causes following error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.example.com/images/...
0
votes
1answer
21 views

how to upload file using Angularjs, multipart/form-data

i want to upload image using Angularjs anyone know how do this..REST API wants Content-Type:multipart/form-data www.abc.com/images/id Request Body { // --Boundary_1_1626119499_1392398808202 ...
1
vote
0answers
19 views

Find child elements of transcluded directive but exclude its own nested directive child elements

Say I have the following code: (Plunkr: https://plnkr.co/edit/lhSmKWq3dkDScLQlXMAX) <directive-a id="1"> <a href="">1</a> <a href="">1</a> <directive-b> ...
0
votes
0answers
29 views

Angular directive add template on textbox (enter of Spacebar)

I am using angular js,My target is to show a html table on (enter of spacebar) in textbox and add the element of the table in that textbox,for that i have written a directive,but i am not sure whether ...
0
votes
1answer
14 views

[[object HTMLUListElement]] while loading angular treeview in angularjs

I'm trying to use angular-treeview for creating a document tree. But even after doing all the steps as mentioned the result I;m getting is [[object HTMLUListElement]] . Now I'm not sure what should I ...
0
votes
1answer
5 views

How can i implement expandAll and Collapse all feature in treetable using angularjs

I have used this link codepen.io/sliiice/pen/GurpF to implement tree table in my application but unable to create a expandAll and collapseAll feature in it. Can anyone help me out in implementing ...
0
votes
1answer
12 views

my directive not able to access controller method in angular js

I really don't know why this should not work... please help spot the reasons. var app = angular.module("schoolBook", []); // Data for friends app.factory("friendsData", function(){ return [ {id:'1'...
3
votes
1answer
44 views

Where do we find the textarea element of TextAngular

In this post about the angular text editor called textAngular. I would like to find the textarea element of the directive text-angular. Because it uses bootstrap design and i would like to replace ...
2
votes
4answers
44 views

AngularJS - Call specific Directive function/method from Controller

Directive myApp.directive('vlcControls', function ($compile, $rootScope, $timeout, $window, pictureboxConstants) { var linker = function (scope, element, attrs) { vlcPlayerCustomTemplate = ...
1
vote
3answers
41 views

how to display date only in datepicker from database using angularjs

app.controller('getUser', function ($scope, $http, $cookieStore) { $http.get('http://localhost:8080/myapp/user/'.concat($scope.getUserId) + '?access_token=' + $cookieStore.get("access_token")). ...
0
votes
1answer
7 views

Angularjs seleccionar continentes y paises en un menu desplegable [on hold]

necesito ayuda, estoy utilizando Angularjs y necesito saber como hago para que mi aplicación web tenga un menú desplegable donde sus items sean todos los continentes del mundo y al lado tenga un menú ...
0
votes
0answers
19 views

two way binding-data angular js ionic from directive to controller

I wrote a directive where i use the plugin swiper js for my slider of images.Now i want to get the reference of the swiper object in my controller because i have to update the slider when i add ...
0
votes
0answers
7 views

How to achieve 2-way data binding between directive template and link function

my directive template - <div class="form form-control">       <input type="text" class ="txtBox" name="query" ng-model="criteria" ng-change="Users()" placeholder="To: Name or e-mail"> <...
0
votes
2answers
20 views

Use a directive to display scope value and update scope

I have an array of vertex values that I loop over and display to the user. The values are stored as a space delimited string, like this: vrtx = ["10.3 20.3 10.5", "13.2 29.2 3.0", "16.3 2.3 20.2", ......
0
votes
2answers
21 views

How to aggregate ngMessage of several field

I am using Angular JS ngMessage directive for form validation and I would like to aggregate ngMessage alert of several fields. Basically, my form contains 3 inputs (day, month, year) and I want to ...
3
votes
2answers
32 views

Recompile an element in angular, but not rebind angular events

Here's the problem, I need to create a directive that "imports" another directive dinamically. To do so, I add the attribute of this other directive to the element and recompile. I added an exemple ...
0
votes
0answers
10 views

Controller 'formioElement', required by directive 'formioElement', can't be found! in angularjs

I am implementing a form using form.io in my angular page. I need to display different forms on click of their name. Html <div ng-repeat="form in TemplateNames"> <a href=...
2
votes
3answers
44 views

Image source is not binding with scope variable inside directive

In the below HTML, I want to inject 'src' value from scope variable in controller. HTML : <customdir filterby="name" src="imgName"></customdir> The $scope.imgName variable in ...
0
votes
0answers
25 views

How can I hook event handler for table rows dynamically with directive link?

I am writing a typescript directive and trying to hook the "click" event handler dynamically for all html table rows within the "link" property of the directive. I tried and it does not work. When I ...
0
votes
3answers
33 views

How to pass object to directive through attribute in AngularJS?

I want to pass object (reference - two way binding) through ATTRIBUTE not by isolated scope. How can I do this? Because code bellow passing string instead of object: HTML <tr ng-form="rowForm" ...
0
votes
1answer
36 views

How to use ngIf in html comments?

What I'm trying to do is the following: <!-- directive: ng-my-if condition --> <link rel="stylesheet" ng-href="myStyle1.css"> <link rel="stylesheet" ng-href="myStyle2.css"> <...
0
votes
1answer
24 views

Can't remove Google Map Markers when reloading data

I'm a having some trouble with google maps V3 API. Here's my AngularJS Directive: ; (function () { "use strict"; angular.module('LoVendoApp.directives') .directive('map', ['SimpleRETS', '...
1
vote
2answers
46 views

$rootScope.$broadcast usage in AngularJS

I am working with an app where I have the following line at the end of a service in service.js. $rootScope.$broadcast('rootScope:Object') Here Object is the output of an API service. If I now want ...
0
votes
1answer
44 views

AngularJS using ng-show within ng-repeat

I have created a menu using ng-repeat, that I need associate the appearance of (ng-show) "Setup" with a click on the menu item, the difficulty is that the menu and "settings" are two different ...
0
votes
1answer
19 views

How to make a input disabled by default using angular directives

How do I make a textual input field disabled by default and have it toggled using a checkbox. I am getting the checkbox to toggle the input field between an enabled and a disabled state but I cannot ...
1
vote
1answer
25 views

Pass value from one directive to another using function binding '&'

I want to pass a value from a parent directive to child directive. In this scenario parent directive has a function which needs to be executed on click on child directive's div and pass ng-model value ...
0
votes
1answer
33 views

How to add uib-dropdown to a uib-tab to create a simple dropdown menu on a tab made with angular bootstrap?

i'm a novice when it comes to angular js (v1.5) and i'm currently working on a project using angularjs(v1.5), bootstrap 3, UI Bootstrap. i tried to add the dropdown directive to the tabs directive as ...
0
votes
3answers
46 views

Input field should not clear after submit using angularjs

HTML <form ng-controller="updatecontroller" ng-submit="updateUser()"><label class="control-label">First Name</label> <input type="text" ng-model="user.userFirstName"> ...
0
votes
0answers
29 views

Angular (1.5) $compile with multiple scopes

When using controllerAs in Angular 1.5, you can refer to multiple scopes from the same chunk of HTML, for example: <div ng-repeat="activity in landing.activities"> <draggable-action-item ...
0
votes
0answers
13 views

Get the first value (i.e. place_name, lat,long) from googlemaps autocomplete list without selecting or clicking on the list

Issue:- Angularjs googlemaps autocomplete - I need to get the lat,long,placeName of the first element specifically from the autosuggest list that is populated (without clicking on the autocomplete ...
0
votes
0answers
20 views

Url change event when absolute url is change in angular

I am having url for page1 : Application/Controller1/Action1 I redirect to page1 to : page2 : Application/Controller1/Action1/#/SubAction1/40 Page 1 is in mvc. Page 2 is in angular. If i redirect ...
1
vote
0answers
29 views

bind html directive from controller object(string)

I'm trying to render directive from controllers object that contains tabs headers and html elements. This is controller and directive: .controller('OptionsTabsCtrl', function($scope, $compile, $...
0
votes
2answers
52 views

how to save textbox values in scope variable angularjs

i want store textbox value in my Values variable but its not save i don't know why anyone help me please??? i am new in angularjs that's why i am here please help me i want store values from ...
0
votes
0answers
23 views

How can I pass a scope variable which may change as directive parameter

Hi I have following directive: app.directive('multiselectTableFilter', ['dependency1', function (dependency1) { return { restrict: 'E', scope: { ...
0
votes
1answer
30 views

Why is my angular directive (using compile) blocking input in some scenarios?

I've written a directive which adds a class based on a condition - see snippet at the bottom of the question. It works as expected in the following simple usage scenario for a required field: <...
0
votes
1answer
29 views

Angularjs directive with dynamic template and transclude

I'm trying add a dynamic template and met problem with transclude. This is dynamic template function: var getTemplate = function(contentType){ var template = '<button style="cursor: pointer;...
0
votes
3answers
55 views

Angular ,display array using service

i am learning angular by doing small exercises. i have successfully displayed objects in controller and trying to learn to use service and factory. i am unsuccessful in displaying array "names" on a ...
0
votes
1answer
51 views

Update record into current json array angularjs

I want to update new row data in my current Address Array but its not updating, See below images, I am new in Angular, add other object of array see last image <tbody class="gradeX"> ...
0
votes
1answer
20 views

AngularJS Directive to display element text content

I want to create an AngularJS element directive that can access the text contents of the element. For example, I would like to create a directive that I can use like this: <my-text-input g-model="...
0
votes
1answer
34 views

add unshift function not working in angularjs

Can I know why that my add function is not working after I create edit function. Supposedly, user will enter the data and click on plus button icon to add the data into the table. The data will be add ...
0
votes
1answer
24 views

resolve controller variable on directive param without binding for templateUrl

This directive is somewhere outside of our different app frontends and will be called with custom templateUrl's for different usecases. Module.directive 'directiveName', -> templateUrl: (...
-2
votes
1answer
32 views

how to add new row data in current json array angularjs

i have added new row but i want update new row data also in database but there is no updated data how to get new row data also add address json array <tr ng-repeat="x in Profile.addresses"&...
1
vote
1answer
31 views

data iteration in directive for org chart

Here a plunker which have css based Organization Chart, i am tring to make it dynamic in angular js plunker_angular js, i am new to custom directive, is there any way to itrate my $scope.data with ...
0
votes
0answers
32 views

Inline edit function not working using angularjs

I really hope that you can help me. I have problem where i want to make CRUD operation. I successfully create add and delete operation but I can't create for edit function. My vision is to have a ...
0
votes
3answers
42 views

how to store Specific Column in scope variable Angularjs

I have $scope.Profile variable, in this variable below image data are store but i don't want yellow highlighted column , how to remove these columns from $scope.Profile variable, i want only full_name,...
0
votes
4answers
45 views

how to call controller function on button click when my button is placed in different controller in angularjs

I am new to AngularJS and making a single page application. Please see the attached screen shot I have a dropdown in which there is an apply button and on click of this button I want to call functions ...
0
votes
0answers
23 views

I need to load libraries in order to load a page on facebook through page tab

I have to load these libraries in order to load a page in facebook page through page tab, so that I will put these libraries in index page and I will add that url in facebook developer's page. If I ...
0
votes
1answer
42 views

AngularJS ng-repeat issue and add row dynamically on button click

I want to create a simple form with some nested data. When I click the addSite() function, I want to create a new Site item and append it to my $scope.info. I cannot create more than one form and the ...