0
votes
0answers
11 views

Angular “Unknown provider” error when using $filter in directive

I've got a directive that needs to use angular's $filter in the code. However, when trying to use it, I'm getting an error: [$injector:unpr] Unknown provider: FilterProvider <- Filter Here's a ...
0
votes
0answers
9 views

Angular JS animation not working, (using ngAnimate and TweenMax)

ok, here is my code: (function(){ //Define angular main module - module - var app = angular.module('module', ['ngAnimate']); //Define controller -TimeLine- app.controller('TimeLine', ...
0
votes
1answer
12 views

$watch doesn't work when using the UI bootstrap(angular)

I have problem when I want to using my select part with the "tab" in the UI-bootstrap. The view part: 請選擇全國稅基佔市價比例 <select class="btn btn-default" ...
0
votes
1answer
34 views

AngularJS: add filter to type=“number” input element before angular parse anything

My web application is for persian users and they may enter numbers in persian digits. I want to add a directive to my <input> elements with type="number" which converts persian digits to ...
0
votes
2answers
22 views

Calling $setViewValue in a directive doesn't fire $watch in the controller

I am using a directive with a ngModelController like this var directive = { link: link, restrict: 'E', require: '?ngModel' } My link function does something like this (I omitted the ...
-1
votes
1answer
13 views

Should I write unit-tests for 'wrapper' methods

I have function in controller of my directive: $scope.getPossibleWin = function() { return betslipService.getPossibleWin() } betslipService injected into controller Now I'm thinking how to ...
-1
votes
0answers
21 views

AngularJs: controller inside directive PROs and CONs

I'd like to undertsand a little more in depth the PROs and CONs to put a controller inside a directive. E.g.: 1. Controller outside Directive -- app.js -- app.directive('firstDirective', function ...
0
votes
0answers
26 views

stringify and parse usina a directive

i am writing a directive to stringyfy and parse the ng-model.....i want to display the model as an array and bind it as a string.... this is my directive : app.directive("stringifyAndParseArray", ...
-1
votes
1answer
15 views

$route.reload() not fetching updated data

I am new to Angular JS and i am facing an issue. I have a HTML page , where there are two groups A & B and under each group i have 4 people name each. I am trying to move a person from B to A. ...
0
votes
0answers
28 views

Why is directive not getting replaced by it's template code?

I am new in AngularJS and I was writing a test code to create a Task Manager, where a person can add a task and view all of them in seperate views. For viewing tasks, I had created 'row' and 'column' ...
1
vote
1answer
21 views

Error: [$rootScope:inprog] $digest already in progress

I'm trying so send a form (using a directive) when a property in the model changes (so I watch the property), but when I trigger the submit event, I get the error: "Error: [$rootScope:inprog] $digest ...
0
votes
0answers
8 views

how to do custom pagination for nggrid data

Iam trying to display custom pagination for nggrid data. I can able to get the pagination but by default iam getting 37 pages. If there are no records also it is displaying 37 pages in pagination even ...
1
vote
1answer
31 views

Adding and removing a class from parent div AngularJS

I have 3 boxes each with it's own button. The button is used to collapse it's parent div by adding a class of 'collapsed' to the parent. I have go the classes being added but I need to get them ...
1
vote
2answers
12 views

$window.print() executing before lines above it

My problem with the code below is that $window.print() is executing before $scope.loading_status=false which doesn't allow me the hide certain DOM elements before printing the page out. How can i ...
0
votes
0answers
21 views

Variable passed to directive not resolving

I have an element that is passing a scope variable to a directive but instead of getting the value that I am expecting inside of the directive, I am getting a string of the variable name. ...
0
votes
1answer
24 views

angularjs validation update error status of another input field

Aloha. I have two fields for time input, start + end. I've created custom validations to check if field is blank, valid time, and start is before end time. Works except for the following: edit both ...
0
votes
0answers
13 views

Angularjs ngCsp example of forbidddened practices

In angularJS doc for ngCsp (https://docs.angularjs.org/api/ng/directive/ngCsp), there are two lines desc what not to do... But I have no idea what they exactly are! don't use Function constructor to ...
1
vote
1answer
25 views

calling an angularjs attribute directive from inside an ng-repeat

I have a collection of table column objects that I am iterating over using ng-repeat. I am building the table dynamically based on the columns the user wants to see. Each TH tag calls a "sortable" ...
1
vote
0answers
34 views

typeahead directive doesn't bubble up the event to the parent controller upon selection

I am very new to AngularJS Directives and trying to figure out how can i customize the angularjs directive typeahead into a directive that can be customized and extended with more functionality. Use ...
0
votes
0answers
19 views

Deferring size calculations until ui rendered

Here is my markup: <div resizer> <div class="a"></div> <div class="b"> This content generated dynamically using ng-include and other directives inside ...
0
votes
0answers
23 views

Submit only $dirty subforms

I have an outer <form> element that is a parent to multiple ng-form's. There can be up to 150 subforms with ng-form so I only want to send to the server the ones that have been changed ($dirty). ...
0
votes
1answer
21 views

Data binding in directive template doesn't work with ng-repeat

I created this simple plunker to demonstrate the problem: http://plnkr.co/edit/xzgzsAy9eJCAJR7oWm74?p=preview var app = angular.module('app',[]); app.controller('ctrl',function($scope){ ...
0
votes
0answers
14 views

Convert SuperBox JQuery to AngularJs directive

I found this amazing JQuery plugin by Todd Motto at http://toddmotto.com/introducing-superbox-the-reimagined-lightbox-gallery/. I would like to convert this plugin to AngularJS directive as well as ...
0
votes
0answers
6 views

Angular Pikaday multiple date format

I am using Pikaday date picker plugin in my angular JS app. Is it possible to have different format for view and different format while submitting? For ex: 01 Jan 2014 (Display) 01/01/2014 (while ...
0
votes
0answers
11 views

AngularJS Directive: Keeping Attributes in Template

In my application, I have several places where I'm using a date input, which currently looks like this: <label class="input-group"> <span class="input-group-addon"><i class="fa ...
0
votes
1answer
8 views

What is the module.directive function parameters?

I've seen directives with a lot of different function parameters. So far I've see things like : Empty function: .directive('myDialog', function() { /* ... */ }); An array : ...
0
votes
0answers
28 views

why is parent scope function always overriding function parameter of child scope angularjs

question summary: how do i make a directive child function use the parent function definition, but while using the variable that's defined within the child directive scope. i basically perform the ...
-1
votes
3answers
34 views

Calculate average from list of values in JSON

I have a simple ng-repeat that displays a list of values (financial income). How can i calculate the average from this list? <div ng-repeat="data in MyData"> {{ data.income }} </div> ...
0
votes
1answer
32 views

Hide and show radio button using angular js

<div class="filter_hide"> <div ng-cloak ng-repeat="web in website" > <label ng-show="filter[web.websiteId]"><input type="radio" id="{{web.websiteId}}" ...
0
votes
1answer
20 views

Directive “&” expression not working

I have made two directives that embed a swf object onto the page for playing and recording videos. There is a global function each swf uses to signal player events. The code for the player looks like ...
0
votes
2answers
36 views

Nested data with ng-repeat table

I'm in need of some help creating a table using angularjs to build my table. The issue here is my data has multiple nested levels, and my problem is that I cannot get the innermost level to display. ...
0
votes
0answers
19 views

angular get the width of div inside ng transclude

I need to get the width of some div that the user put in the html where the ng transclude The problem that i cant grab it with jquery because it doesn't "exits" yet there is a way to do this dynamic ...
0
votes
0answers
9 views

angular, angular-snap.js, toggle button click hide/show behavior should not effect header and menu

I am using angular-snap.js for my vertical slider. The problem I am facing is that the snap-content and snap-drawer Toggle buttons are appearing and functioning from the top of a page (even above the ...
0
votes
0answers
17 views

Angularjs ng-change custom select directive never called

Here is my app declaration : var ogcApp = angular.module('OGC', [ 'ngAnimate', 'xeditable', 'ngRoute', 'ogc.services', 'ogc.controllers', 'restangular', 'AngularStomp', ...
0
votes
0answers
17 views

input fields formating using filters

I have gone through many links and forums but still not able to finalize whether a filter in angularjs can be used to format a input field. I have seen filters for formatting for the data from the ...
1
vote
1answer
23 views

On click and hold with AngularJS

I have made a time conter which allows you to increase or decrease the time by clicking a button. I would like however that when I click and hold the button the value of the time would keep climbing. ...
0
votes
1answer
15 views

how to split the pagination based on number of records using angular js

Iam working with pagination with table.In that how to split the records based on number of records in table .please suggested me
0
votes
1answer
24 views

Angular d3 donut

I am trying to make a donut chart using d3 and angular however, I am stuck.Should I add all d3 code to function link or is there any other way? Moreover, I want this chart to be dynamic. Here is the ...
-1
votes
3answers
22 views

AngularJS - increment value inside directive template

As in the title. I would like to increment value inside directive template. I tried this: var ngApp = angular.module("ngApp", []); ngApp.controller("AppCtrl", function(){ var app = this; ...
0
votes
0answers
16 views

How to unit testing an AngularJS directive's Cell Highlight feature ?

In this directive I am trying to test cell high lighting when the existing value changes and I haven't made much head way in validating this change. I am using Karma and Jasmine to test code.Here's a ...
0
votes
2answers
36 views

Why row is not deleted in angular?

can you please tell me why my row is not deleted.I I make a demo in which I added the student name .I am able to add the student name .Now I have two issue I am not able to delete row and Edit.can you ...
-1
votes
1answer
34 views

AngularJS with MySQL [on hold]

I am new in AngularJS. I just went through the w3school sites. I need to fetch data from MySQL using AngularJS. Can any one give some suggestion regarding that. Or please refer some sites which will ...
0
votes
2answers
25 views

Pass data from directive to main controller

How do I bubble up my directive $scope.posts to my root scope so that my view updates with the data the directive just fetched? var lassoDirectives = angular.module('lassoDirectives', []); ...
1
vote
0answers
21 views

Referring to nested object in controller through Angular expression

A quick challenge for all you angular wiz out there. Say in my controller I have something like app.controller('testController', function ($scope) { preWrittenFunction1 (function callBack () ...
0
votes
0answers
16 views

Passing Data From React to Angular [on hold]

I am using ReactJS to replace ng-repeat of an AngularJS app I am building. ReactJS reduces the rendering time considerably. I am having trouble passing data from React to my Angular directive. What I ...
1
vote
1answer
24 views

How to determine if exist transclude content in directive

Say you have a directive like below. Directive module.directive('person', function() { return { restrict: 'E', scope: { header: '=' }, transclude:true, template: '<div ...
0
votes
2answers
13 views

Typeerror when trying to use getContext('2d') from canvas

Why am I getting a type error when I try to getContext on my el.canvas Obj html: //created a directive called canvas-video-map <div id="video-to-canvas" canvas-video-map> <video ...
1
vote
2answers
33 views

why element is not added in dynamically in angular [on hold]

I am trying to add data dynamically using ng-repeat. I don't know why it is not adding. I enter "name" which is added dynamically in the data, but it is not showing in the UI. Here is a demo ...
0
votes
1answer
15 views

Making AngularUI UI-Date datepicker use UTC time

It seems the datepicker uses localized time but I need it to use UTC times when I make calls to the backend. I get around this issue by adjusting the value before posting it to the server using the ...
1
vote
1answer
30 views

Angular custom directive dilemma [on hold]

I am creating a website/app using angular, most of my requirements are being met by the Controllers calling the service and $resource for rest data fetch and show them using the template files through ...