0
votes
0answers
12 views

AngularJs directive - how to save '&' scope property in the link function

I'm trying to implement a simple button directive with this properties: scope: { text: '@', enable: '@', click: '&' }, The click function will ...
1
vote
1answer
16 views

Native Bootstrap vs Angularjs Bootstrap directive

I am migrating an existing web application to AngularJS. As the application is already using Bootstrap 3 I am wondering if it is worth re-writing it with Boostrap Directives. My current understanding ...
1
vote
2answers
19 views

Angular table directive

I want to make table directive, but i'm not sure how to do it. Here is my source code. Directive: InterfaceModule.directive('gList', function() { return { restrict: 'AEC', ...
0
votes
0answers
19 views

Model vs event to communicate between directive for an angularjs app

I have an angularjs app with one ctrl and several directives. To make directives reusable, there is no adherence with ctrl (isolate scope and mapping). In this case, what is the best solution to ...
0
votes
0answers
9 views

seems to be a bug in nvd3 lineWithFocusChart for small set of data

Please see the plunker http://plnkr.co/edit/tO5IgK2Bcx5fDKXCkFgH?p=preview. Initially there are so many repetitions of x-ticks for the same data value. Then, when I select Date Range slider, main ...
0
votes
3answers
17 views

AngularJS: isolated scope in directives

I want to write an AngularJS directive and bind a scope attribute (controller scope) to a template element. I have an isolate scope for my directive. It doesn't work. Could someone please help me ? ...
0
votes
1answer
17 views

Watch and evaluate expression in attribute on a directive

(I can't make the title any shorter because I'm really trying to do everything at once.) What I want to do is this: <mySlider max="25 * scopefunction(scopevar)" step="scopevar=='foo'? ...
0
votes
1answer
11 views

angular getting attribute value and cannot find a proper way

I have this in my dom <div id=“my-lightbox-container" style="height: 0px;”> <div id=“my-lightbox" role="dialog" style="width: 660px; height: 342px;”> <button id=“my-close" ...
0
votes
1answer
15 views

Call a function on Valid Blur

PLUNKER How can i trigger function call on blur only if element is valid has no other error? HtML <input type="text" id="order" ng-model="order" name="order" class="form-control" ...
0
votes
3answers
21 views

Timer counter directive

i've written this example hover counter directive in angularjs. It works, and writes the number of seconds to the console. It renders "Hover Me 0" but doesn't update the number while its counting. ...
0
votes
2answers
31 views

Multiple Directives on an Element NOT WORKING

I have an input element with two directives(attribute) in it. it adds an error class if the input is not valid. <input required alpha type="text" name="firstName" ng-model="newUser.firstName" ...
0
votes
2answers
27 views

Angular hide/show based on radio button

Plunker How can i make yes radio button to be checked on page load and show/hide the field-set accordingly. Currently on load radio button is checked but its not showing the fieldset. Html ...
0
votes
0answers
11 views

Angular Accordion Panel Color Change

I have an accordion that dynamically has html controls added to it. I am trying to figure out how to change the color of the accordion's panel to yellow when any of the child controls become dirty; ...
0
votes
1answer
20 views

Two-way binding in an angular directive leads to loop

I have a directive with a select in it. Here is a cut-down example. Note the real code has more moving parts and some logic. app.directive('numberPicker', function() { return { restrict: ...
0
votes
1answer
17 views

AngularJS select directive not working in jsfiddle

I was playing around with some jsfiddle examples and changed it for some tests. Unfortunately it is not working anymore and i have no clue why. Can anyone have a quick look at this fiddle and give me ...
0
votes
1answer
11 views

Why does angular $compile a form not give me the named elements?

I have a very simple test case, yet I cannot access the elements via the scope. var app = angular.module('app', []); describe('testing directive form', function() { var form, scope; ...
1
vote
2answers
24 views

Prevent default event and resume afterwards (angularjs, jquery)

I want to create an alngularjs directive for restricted actions of my web site. For example I have an anchor which would trigger a route change in angular, but before that I wanna show a modal login ...
0
votes
0answers
25 views

How to disable matching class attributes to directives in Angular JS

In AngularJS there are four styles of declaring a directive in a template (see AngularJS API: $compile): Element name: <my-directive></my-directive> Attribute: <div ...
0
votes
1answer
10 views

angularjs html codes to symbols in a directive doesnt work

crmApp.directive('udArrow', function () { return { Restrict: 'A', link: function (scope, element, attrs) { var upArrow = '&#x2191;'; var downArrow = '&#8595'; ...
0
votes
0answers
15 views

Dynamic TemplateUrl

I have screenControl and screen directive. I want to dynamic screen templateUrl from screenControl directive. Can i send dynamic templateUrl with attr from screenControl to screen. index.html ...
0
votes
2answers
31 views

How does scope() method work in Angular JS?

I have created a directive, which has an isolated scope. Somehow, when I try to get scope from the directive's element, it gives me controller's scope, instead of the isolated scope. What's wrong ...
1
vote
2answers
12 views

Angular Google Maps Info Window HTML

I've integrated angular-google-maps (http://angular-google-maps.org/) with my ionic framework application.. Everything is working really smooth but I'm facing some problems with infoWindow.. The ...
0
votes
1answer
23 views

Memory leak with AngularJS in IE8

We are facing memory leak in our application when using it on IE8 however in other browsers memory build up is slow and memory is also getting released after some time. we have used AngularJS and ...
0
votes
1answer
20 views

How do I check visibility of an element with testing angular directives?

I am trying to write a simple test for my angularjs directive. The directive wraps a div in another div, creates a second child to show "LOADING", and selects which child is visible using ...
-1
votes
2answers
16 views

Using a var in this Angular Directive to setValidity

I cannot figure out how to use a variable for the following case. In html I have the following in a loop: <span ng-show='myForm." + ids[i] + ".$error.missingInfo'>Wrong!</span>"; The ...
0
votes
0answers
15 views

AngularJS - Transcluding multiple directives

I have a situation where I need to transclude multiple child directives inside of my outer directive. I've got it working, but I'm wondering if there is a better, more "angular" way to do it? The ...
1
vote
2answers
27 views

Change p tag to input

I'm using AngularJS to build a small SPA. Coming from a jQuery background I have trouble with things like DOM manipulation (or lack thereof) in AngularJS. I have an ng-repeat that creates tr's - what ...
0
votes
2answers
30 views

angularjs form textbox validation: Enter nine digits or leave it empty

I got a requirement to validate a textbox, when the user chooses to enter Tax Id Number, they have to enter 9 digit otherwise leave the textbox empty upon which the form is valid and a submit button ...
2
votes
1answer
39 views

directive doesn't load correct after ngroute

I've got a Problem with an isolated scope in my custom directive. I've built a custom directive. It worked when I didn't set the scope-attribute in the directive by using the parent scope. What did ...
1
vote
1answer
25 views

remove element from dom angular

How to properly remove element in dom model using angular directive? .directive('restrict', ['AuthService', function (authService) { return { restrict: 'A', prioriry: 100000, ...
0
votes
1answer
13 views

Fill select with ng-options inside Directive with isolated scope

i can't figure out why the ng-options directive doesn't work in my example: http://plnkr.co/edit/wwAIDHl6U7YaScRzIKAY app.coffee app = angular.module('plunker', []) app.controller 'MainCtrl', ...
0
votes
0answers
37 views

Angular $compile on DOM changes

I have a Angular directive to build a table with bootstrap table. This table has a "formatter" for each column, to render the HTML data of a column, row by row. The formatter must return a HTML, and ...
0
votes
3answers
22 views

How to access an object attribute inside a service in AngularJS?

I have a service with a local variable object with events names: myApp.service('appService', ['$rootScope', function ($rootScope) { var events = { firstEvent: "MyFirstEvent", ...
0
votes
2answers
36 views

Angular load custom controller

Is it possible to load a custom controller specifying the filename each partial in angularjs? Something like this: var demo = angular.module('demo', ['ngRoute', 'ui.bootstrap', 'demo.filters', ...
0
votes
3answers
42 views

Angular JS File upload Content Disposition

I am new to Angular JS and trying my hands on File upload. My requirement is to submit the multipart data on button click. I read on ng-model not working on type="file", so I got to know the work ...
0
votes
4answers
43 views

ng-change not working on a text input

I am new to angular js. In my code there is color picker initialized from a text field. User changes the value of color and I want that color to be reflected as a background of a text in a span. It is ...
0
votes
4answers
46 views

Conditional templates in AngularJs

I have a login page, which is just a simple form in the center of the page with no header, footer or sidebar. My regular pages will have a sidebar, header and footer (these 3 are directives). I call ...
0
votes
1answer
18 views

Angular Disable Before Directive Call

I've ran into a bit of a challenge in my AngularJS app. I have a form that users can fill out. When they submit, a directive that I've downloaded from Bower takes over, does a POST in the background ...
0
votes
1answer
21 views

Cannot get multiple Angular Directives for form validation to work

I have a form with two input controls, each with a different directive for validation: <input name='foo' id='foo' ng-model='foobar' validate-foo> <input name='bar' id='bar' ng-model='foobar' ...
0
votes
0answers
28 views

Ng-animate on subdirective doesn't run

I'm attempting to animate a subdirective that gets generated with an ng-repeat inside a directive. I've managed to successfully animate one of my ng-repeats with a ng-stagger included so i know the ...
0
votes
0answers
11 views

Linking to a specific position on one page from a different page based on a json array variable

I am re-developing a clients site using AngularJs and since they list businesses for sale, I've placed all their data in a json file, then populated a page with ng-repeat. Everything works great, but ...
0
votes
1answer
89 views

Angularjs Directive scope

I'm trying to create a directive and am running into some problems with the scope object. In creating a plunkr to display what is happening I noticed that I'm close, but not quite sure what I'm ...
0
votes
1answer
14 views

Angularjs-more module dependency issue

I am using more dependency modules for various application.I want to show the ngtable using directive. but this was not working. sometimes no error, some time i am getting following the error ...
0
votes
0answers
10 views

checkbox and editable textarea

Is there a way to make the textarea editable with the checkbox? After entering the value into the textarea the checkbox doesn't work. <body ng-app="changeExample"> <script> ...
0
votes
1answer
24 views

Get element style from directive - Randomly fails

In an angular directive I want get some style (example: backgroundImage) to store it for future use. I have the follow code: angular.module('myApp') .directive('myDirective', function() { ...
0
votes
0answers
25 views

Angular Widget using jQuery

I am trying to write a widget which will show up on button click. This is a jQuery representation of what I want to achieve. jQuery (This is not my code. Found this one on net) I am not sure how to ...
0
votes
2answers
29 views

Angular directive template is not compiled by outer directive

I have simple tags: <form show-errors> <date-input /> </form> as You can imagine I have two directives: showErrors and dateInput. showErrors should work on DOM that is loaded ...
1
vote
0answers
32 views

AngularJs TemplateUrl

I have two directive and I want to dynamic templateurl with attr. For example; I want to send attr with deviceEmpty tag. If this tag not null, use this tag. If this tag use static url. AngularJs ...
1
vote
1answer
42 views

AngularJS - How do I insert compiled HTML into my directive template?

I'm pretty sure I'm doing this the wrong way, so any help would be appreciated... Given the following plunker: http://plnkr.co/edit/hCjTdt8XmlVPKGgzvgFu?p=preview I'm trying to compile some Html ...
0
votes
3answers
26 views

angular call directive function from parent directive

i have 2 directives, 1 directive is a tooltip with content and i have another directive on an upper level of html which see if i hover on that element to open the tooltip, now i want this parent ...