0
votes
2answers
17 views

AngularJS Initialize a dynamic date field to JavaScript Date

I am building a dynamic form and am using the HTML5 date input for fields of type date. I was struggling to get the date input to display my date, and have come to the conclusion the value has to be ...
0
votes
1answer
12 views

Angular - create multiple directives from same function

To create a directive/controller/factory whatever, you provide a function serving as the "injection point": angular.module('myApp').directive('myDirective', ['dependencies', function ...
0
votes
1answer
12 views

How to append a custom angular directive into another custom angular directive?

I have two custom angular directives and one appends the second repeatedly. The problem is that although the tag is appended, the template of the directive is not. When I manually put it in, it works. ...
0
votes
1answer
15 views

Acessing directive's scope within trancluded ng-repeat

I'm writing a component and need to ng-repeat on directive's isolate scope property. Consider this: <div some-directive> <h2>Let's repeat something</h2> <p ...
0
votes
1answer
16 views

Can AngularJS directive ngOpen be used for an accordion component?

What is the point of the AngularJS directive ngOpen aside from using it with the details tag? I'm trying to create an accordion component and this came up but not sure exactly if it helps considering ...
0
votes
0answers
7 views

Angular-AutoSave - Error using Fundoo-Solutions Directive

I have this autosave working with a directive but it is not working from within a controller. It is supposed to save the model on change and then restore when I select restore from the button click. ...
0
votes
1answer
26 views

Is there any way to prioritize the order of controllers/directives being loaded in page in AngularJS?

I have a problem with controller that is being loaded before it has been getting from other directive an id he should have in order to load himself. How can I organize the order of loading component ...
4
votes
1answer
32 views

AngularJS directive is breaking based on first character of directive name

I wrote an Angular directive that is exhibiting some strange behavior. The directive adds a function to $parsers to limit what the user types based on a regex pattern. If the current text doesn't ...
0
votes
3answers
25 views

How to communicate between controllers while not using SharedService between them?

I was reading all the answers about communication between controllers and directive, but is seems to me occurred using shared service and inject it to each one of them. When I'm developing a very ...
3
votes
3answers
55 views

Is there a way in Angular to react on model changes without using $watch?

I'm implementing a simple spinner control in AngularJS and I want to react both on user input and changes from +/- buttons. Here is my HTML: <input type='button' ng-click="MyProperty = MyProperty ...
-1
votes
0answers
40 views

How to pass value in directive?

Hi I have created a directive, using ul and li tags need to make ng-repeat to ul tag based on JSON values. Here I have implemented, is it right way or how? is there any other alternative solution for ...
0
votes
2answers
36 views

Access parent data model in directive

I wrote a directive to check for double values in a data column: The markup <table> <tr data-ng-repeat-start="rowItem in vm.model.data" ...> <td> <input ...
0
votes
1answer
16 views

My directive stopped working when I started using ng-repeat with a different controller. What am I doing wrong?

So I followed this guide so I could have a nav bar on every page: http://tomaszdziurko.pl/2013/02/twitter-bootstrap-navbar-angularjs-component/ And it was working, until I created a separate ...
3
votes
2answers
33 views

Is it possible to set ng-view to replace: true?

I'm integrating Angular into a web application and I noticed that the wrapper is messing with some of the CSS on the page. After researching into directives, I saw that custom directives can have a ...
1
vote
1answer
21 views

How to filter JSON data based on current date

I wanna ask about angularJS. I have json here var friends = [ { "id":1, "Tanggal":"\/Date(1408060800000)\/", "Nama":"Hari Departemen Agama Republik Indonesia" }, { "id":2, ...
0
votes
1answer
22 views

How to communicate between directive (tree component) and any other controller or directive in AngularJS app?

First of all, I have read so much info you all share about communication between controllers, that I'm now so confused about the BEST way to do it. I understand I should use service, but don't really ...
0
votes
0answers
35 views

Text box is not getting cleared

I am using Angular. In my controller I have: mainApp.controller('loginBoxController', ['$scope', '$state', 'mainWebService', function($scope, $state, mainWebService) { $scope.usernameText = ""; ...
1
vote
1answer
37 views

why css is not loaded while using nested list ..?

I make a simple after studying from this link https://github.com/JimLiu/angular-ui-tree and demo is here http://jimliu.github.io/angular-ui-tree/ But it not show "+" ,"V" and "X" icon why ? ...
1
vote
0answers
29 views

why select value is not display using angular?

I am using angular js .And convert json to form I don't know why select value or select option not display.. here is plunker http://plnkr.co/edit/wbziK5aRUg69JuwXDoVy?p=preview Issue step: run ...
0
votes
1answer
28 views

how to scroll bottom of div using angular js

I have a div in which I added element .I want to scroll to bottom of the div whenever element added in div.I know how to do in in jquery .But I did not know how to scroll using angular js I know using ...
1
vote
2answers
36 views

Array sort() sorted the actual array list after assigning to another array as well

Result holds dynamic value in array but after sorting the result also get sorted but I don't want it to get sorted. But after sorting its also get sorted. Why is that? $scope.arreyList = result; var ...
0
votes
2answers
43 views

how to scroll to bottom or move focus to bottom in angular?

I have a div in which I added element .I want to scroll to bottom of the div whenever element added in div.I know how to do in in jquery .But I did not know how to scroll using angular js ...
4
votes
2answers
71 views

Use ngModel with plain ngController instead of directive?

In my application I would like to preserve the option of using plain controllers for certain sections of code - as opposed to creating directives for one-off things that will never be re-used. In ...
0
votes
0answers
61 views

AngularJS - How to bind multiple dynamically added elements to other elements in different sections of HTML?

I apologize if I worded the question incorrectly, I am attempting to build a survey builder and I am running into a problem. Here is the link to an example plunker: Updated: plunker JS: (function() ...
0
votes
1answer
21 views

angularjs directive losing array format filter

I am trying to do a simple array sort in a directive. But somehow when i put the nested array in the orderBy filter it is losing array and becomes an object (which can not be ordered) when i log out ...
0
votes
1answer
22 views

how to set text on button which is selected from menu in angular?

I make a menu option which is show on button click .I need to show deleted option on button text.by default "select value" text display.Now if user select any other value it should show on button. can ...
0
votes
2answers
28 views

How to change valid HTML tags that get rendered in ng-bind-html?

I have a text editor (textAngular) that I've modified to limit the number of valid HTML tags I can generate using that tool. Now, I want to only support a limited number of HTML elements (h3, h4, h5, ...
0
votes
1answer
47 views

How to set value in input field in angular js?

I am a beginner in angular. I am able to make drop down and able to get it value using ng-model. But I need to get different value on input field. If the value of drop down value is blank then input ...
1
vote
3answers
67 views

How to get consolidated results from ng-repeat?

See this plunker. <div ng-repeat="subCategory in subCategorys | filter:{tags:tag}:true | orderBy:'id'"> {{subCategory.id}} {{subCategory.name}} {{subCategory.tags}} ...
0
votes
2answers
43 views

How to use a scope in Directive template

I want to use $scope variable in template function of directive like this. In the other words i want to generate directive template inside of directive and by using $scope variable. Help me to ...
0
votes
1answer
30 views

ng-repeat, ng-click, directive, and controller interaction

I have this directive snippet: return { scope: {}, restrict: 'E', templateUrl: 'partials/order_table.html', controller: 'OrderController as x', link : ...
0
votes
1answer
31 views

Filter is not applying when adding object to ng-repeat

I have an ng-repeat that contains a filter on one of the items in the repeated list. The filter works fine except when I add an item to the ng-repeated array. The ng-repeat looks something like this: ...
0
votes
1answer
15 views

how to append text in angular after set interval of time?

I make a simple in jquery in which I append the text in div .I am able to that http://jsfiddle.net/naveennsit/rgeHe/ But same thing I need to using angular .js but It is not append the data ..why ...
0
votes
0answers
16 views

How to set ng-dirty/ng-pristine on custom element directive with input inside template?

I have build a form element using a custom directive in AngularJS. Custom element in form: <form class="login-form" name="loginForm"> <elm-input-text class="has_bottomSpace" ...
0
votes
1answer
48 views

how to get event of on change of drop down in angular?

can you please tell me how to get event of on change of drop down in angular ?. I make a drop down from json .I need to show alert when user change the drop down ng:change and get it drop down value ? ...
0
votes
1answer
17 views

Directives not loading in order when navigating between pages that reuse directives

I have a two separate pages that use the same controller. I'm using ui router states to change between pages. They contain the following directives which use templateUrl for templates in order: Page A ...
0
votes
0answers
15 views

Drag and Drop issue while using angular directive?

I make a tree with static data .I use this plugin http://www.jstree.com/. My issue is that here is that documentation written that it will provide drag and drop .But when i used as directive it ...
0
votes
0answers
39 views

why onchange event not fire in angular js?

I am making a form from json .i am using angular-schema-form with dependancy in tv4.js.I study from this https://github.com/Textalk/angular-schema-form/blob/master/docs/index.md#global-options That ...
-4
votes
0answers
19 views

The radio buttons are not getting cleared in angular js

I have a weird problem with radio buttons not working with angularjs I have two sections of radio button on my page Section 1 <input type="radio" ng-model="myradio" name="Monish" value="Monish" ...
0
votes
2answers
33 views

how to remove this this Unexpected token error in angular js?

I am trying to display different message in form .I make form from json while study of this documentation https://github.com/Textalk/angular-schema-form/blob/master/docs/index.md#validation-messages ...
0
votes
0answers
25 views

Passing Data to Directives Asynchronously

I have a handful of directives on a page that all share the same data. I have a heavy API call that needs to be made somewhat frequently to update these directives. Each directive contains the data in ...
0
votes
1answer
42 views

Dynamically injecting directives

I have 22 different types of ways I need to show a certain type of model. Instead of making my html have a crazy tons of if statements, and my scope, I want to create a directive for each type. I'm ...
0
votes
1answer
16 views

changing css attribute value in angular directive

I"m just starting to learn Angular, and I'm running into a problem with directives. What I want to do is match the height of one div to another using AngularJS, and for the change to occur on page ...
0
votes
2answers
30 views

How do I reference the scope/model property of an element from within an AngularJS directive?

I am using a custom directive to attach the jQuery Chosen plugin to a multi-select element. (I realize there are similar native AngularJS plugins out there, but I want to learn how to integrate a ...
0
votes
1answer
15 views

AngularJS a scope variable is not updated in an anonymous callback function in directive

I've been trying to make a cubism.js graph with polled data (every second) from REST API. It seems like a correct value is passed to the directive, but it is not passed to an anonymous callback ...
0
votes
0answers
12 views

Best way to optimize an Angular directive which controls a wizard

I recently found a basic html/css/js wizard online, which I recently converted to an Angular directive. My current wizard has six steps, so I'm trying to make the code more generic. Currently ...
1
vote
2answers
35 views

What is the correct way to handle AJAX driven DOM changes in Angular.js?

I realize that "the correct way" is subjective but I think this is a specific enough question that there is a best practices approach to it. I'm new to Angular and trying to understand what the ...
0
votes
1answer
19 views

Facebook Login Button not appearing in ui-view child

I'm making an AngularJS app with the facebook sdk. The structure comes as follows: <html xmlns:fb="http://ogp.me/ns/fb#"> <head> <title>Reportes para Anunciantes</title> ...
2
votes
2answers
43 views

how to show different message on required and invalid?

can you please tell me how to show different message on required and invalid ?In other word .make a form from json using plugin .In that there are some required parameter .and some I need to ...
0
votes
1answer
22 views

AngularJS unit testing directive with ngModel

I have made a directive which uses ngModel: .directive('datetimepicker', function () { return { restrict: 'E', require: ['datetimepicker', '?^ngModel'], controller: ...