0
votes
0answers
9 views

AngularJS: Two-way data binding not finding model in Controller

I am writing a directive which could be used at multiple places. The only requirement is that Controller using the directives will have their own model budgetCategories. My Controller looks like ...
0
votes
0answers
14 views

How do I access the transclude function from a directive link function

Short question How do I get access to the transclude function within a directive link function using Angular 1.1.1? What I'm trying to achieve Here is the (broken) fiddle ...
0
votes
1answer
19 views

Can you use ng-switch and ng-if together?

I was trying to use both the angular ng-switch and ng-if directives together, but it doesn't seem to be working. What I was doing was: <div data-ng-if = "x === 'someValue'" data-ng-switch on = ...
0
votes
2answers
31 views

How to add click event to element in my case?

I have a directive like the following var app = angular.module('app', ['ui.bootstrap', '']); app.directive('myNav', function () { return { restrict: 'E', templateUrl: ...
0
votes
1answer
17 views

In nested Angular directives, can the child directive inherit a variable from parent's isolated scope?

Let me explain what I'm trying to do. I would like to have the following html: <outer data="variableFromAppController"> <inner></inner> </outer> variableFromAppController ...
0
votes
2answers
36 views

AngularJS Directive Passing Unknown Number Of Functions

I understand that when writing an AngularJS directive that you can bind a function in the parent scope to the directive scope by using "&" in the directive scope like so: ... scope: { ...
0
votes
0answers
5 views

angularjs directive kendoGrid repeating border

I have a directive for kendoGrid and that directive also has watch for an scope variable called objectSource so that I can change the data upon some user interaction. However, after the ...
0
votes
0answers
16 views

AngularJS Best Practices for Directive Design

When it comes to creating directives in AngularJS, I like to keep everything related to that directive close by. I accomplish this by chaining everything together. For Example: ...
0
votes
1answer
20 views

AngularJS - ng-repeat to display empty cell/s when data is not available when using slice twice

I have a simple ng-repeat that loops through a JSON file with a list of countries and details about that country e.g. currency, population for a particular set of months (24 in this case) My ...
0
votes
3answers
22 views

Multiple view for Single Router in angularjs

I have a common HTML where the header got to change after login. <div class="masthead clearfix"> <div class="inner"> <h3 class="masthead-brand"></h3> ...
0
votes
1answer
16 views

Detect Mousedown Event in Angularjs

I know how to detect mousedown event on a directive that is clicked. However my directive also needs to become unforcused or deselected when mouse is down outside of my directive/ element. How can I ...
0
votes
1answer
16 views

Multiple $interpolation symbols in AngularJs

I am rather new to AngularJs, but I have a specific need for a more complex, conditional template using multiple interpolation symbols. I am using the same example as in ...
0
votes
2answers
26 views

Angular redirect to home on refresh

What's the best way to direct a user to the home page if they happen to refresh from any other route (or state if you're using ui-router, as I am). For example - I want them to begin on the inventory ...
1
vote
1answer
39 views

Defer compilation or linking of a child directive from the parent

I'm trying to build an AngularJS directive that, during the linking phase, moves it's children (which are also directives) into another location before the children get into their linking phase. The ...
0
votes
0answers
6 views

Unable to retrieve templates in angular unit tests for directives with karama, grunt, and yeoman-maven-plugin

I'm in a less than ideal situation where I need to work with both grunt and maven within a single build. My directory structure looks like the following: project +-src | +-main | +-webapp | ...
0
votes
0answers
12 views

Fancybox directive in ng-repeat is not grouping images

I am trying to use Fancybox within my app and while the plugin works (it opens the images in the lightbox), it is not recognizing the rel or data-fancybox-group attribute to group multiple images (so ...
0
votes
0answers
17 views

angularjs nvd3 directive displaying half pie chart

Hi im trying to create a pie chart using angularjs-nvd3-directives, but my charts is divided by half and i don't understand why if im setting the width and height, here is my code: html: ...
0
votes
2answers
28 views

AngularJS - How to load a service from other app

I have this angular code: This is my controller: MyApp.controller('vtCustomerController', function ($scope, messageBus, customerDetails, $http, $q) { $scope.loadCustomerDetail = function ...
0
votes
1answer
27 views

Scope is not shared between nested transcluded directives

There are two directives collection and element, both of them transclude it's content, both of them have scope: false (default value). This directives are used as wrapper on some container and ...
0
votes
1answer
18 views

format message on angular-moment moment.js

How would i change the ago message using angular-moment. i use this angular-moment library to show time ago message. <span am-time-ago="created_at"></span> It shows messages like "a ...
0
votes
1answer
13 views

angularjs conditional directive only on desktop

I want to put a directive on an element only if it's not viewed from mobile. As it's an externally maintained plugin I don't want to modify the directive itself. What's the easiest way of doing this? ...
0
votes
0answers
17 views

dynamic dependancy added when module is called

I am still quite new to angular and perhaps I have the wrong end of the stick in my design here but I am trying to create a re-usable widget, a dropdown menu (html select). This dropdown menu will ...
0
votes
1answer
12 views

Angularjs drag and drop who supports nested drop elements

I am using this plugin of angularJS- http://ganarajpr.github.io/angular-dragdrop/ and wants to achieve something like this- http://jsfiddle.net/J7azG/40/ (similar to "greedy" feature in jquery ui ...
0
votes
0answers
22 views

Directive is not working - debug steps?

What are steps on debugging angular directives? I've directive in HTML and it's JS definition. I can set breakpoint on directive definition, and script stops there on load, showing fact that ...
0
votes
0answers
17 views

Add Directives from within a Filter (AngularJS)

I'm trying to make an angular filter that replaces some pieces of a string with a directive. The issue is that the directive won't compile. I don't think I can use the $compile service in my filter as ...
0
votes
2answers
19 views

Angularjs - Function is undefined in child scope even though it is in the parent scope

I have this plunkr: http://plnkr.co/edit/vuN0zVhXNMHUEPMeRvRg?p=preview In this plunkr, I call a directive which gets the function "test" from parent scope using the "&" operator. Why when I try ...
0
votes
1answer
28 views

Know if AngularJS directive method binding defaults to angular.noop

I have a simple directive that passes a function on to a plugin; the plugin will then use the function with a given value. For simplicity, let's ignore changes on the data: ...
0
votes
0answers
21 views

ng-include not load template

I'm use ng-include in my directive, in functions function initPopup(includingHtml) { ui.debugLog('Init popup'); $popupContainer = angular.element('<div class="b-popup"><div ...
3
votes
1answer
34 views

Proxying HTML attributes in AngularJS directive with template

I created custom directive with template and replace: true. Can I set the destination element of proxying all attributes from original element? Is there a mechanism like ngTransclude? By defaults they ...
0
votes
0answers
20 views

D3js on Angular with routing and templating

I am new to Angular.js and i'm stuck with something. I followed this nice tutorial to include routing and templating in a website: ...
0
votes
1answer
29 views

How to access the inner element from an angularjs directive?

I'd like to compute the element scroller width, as the number of children x the width of first child. To do that, I have designed a directive hscroller. The HTML is as follows: <div ...
0
votes
1answer
30 views

Dynamically create directives from a loop

I have a main directive that has an array on it's scope that contains data for constructing other directives that should be compiled and appended to the main directive. The problem is that when I ...
0
votes
2answers
30 views

angularjs render data in multiple containers

I am new to angular. I am trying to find a way to render half of a data array into one div and the other one to another div. angular.module("testApp", []).controller('mainCtrl', function($scope){ ...
0
votes
1answer
15 views

AngularJS - How to get directive-controller in directive with “require”

I have a directive with a require. Now I want to get the required controller instance AND the controller of the directive in the link function. How is that possible? If i set 'require' the fourth ...
0
votes
0answers
48 views

angularjs: (bootstrap) popover directive. How to close it?

I have a pattern related question. I build a directive to "load" content into a bootstrap popover. HTML: <span data-ng-show="user.provider === 'local'" class="label label-warning" ...
0
votes
1answer
26 views

Passing a string containing HTML tags to a directive, tags not rendered

I'm passing a string to my angular directive. The problem here is that the string I'm passing contains some html, and obviously this is rendered as text in the directive output. I've been reading a ...
0
votes
1answer
16 views

AngularJS: Simply passing a value to a directive's template

I'm having a very basic problem: I cannot pass a value, or anything else, to a directive's template and have it display in the template, despite having tried many examples. I have created a punker to ...
0
votes
1answer
13 views

generating a variable-length dropdown based on input value in an AngularJS directive

I want to provide a page selection directive that generates "Page [ 1 ] of x". The number of pages in the dropdown is dependent upon values passed into the directive, so it can't be part of a static ...
0
votes
0answers
23 views

Logout approach for angularjs?

I have started learning angularjs for two days, there a lot of new concepts that are new to me, i'm building a test project to my final project testing all the new different things so far, I'm stuck ...
0
votes
2answers
31 views

Can I use Angular variables as the source of an audio tag?

I am trying to do the following: <div ng-repeat="audio in event.audios"> <audio ng-src="/data/media/{{audio}}" controls></audio> </div> But when I load the view, the ...
0
votes
0answers
31 views

AngularJs compile a directive in another module

in angular Js I have created a module of mine and trying to use a module xeditable (http://vitalets.github.io/angular-xeditable/). There is a directive in my module which I am trying to compile in a ...
0
votes
1answer
18 views

Rendering more than one chart with Highcharts using Angular js Directives

i'm having an issue while trying to render more than one chart with Highcharts and AngularJS. My code is based on this fiddle: http://jsfiddle.net/csTzc/ I basically just duplicated the div where ...
0
votes
2answers
30 views

How to access inner directives of the directive

I've directives container and item. directive('container', function(){ return { replace: true, template: "<div>contains <p>...</p> </div>' } }); ...
-1
votes
1answer
23 views

How can I compare two values in angularjs in HTMl

How can I compare two scope values using angularjs in HTML only? for example: <div ng-if="place.id = place.reference.id"> show if equals</div> I want this to cover certain scanrios
0
votes
2answers
45 views

Angulars : adding params to directive function

I want to change the params of the function call passed to directive. HTML <div direx onabc="a.b({'a':10,'b':13});" > Directive .directive('direx', function($compile) { return { ...
0
votes
2answers
31 views

How to test this directive?

How can I test this directive ? angular.module('uiApp') .directive('uppercase', function () { return { restrict: 'A', require: 'ngModel', link: function (scope, element, ...
0
votes
0answers
9 views

How to lazy load panel content on a button click having multiple panels on the same page using angularjs

I have a scenario here where I have multiple panels (using ng-repeat) on the same page. Each panel have a link, on click of which it loads data specific to that particular panel and returned response ...
1
vote
2answers
33 views

Wrapping template of element directive in collection directive

I've two element directives collection and element, supposed to be used like this: <collection> <element/> <element/> </collection> They have templates: ...
0
votes
1answer
12 views

Directive template value not updating

I'm setting up a directive like so (timeout function just as a demo): app.directive('timeRange', function () { return { restrict: 'A', scope: { sliderId: "@sliderId", ...
0
votes
0answers
14 views

AngularJS and modernizr.cssanimations

Im trying to integrate angularJS within my application. I have a JS file that makes use of modernizr.cssanimations: if(!modernizr.cssanimations) { $('body').append('<div ...