0
votes
0answers
9 views

Angular JS (bootstrap UI), google maps not showing corectly

I am trying to add google map in twitter modal, only first time map are loaded, from second time map are not loaded into modal. This is my directive. appDirectives.directive('mapDirection', function ...
0
votes
1answer
12 views

angularjs directive's '$element' is a comment because of ng-if

I'm trying to build a popup (dialog) directive for my angularjs application. (still lots todo...) However I made a template file which builds the popup element, with insertion of values from the ...
0
votes
1answer
23 views

Disable all child elements using angularjs directive

I have created a directive that disable all of the selected child elements like this : app.directive('noeDisable', function () { var linkFunction = function (scope, element, attributes) { ...
1
vote
0answers
11 views

Bind Service 'getter' or $watch changes and update manually - AngularJS

In my AngularJS app I'm using a service to store info that's being updated by a simple polling mechanism. Then, my controllers/directives are reading from that service, so that I can have that model ...
1
vote
2answers
9 views

angular src working fine with relative path, but not ng-src

Within a directive, I am using the angular ng-include with the src attribute like this: template: '<div ng-include src="\'app/views/address_detail_view.html\' "></div>' +... This works ...
0
votes
0answers
9 views

Decorate ng-include with new controller

I'm using angular 1.1.5 and would like to decorate the ng-include directive with some new functionality. Part of the process would include adding a controller to the directive. (angular's ng-include ...
1
vote
0answers
18 views

Isolate scope - access scope attributes on element

When creating a directive with isolate scope, I can't access scope properties on the directive element (it's was not the case in angular 1.0.7, but in later versions (e.g. 1.2.17)). ...
-2
votes
0answers
23 views

Angularjs - sending data using https in angularjs

I am developing an mobile hybrid application using angular js-phonegap. I want to make a post call using https. is angularjs supporting https?
0
votes
1answer
16 views

What is the equivalent for directive, compile (pre/post) in TypeScript?

I have a question what is the equivalent for directive: compile (pre/post)? Example in javascript: angular.module('app').directive('checkBox', function () { return { //... my directive ...
2
votes
1answer
39 views

AngularJs Directive to add Attributes, the events are not triggered

Good morning everybody, I'm a bit stuck on this directive, what I want is to receive a JSON string from the getProperties function like: {"class":"someclass","ng-change":"someChange()",ng-click": ...
-1
votes
0answers
23 views

Creating custom HTML controls using AngularJS

I would like to leverage AngularJS' directives to create a custom control that can be plugged into a website. Something like this, consuming site that wants the control adds a script tag, a data ...
-1
votes
0answers
17 views

How do I update a filtered array in an AngularJS directive?

I'm new to AngularJS. I've built a directive that uses an Isolate Scope (=) on an array called "todos". I then filter the todos array, and call it filteredArray. My "todos" element is updated using ...
0
votes
3answers
29 views

How do I inherit behaviour of another directive in AngularJS?

This is really a rather generic question, but as people on IRC appeared to have issues understanding what I was trying to do, I've provided some rather specific information in this post. The answer ...
1
vote
1answer
25 views

Is there a way to pass multiple functions to an AngularJS directive?

I am building a dropdown menu directive which allows you to optionally attach a function to each item in the list. I know how to pass one function per attribute into the directive, but I'm hoping that ...
1
vote
0answers
17 views

AngularJS: Directive Scope is not getting $destroy called

Been searching for awhile in the archives and on the 'net for an answer, but not really finding one, just bits and pieces. Seems there's a lot of suggested posts, but none of those have the answer. I ...
0
votes
1answer
17 views

Many UI-Bootstrap-Datepickers on page loads very slowly - can I use a single instance and move element?

I have many rows displayed using 'ng-repeat'. Each row has 2 x UI-Bootstrap-Datepickers. When there are many rows, the loading of the page gets really slow. I would like to just use a single ...
0
votes
1answer
18 views

trying to insert directive into ui accordion body but gets converted to text

From the docs of angular bootstrap accordion I am trying to insert html into the accordion body. $scope.groups = [ { title: 'Dynamic Group Header - 1', content: '<h1>Dynamic Group ...
0
votes
0answers
18 views

Get the data on foundation reveal modal

i am trying to search the records with some parameters and get the search result on the reveal modal,i am happily doing with posting the search parameters and getting the data on scope,But not getting ...
0
votes
0answers
17 views

ngModel.$parsers's function is called twice when ngModel.$setViewValue is called

I have a parser in a directive assigned to an input that when ngModel.$setViewValue(res); is called the parse function is immediately called which I don't want because then res == inputValue and then ...
0
votes
1answer
18 views

Get compile content of Angluar directive

I want to get rendered content inside of a Angular directive. Here is my code: Javascript: app.controller('appCtrl', function($scope){ $scope.items = [1,2,3,4] }); app.directive('pane', ...
0
votes
0answers
11 views

element stops working when stuck to top with directive

I have a side navbar with a button. When I scroll down I want the button to stay where it is at the top of the page. The navbar looks like this: <div id="sidebar-wrapper"> <ul ...
0
votes
1answer
39 views

Remove directive from the DOM

I am using a third party library called Swiper. idangero.us.swiper.js seems to not play nicely with element directives that remain in the DOM because it assumes that "slide" elements will be direct ...
1
vote
0answers
20 views

Angular JS breaking two way binding on isolate scope when binding to a primitive and using ng-include to dynamically load a template

I have a bit of a strange scenario that is a little different to the other childscope and two way binding issues I have seen on Stackoverflow. I have a field generation directive that receives a ...
1
vote
1answer
17 views

Inject User-defined HTML Into Directive's Template

I am trying to populate the contents of a with HTML supplied by the user. Specifically: app.directive("myTable", function() { return { restrict: 'E', scope: { rows: '@' }, ...
0
votes
1answer
26 views

How does Angular know that bindings should be re-applied to refresh UI elements with updated data?

I think I understand how controller functions initially fill a scope with a bindable object graph, and how angular directives associate elements of that graph with aspects of the UI. I also ...
0
votes
1answer
26 views

Angular dialog directive with compile function and ng-show does not work

Inspired from this article I created a dialog directive. But I want to be a bit more flexible (e.g. not creating new variables/functions in the controller by hand for each dialog. I also want to have ...
0
votes
1answer
20 views

Angular directive showing in the wrong place

I have the following page <body ng-controller="myController"> <table> <tbody> <tr ng-repeat="r in rows"> <div ...
0
votes
1answer
37 views

Angular - Directive attributes vs scope variables

I have some difficulties understanding the directive attributes vs scope variables passed in a directive. I am working on a directive that dynamically loads the correct template depending on the ...
0
votes
0answers
6 views

ng-repeat, inside dynamic template used in directive, does not clone until after exiting directive's link function

I am implementing custom directive of jquery treetable, I know there is angular-treetable directive but it did not fit what I need. I am using dynamic template that contain ng-repeat. <script ...
0
votes
0answers
31 views

Prevent AngularJs from loading hidden directives

I have a custom directive based on jQuery UI datepicker : myApp.directive('uiDatepicker', function ($http, $compile, $parse, InitializationService, Shared, PeriodService) { return { ...
0
votes
3answers
40 views

Can an angular directive contain a controller?

Or perhaps a better question is, should a directive contain a controller? For reasons of separation, my index.html is a simple file. Everything is rendered into it via templates. So my index.html is ...
0
votes
0answers
20 views

Invalidating form with contenteditable doesn't work

I have a situation where I have a table formed by use of ng-repeat, and for each of the table elements, I require the user to be able to edit the values, and for those values to be checked for ...
0
votes
1answer
12 views

How to clear input file with ng-file-upload directive?

I am new to angular, and I am implementing the ng-file-upload directive. Can someone please show me how to clear the file input after the upload is successful? I've tried a number of solutions ...
1
vote
1answer
20 views

How to update ngModel's $modelValue based on the $viewValue update by user input

Say I have the following directive: myApp.directive('myDirective', function() { return { restrict: 'A', require: 'ngModel', scope: { ngModel: '=' }, ...
1
vote
2answers
34 views

In my service-factory I lookup up a large dataset - I want to persist it and check for its existence to avoid calling it again

My service (factory) makes an API call and assigns response data to a variable: .factory('MedicationMatchingNamesFactory', ['$http', '$q', 'MedicationDisplayNamesFactory', ...
1
vote
1answer
20 views

Do I have to use $watch to dynamically pass isolate scope attributes to my custom controller?

I have a controller that stores super heroes. I would like to use a custom directive to display a certain super hero based on the value entered in an input field. I do not wish to achieve this with a ...
0
votes
1answer
20 views

append html inside directive with scope values

i am trying to make a pie chart directive and i use the highcharts one but i also want to add another line of text that sais for example '60%' or so. So far i tried this app.directive('pieGraph', ...
1
vote
1answer
19 views

angular translate service for sentence

I would like to translate by angular translate service a bug sentence. The sentence is contained words that are in the dictionary. For example: I got the sentence from server. "Toni the cat $EATED ...
0
votes
1answer
30 views

Angular controller function not defined - reason?

I'm working on an interactive map of the state of Maine using Angular and D3. With the code below, the only response on page load is Argument 'MapCtrl' is not a function, got undefined and I'm ...
0
votes
0answers
15 views

JQuery file not loading on page with ng-repeat

I am building a real estate listings page for a client of mine with ng-repeat from a json data file that holds all his listings data. On each listing I created a 3 field form so I can tap into a ...
0
votes
1answer
17 views

Angular directive coming in JSON

I have a directive: Here I am passing a data object: <a-link options = "data"></a-link> And here is my directive: .directive('aLink', function() { return { restrict: 'AE', ...
0
votes
0answers
29 views

Manipulate DOM after Angular has retrieved content via $http and added it to a partial view template

I looked at various similar questions such as this one, this one, this one, this one, and this one that failed to provide a solution to my problem before hitting on a solution myself. However, it ...
0
votes
0answers
17 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
32 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
29 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
30 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
15 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
23 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
2answers
42 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'? ...
1
vote
1answer
31 views

ngRepeat:dupes - duplicates in repeater with nested ngrepeat and empty strings

I'm working with angular building a table of data which comes from a JSON API call. I'm having to use a nested ngRepeat however I'm seeing strange results where whole table rows are missing when the ...