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.
3
votes
2answers
35 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 ...
-1
votes
1answer
11 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
49 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
24 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
21 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
0answers
35 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
29 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
28 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
18 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
33 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
33 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
23 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
43 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
16 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
16 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
20 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
37 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
8 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
28 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
0answers
17 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
18 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
0
votes
0answers
24 views
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
4answers
41 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
21 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 ...
0
votes
1answer
23 views
How to identify the specific Interval in angular js to destroy
Below directive is used for getting data continuously from server with default interval of 5 sec
app.directive('livestatDataGrid', livestatDataGrid);
function livestatDataGrid($...
0
votes
0answers
12 views
tristate checkbox angular js directive not working in IE 11
I took the solution from this post to implement a tristate checkbox. It works on chrome/firefox but not IE (specifically using IE 11).
Could someone tell me why http://jsfiddle.net/xJhEG/25/ works on ...
0
votes
0answers
55 views
How to extend datepicker directive with monthpicker in calendar pane?
I am new to Angularjs, how can I extend md-datepicker directive to implement clickable calendar pane which gives month picker based on selected month-year it results as months. I know that we can ...
2
votes
2answers
41 views
How can I display a text files contents in a textarea?
I am trying to create a file upload component, and display the text file contents in a textarea in the browser for editing before processing.
My inputs looks like this
<input type="file" process-...
1
vote
1answer
34 views
isolate scope communication from directive to directive?
I am new to AngularJS and got confused with directive concept.
I am updating scope.markers in my second directive via $scope.delete function but changes are not reflecting on first directives,as I am ...
0
votes
3answers
38 views
Angular 2 http.post is not sending parameters as null in Dot.Net Core
I am trying to implement a simple form with Angular 2 and .Net Core.
My .Net Core controller is like this-
[HttpPost("[action]")]
public async Task<IActionResult> Add(string name, string dob)
{...
0
votes
2answers
21 views
how to validation credit card in angularjs
how to validate credit card number... less then 16, month 1 to 12, ?? please help angularjs
see below code and image
<td><input type="number" class="form-control" id="inputDefault" ng-...
0
votes
1answer
31 views
turning jquery function into angular-directive
I have the following (working) jQuery function to check if elements with the class ".overflow" are overflowed and have an ellipsis:
function isOverflowEllipsis() {
$('.overflow').each(function ()...
0
votes
0answers
20 views
Where to bind event - Compile, pre, post (All working fine)
My directive binding of click event is successful for - Compile, Pre, and Post. But, if I have to bind an event, then since all these 3 are working fine, why dont I bind all event in compile only? Why ...
0
votes
0answers
22 views
AngularJS GUI Component / Directive Library CSS styling
I am creating an AngularJS GUI library with a large number of directives. The directives may contain multiple text fields, inputs, or buttons.
What is the best practice to let developers add styling ...
0
votes
1answer
61 views
How to implement 'Open on focus' and 'monthpicker' to Angularjs calendar?
I am new to Angularjs, how can I add open on focus implementation (similar as Microsoft Windows 7 calendar) to my calendar as given below where we using Angular material version1.0.1. We decided not ...
0
votes
0answers
40 views
How to stop an Multiple SetInterval in Angular based Application
myApp.run(function ($rootScope, $interval, $timeout, $state, $localStorage) {
load = function () {
cdreset(); // reset the countdown to 0
countdown(); // call the ...
0
votes
1answer
53 views
Angularjs: open on focus and month picker feature to calendar?
How can I add open on focus feature(similar as Microsoft windows 7 calendar) to my calendar as given in demo where we using angular materiel version1.0.1, please help me with solution.
Thanks In ...
0
votes
3answers
46 views
How to append a custom directive and make it execute in the DOM on user click action
I am trying to implement something in which I want to add elements to DOM on button click. Previously I implemented it using jquery and it worked fine however I was unable to pass data from front-end ...
1
vote
0answers
20 views
Is it possible to reverse ng-infinite-scroll in Angular js?
I am new in AngularJs . I have implemented ng-infinite-scroll to show my posts as per it's documentation on this link.Now scrolling works top to bottom.
But how can I implemented it in reverse order ...
1
vote
1answer
47 views
This simple directive is not showing
I'm trying to learn Angular.
I have a plunker here: https://plnkr.co/edit/Qiu2SOjti2PVYhjRqO2O?p=preview
I'm trying to display a directive called 'simple' on the home page.
I'm not getting any ...
1
vote
0answers
20 views
how can Highslide work together with AngularJs
Here is my js code
define (function (require) {
...
const hs = require('highslide');
...
app.directive('anaResult',['$document', function($document) {
return {
link: function(...
1
vote
2answers
50 views
Issue with Isolated scopes in angular
I am trying to run this program and I see no output. Can you please let me know what I am missing here. Thanks in advance.
<html>
<head ng-app="myApp">
<title>Test</title>
&...
0
votes
2answers
22 views
Angular UI Bootstrap 2.3 Modal is not rendering sightly parameters
I am having a compatibility issue with Angular UI Bootstrap Modal and sightly Parameters. When I try to render the sightly parameters inside the Modal the modal does not render the value in the ...
0
votes
0answers
10 views
Is it possible to decorate global function only inside a certain directive?
I have some problems with JAWS16 which read the actually source code inside aria-live instead of their value for bindable elements.
Using the code below, JAWS would read "bracket bracket item dot ...
0
votes
2answers
25 views
Issue when referencing Angular directives
im trying to implement the AngularJs directives to my project but i'm getting stuck with this issue. I have the App.js, ControllerA (which includes a directive on it) and ControllerB. Note that both ...
0
votes
0answers
28 views
How to add/extend UI elements to angularjs material design component?
we have calendar to select date of birth in our web application, for that we used datepicker component of angular material 1.0.9 now we are planning to update our calendar with on focus date feature(...
0
votes
1answer
51 views
Delay generating directive until after page is ready and responsive
I'm working on a single-page app where some parts are really slow. They're slow because I'm displaying 400 complex things in a repeater for the user to scroll through. Each thing is generated by a ...
0
votes
0answers
21 views
Two way data-binding in directive doesn't work angular js (ionic)
I try to use two way data-binding in directive because i need the reference to the object for use the plugin swiper, but the data-binding works only on one way.From the directive to controller it not ...