Tagged Questions
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.
0
votes
0answers
11 views
Unable to set custom validation error in angularjs directive with angular ui bootstrap datepicker popup
I have created a custom angularjs datepicker popup directive. It is just a wrapper over the angular ui bootstrap datepicker popup. When i set the max-date/min-date in the datepicker options, the ...
0
votes
0answers
5 views
Using angular-material chips , mail cc and bcc functionality
want to achieve the functionality as gmail compose mail cc and bcc. Achieved chips using md-chips, but not cc and bcc. please help me..
!http://imgur.com/a/wzStQ
Thanks in Advance
0
votes
0answers
4 views
How to set $invalid true to a field in form through a directive in AngularJS
Can anyone please help me to set either $invalid to true or $valid to false through a directive.
When I tried to console.log(ctrl) I got an array named FD having names of the field as well as form ...
0
votes
1answer
14 views
How to pass dynamic components to a container component in Angular 1
Is there a way to pass components defined at run time to render inside of another component in Angular 1? That's a fairly common pattern for React libraries, but I can't figure out how that would ...
0
votes
0answers
15 views
How to create AngularJS UI bootstrap popover with dynamic html content?
I want to create a bootstrap popover with a pre tag containing a prettified JSON object. The naive implementation,
<span popover='<pre>{[ some_obj | json:" " ]}</pre>'
popover-...
0
votes
3answers
31 views
how to get text area empty automatically when user click anywhere on the page. Angularjs, Javascript?
I'm working in angularjs project, I have one text area which gives me some result on search.I want my text area to be cleared whenever i click anywhere on the page.My code is
<input type="text" ng-...
0
votes
1answer
16 views
angularjs nested cascading directive for dropdown
I want to create a cascading dropdown directive .
<my-dropdown label="states" url="http://statelisturl">
<my-dropdown label="cities" url="http://citylisturl">
</my-dropdown&...
0
votes
0answers
22 views
Keep Directive From Updating Form Status
I am using form $pristine and $dirty properties to show status to the user as shown in the picture below:
Additionally I use that status to disable/enable few buttons like "save" etc.
I have created ...
0
votes
1answer
25 views
Manipulate dom with AngularJS
I want to convert DOM mean the following list to a dropdown list of menu. in DOM through AngularJS
<div class="maincontent">
<my-directive></my-directive>
<ul>...
1
vote
2answers
28 views
dynamic ng-model using multiple dropdown and ng-reapeat
Hello every one i have a language multiple selection input. On select language i need to open textboxes of selected language with dynamic ng-model.
this is my json and code.
[{"id":"1","lang":"...
0
votes
1answer
23 views
using directive in angularjs for getting filepath
I am creating a web app in angularjs but i am not very familiar with directives in angularjs
i want to get the file path of the selected file by a particular user
<script>
var myApp = angular....
0
votes
0answers
19 views
angular 1.6: ng-blur and ng-focus does not work on elements in ng-repeat
So I am working using angular 1.6 on an application. Using ng-click and ng-focus has worked fine in the past on different elements. However, I found I am having trouble getting it to work within ng-...
0
votes
1answer
27 views
Angular.JS ng-Repeat in directive runs twice
https://plnkr.co/edit/WzLez5XElbOHRTvXEJFc?p=preview
function DirectiveController($scope, $element)
{
$scope.Array = ["a", "b"];
$scope.me = function() {
console.log("i ran");
};...
2
votes
0answers
28 views
Update element created by directive on change of controller varibale
I am trying to create an angular app where user can create a dynamic form. In this user can create form fields and save form metadata, which is then used to display actual form. There is live preview, ...
0
votes
1answer
33 views
Can not change datepicker parameter on change in another datepicker?
I have two datepicker inside a form. When the user select the first date, the min and max date of the second datepicker should be updated( one year from the selection). But in my case the min and max ...
2
votes
1answer
35 views
How to enable button Angular JS if file was selected?
I use this library for uploading files in Angular JS.
How can I enable submit button if file was selected?
I can get access to object:
var uploader = new FileUploader({})
0
votes
0answers
32 views
$watch does not fire when changing $scope property
I have doubts I've done something wrong or I just do not understand. Whats wrong in my directive?
app.directive('sideMenu', function() {
return {
restrict: 'E',
templateUrl : '/...
0
votes
1answer
28 views
ng-option and ng-repeat, linking up selected object
<select size="20" style="width: 585px" ng-disabled="disableControls" ng-model="ComputePermissionsService.selectedPermission">
<option ng-repeat="permission in ComputePermissionsService....
0
votes
2answers
45 views
Filter with ng model not working angular js
I have tried to implement a filter on angular tree with all corresponding nodes opening while filtering. Could you help me please ?
Here is the fiddle : http://jsfiddle.net/6c1mg3od/1/
What I have ...
1
vote
1answer
17 views
Inclusion of Angular directive files into index.html prevents running of one directive
I included two simple directives to my index Html file. But weirdly the file I included above is not working.
If I add the files to index.html individually, each file is working well.
My index Html ...
-2
votes
2answers
27 views
Changing the CSS of a div in AngularJS directive
I have a problem I have created a directive which is doing ng-repeat on an array of objects
---Showing the value on gui------
Now I want that if I click on any div of this repeat that particular div'...
1
vote
3answers
38 views
Angular directives that call methods on child directives
I am looking for advice on how to implement a hierarchical structure in Angular, where a directive (<partition>) can call a method on a child directive's controller (<property-value>).
I ...
-3
votes
0answers
17 views
Angular Memory Leak: Is this usual behavior? [on hold]
enter image description here
Is this usual behavior?
-1
votes
1answer
17 views
How to update the directive when the parent's scope variable changes?
Directive:
<div ng-show="{{ show }}">
...
</div>
angular.module('mymodule').directive('mydirective', [
function () {
return {
scope: {
show: '='
}...
2
votes
1answer
21 views
How to make expression evaluate more than once in a directive?
Currently, in my $scope for my controller, I have an attribute $scope.disabled = true.
In my HTML file, when I use ng-disabled = {{disabled}}, that element is initially disabled, however when I ...
0
votes
1answer
42 views
Angular template directive binding
I wrote single file with directive templates. This file is appended to document using ng-include directive. Sometimes browser load templates before directive template binding, but not always.
https://...
0
votes
1answer
14 views
Run angular function when scroll to up in chat app (pagination)
I have a chat app and I want design a pagination on scroll up event (NOT DOWN). I need a directive for this job.Also I want to show preloader in new page data load. How to implement it?
0
votes
1answer
23 views
ng-pattern regex throwing error
I am using ng-pattern to validate number(Comma seperated input field allowing only number). But it is throwing the following error in the console eventhough it is working fine. Can anyone tell me what ...
0
votes
1answer
29 views
Angular 1.5 custom validation directive for ng-messages
I'm working on custom directive for ng-messages where with adding one directive "custom-validation" to input field:
<input name="inputName" ng-model="vm.inputName" custom-validation="vm....
0
votes
1answer
40 views
Angular v1 Component to Component data transfer
I'm struggling with a problem within Angular v1.6.1 where I am trying to transfer some data from a component to another component.
I have a component called navbar which resides in app\common\navbar ...
0
votes
1answer
36 views
How to handle jQuery(window).scroll functions efficiently in jQuery?
This is my current code and feels like it's not very efficient and would perhaps be better if Timer/Timeout is used. However, I'm lost as to how to go about it.
Could someone help? Not very efficient ...
0
votes
0answers
10 views
Setting Default Image angular-ng-upload directive Angularjs
I am using danialfarid angular-ng-upload directive.
Through my PHP Backend i get user information and i am trying to edit the information for that user. One of the fields are user_image which returns ...
0
votes
0answers
13 views
Angularjs admin board with adding views
I need some help on the logic how my web application should be designed and implemented.
I have an Angular app with the possibility to log in as admin to manipulate the site (Add news, blog posts and ...
1
vote
1answer
51 views
angular 1.6.1 '&' binding issues
Problem:
When I bind '&' under ng-repeat(or without for that matter atm), I can't seem to trigger the parent scope's function.
HTML
<div ng-repeat="type in fC.types">
<repeater type="...
1
vote
1answer
34 views
How do I prevent html element from being pushed down when dragging an element over?
I'm writing an angular directive using HTML Drag & Drop API. The directive works fine however it adds up an empty space between the elements when dragging an element over the other.
For instance:...
0
votes
1answer
14 views
AngularJS Directive names
I'm currently following this tutorial: https://medium.com/@tweededbadger/tutorial-dynamic-data-driven-svg-map-with-angularjs-b112fdec421d#.tk8zc63b6
He created a directive for 'svgMap'
angular....
0
votes
0answers
15 views
How to use amazingSlider plugin in AngularJS
I'm new to AngularJS and gone through lot of post to use jQuery plugin in AngularJS. But still I dont know how to use this amazingSlider. Please help me into it. I've created directive for slider, and ...
1
vote
1answer
22 views
Adding Form Fields Dynamically in angularjs not working
I am developing an online course application. I am trying to add form fields dynamically in my application, so that I can add more video lecture for a course. However, when I click on "Add Another URL"...
2
votes
1answer
35 views
can't pass dynamic parameter to angular directive
I just took over the frontend work of our angularjs apps and I'm stuck.
I've been creating directives to replace bloated html to make updating the frontend look easier. All was going well till I hit ...
0
votes
0answers
48 views
Angular $http.POST sending empty body sometimes
I am using $http to post some data, and receiving it on GAE backend with python. Most of the time everything is working fine, but some times the post body is empty. This keeps happening for specific ...
2
votes
1answer
24 views
Why does $compileProvider have a directive method?
I observe from the Angular documentation, that $compileProvider has both a directive() and component() method. See:
https://docs.angularjs.org/api/ng/provider/$compileProvider
I also observe the ...
0
votes
1answer
21 views
Passing Controller's $scope variable to nested directive's controller
I'm having trouble passing a scope object from one controller to a nested directive's controller.
I have a directive (child) within another directive (parent), the parent directive and its controller ...
0
votes
0answers
14 views
How to create angularjs directive with browserify?
I'm getting tripped up on the syntax, and my overall understanding. I've tried to create a directive as an element, and I get a repeating loop where it tries to load angular more than once.
Does ...
0
votes
1answer
28 views
ngModel.$setValidity only works once
I'm currently working on a angular bootstrap ui datepicker popup validation, the thing is that I can set the max a min date and validate that (only when the user set the date by clicking on the ...
0
votes
0answers
25 views
Not able to get data-bound data during the directive initialization when its wrapped in a ng-repeat
I've been creating a modularized start page (In Angular).
I've created a module-directive that can handle simple data and displaying them as a list.
Originally, my plan was to create new directives ...
0
votes
2answers
34 views
how to create custom directive to show ngFileUpload validation messages?
I wrote simple directive to show ngFileUpload validation messages as you seen below:
angular.module('app').directive('imageMessages', imageMessages);
function imageMessages() {
var directive = {
...
0
votes
0answers
28 views
How to reload directive from controller or is there need here directive
I have three links and three controllers for each three link.
But, same HTML page need to show. Just need to process (in controller) and reload that page on each click of that link.
If I create ...
0
votes
2answers
30 views
How to preserve scope in componentized Angular app containing a dialog that serves a custom directive
I have a question about how to pass scope to a template rendered from a directive. This seems like it should be so straight forward but somehow I am having a lot of trouble getting it to work.
My ...
0
votes
0answers
36 views
image preview directives using angularjs
I would like to have image preview upload with trigger another element,
so that I have put together in directives.
http://stackoverflow.com/a/25674293
AngularJS Image Preview before Upload showing ...
0
votes
0answers
12 views
what are some best practices for inter-component communication?
I am working on angularjs 1.5, Please refer following image to understand the question.
I have main component which contains Component A and Component C. Component A contains many Component B. I have ...