Tagged Questions
0
votes
0answers
7 views
Change minimumDate of angular UI Datepicker
My problem is as follows; I have set a datepicker like this:
<div ng-controller="DatepickerDemoCtrl" class="row">
<div class="col-md-6">
<p class="input-group">
...
0
votes
1answer
17 views
How can I read List of objects in angularjs
How can I read below result in angularjs in controller.js
{
"placeList":[
[
{
"address":null,
"name":"Len The Plumber"
},
{
...
0
votes
2answers
30 views
How to have a value passed to scope from outside the controller?
I am new to angular world and I have function which is loading the html inside perticular div on load and then controller gets initialize. I want to make single var available inside the controller so ...
0
votes
0answers
25 views
$setPristine() does not work properly if form control has invalid data
I am trying to reset form using $setPristine().
$scope.resetDataEntryForm = function() {
$scope.dataEntryForm.$setPristine();
$scope.pr = {};
};
It works fine if all the input controls in ...
0
votes
1answer
38 views
How can I limit the size of attachment (file upload) in AngularJS?
I want the best way to upload files with loading image in AngularJS. At the same time i want to limit the size to 10MB.
Please give the best way to achieve this?
0
votes
0answers
50 views
angularJS watching values of an object list
I have a List containing objects in my angular js project. Each object of the list contains a name and a value. This value is bound to a text field. The list is displayed on a grid and when ever the ...
0
votes
2answers
35 views
Angular JS: How to get values in Cookies in different pages once it is set after login
I am using Angular JS to develop a application. I want to maintain some useful data in cookies so that I can use it through whole application after user login. I have tried for $cookies and ...
1
vote
1answer
128 views
AngularJs:Getting age automatically when given Date of Birth
I have a date of birth field and a age text box.How can i update age text box automatically when selecting date of birth in angularJs.
code for inputs
<label for="" class="col-md-2 ...
0
votes
4answers
193 views
angularjs share data config between controllers
I'm wondering what could be a good way to share directive
between controller.
I've got ie two directives to use in different controller
with different configuration the first think I thought of
using ...
0
votes
1answer
80 views
How can I get all the selected objects of Checkboxes in AngularJS?
I want to get all the selected objects of the checkboxes using AngularJS.
Below is my case
My view.tpl.html
<tr ng-repeat="item in itemList">
<td>
<input type="checkbox" ...
0
votes
2answers
75 views
How to assign value to ng-model definition
I am using ui-bootstrap for typeahead in my application.
<input type="text" ng-model="newItem.id" class="form-control">
<pre>Model: {{customSelected | json}}</pre>
<input ...
0
votes
1answer
152 views
AngularJS UI Modal and select doesn't update the scope values
I am having a lot of trouble trying to save values from the modal component available in Angular UI.
Here is the page controller that calls the modal dialog
$scope.sourceSchema = [];
...
1
vote
2answers
33 views
How to use custom directives.
I have mentioned HTML code below
<div class="panel" ng-controller="myController">
<div myArr="arr" my-Dir="">
</div>
JavaScript is
...
0
votes
2answers
71 views
Angularjs UI won't update with service binding that's updated by promise?
I've spent the night on trying to figure this out and have finally decided to give up and ask for help.
I'm building a web-app with AngularJS that is designed to work with flakey connections ...
0
votes
2answers
45 views
Angular function with ng-if rendering figure
In my showCtrl I have this
$scope.showTeam = function(){
var count = 0;
for (var k in subordinates) {
if (subordinates.hasOwnProperty(k)) {
...
2
votes
1answer
119 views
background default image if ng-style image loaded is invalid url
I am adding background images to my div like this
ng-style="{'background-image' : 'url('+ myvariable.for.image +')'}">
where myvariable.for.image is a url like /examplesite/image/id
This works ...
0
votes
1answer
798 views
How to remove deleted row in ng-table
I have a grid developed using ng-table and I need to remove selected item from grid table after removing from server-side. Already tried to call the grid loading ajax again, but it's not working.
My ...
1
vote
2answers
128 views
Angularjs ui:sortable in ng:repeat not behaving as expected
I'm trying to make a drag-and-drop editor for the values of an HTML <select> menu, with <optgroup> grouping.
I've been working in a JSFiddle; here's what I have at the moment. It ...
1
vote
1answer
105 views
load parent scope before child scope using angular ui
I am using angularjs and the angular ui router to load nested templates. The child's controller inherits the parent's $scope for it's contents. This is all working fine except when I try to load the ...
3
votes
1answer
59 views
How to Dynamically add Direcitves angularjs
I have successfully Added an angularjs directive into another directive using this code
var newElement = $compile( "<div my-diretive='n'></div>" )( $scope );
$element.parent().append( ...
0
votes
1answer
104 views
AngularJS - Select, set default values for Edit/New
First project working with AngularJS and I am a bit stuck using the select list to either set the default value to the first option for a new, or if its an edit select the value.
I have a form with ...
1
vote
1answer
63 views
Load value from db on rendering directive template
I am stuck in a doubt
I have html :
<div ng-repeat="mydata in data" class="ng-scope ng-binding">
<p class="ng-binding">{{mydata.postdata}}</p>
<div my-rating ...
1
vote
0answers
90 views
In Angular JS, can we use ng-controller twice? [closed]
I' am trying to develop an web application using Angular JS. I' am trying to create two Angular JS controllers in the same page but things seems to be not working. Please can someone tell me where I ...
1
vote
1answer
828 views
angular datepicker bootstrap-ui doesent work in view
I use Bootstrap components written in pure AngularJS by the AngularUI Team http://angular-ui.github.io/bootstrap/
Problem is that inside view datepicker won't work correctly.
so in view I have code ...
0
votes
0answers
49 views
In template of the directive i had added the click event which was handling in the link .But the issue is that the function is calling two times
this is my directive .IN this i had added the ng-click for the li with the display of the item name but the function is calling for two times .Any one can you please explain it was happening .below ...
0
votes
1answer
213 views
Angularjs ui modal windows with timepicker
I am trying to add a timepicker and a datepicker on a modal window and feels like the mytime model doesn't update. You can see it in the alert windows.
Can someone give me a hint. When I do a output ...
0
votes
2answers
162 views
Calculate mathematical expression within string in angularJS
How do I evaluate the mathematical expression within a string and assign it to a numerical value in angularJS?
Eg: var value = 10;
var someValue = "Math.min(value * 0.22, 106800)". I need someValue ...
0
votes
1answer
46 views
Applying math rules (like rnd, max etc) to value entered by user using AngularJS directive
I have sum calculation rules defined as below, where 2013 represents the year and 5 and 6 are some codes sent over to the program:
app.run(function($rootScope) {
$rootScope.MATHRULES = {
...
0
votes
2answers
42 views
Angular - how do I use $resource
I have this controller that is working correctly for an Angular UI typeahead. How would I add the server call as a resource?
var receivableApp = angular.module('receivableApp', ['ui.bootstrap', ...
0
votes
1answer
281 views
AngularJS Directive for decimal numbers between 0 and 1
I want a directive in AngularJS which should allow decimal numbers between 0 and 1. In addition, it can allow "-1" as well.
For eg:
-1 is valid
0 is valid
1 is valid
0.12 is valid
0.99 is valid
...
3
votes
1answer
1k views
Angular ng-disabled with function
I want to use disabled-ng with dynamic value returned from a function.
I have tried several ways but it is not working.
<textarea id="{{exercise.type}}" ng-disabled={{prova}}></textarea>
...
0
votes
0answers
75 views
In angular, how can I change the view after certain seconds?
I have my current view as so:
<div class="television-container">
<div class="screen" ng-controller="TelevisionScreenController" ng-include = "currentChannel"></div>
<div ...
1
vote
1answer
646 views
How to update $scope.items array order in response to user re-sorting the DOM array using Angular-UI ui-sortable directive
I am using ui-sortable directive (from angular-ui ) in the view
<ul ui-sortable>
<li ng-repeat="item in items" >
{{item.property1}}
{{item.property2}}
</li>
...
0
votes
0answers
188 views
AngularJS ng-repeat not working with DatePicker controller
I can't seem to get the inlined calendar button associated with the DatePicker to work using ng-repeat on two DatePickers. They both work when I instantiate the DatePickers separately, but I wanted ...
3
votes
1answer
820 views
Angular ngGrid select row on page load
My question is an extension to thisquestion
Getting select rows from ng-grid?
plunker - http://plnkr.co/edit/DiDitL?p=preview
I need a row to be selected on page load and I need to avoid listening ...
1
vote
0answers
126 views
Layouts in angular
I am trying to develop a simple directive which can take a option of layout configuration.
Lets say i want to render something like this on the page
I want to render this 4 co-ordinates in one ...
0
votes
0answers
433 views
Angularjs, clear $location history/cache
Is there a way to clear the history of Angularjs partials? I am currently developing some angularjs UI and I found that when I click back button on browser/device, it will go back to previous page, ...
1
vote
1answer
17 views
Object still up
I'm using Angular to display a table of users. I created a form to add and edit users. When a user row is clicked I'm passing that particular user to a function in my controller:
$scope.editUser = ...
0
votes
1answer
152 views
Can you access a global javascript variable in an Angular expression?
Is there a way to access a global JavaScript variable in a Angular expression? such as:
ng-disabled="{someJavascriptVariableHere}"
1
vote
3answers
270 views
Bitwise Angular Expression not working
I have a basic ng-show expression as follows:
ng-show="((message.status & messageStatus.Spam) != 0)"
However, this fails with the following msg: "Token '&' is unexpected, expecting [)] at ...
1
vote
2answers
93 views
AngularJS partials with URLs in directives - best practice?
I quite like how angular-ui has created ui-routes, which provides named routes (among other things).
Though likely a simple directive to write—a wrapper for ui-view—I am not sure if it is best ...
1
vote
0answers
98 views
Manage complex UI with hiding/showing windows without losing scope/control
With angular js, How can I manage an complex view layout that allows the hiding and showing of windows (and so on.) I need to do so without loosing any state or scope while reopening windows if the ...
0
votes
2answers
3k views
Angular JS: Load CSS and JS files dynamically
I am in the middle of developing an web app. I am using AngularJS for loading all the files dynamically into the UI.
1. i have and index.html onto which all the files will be loaded dynamically on ...
0
votes
0answers
204 views
Custom Directive ,isolated scope and form validation
I need to create the following component
<input type="text" bp /><button><i class="icon-search"></i></button>
i have defined the form and form validation for it
...
0
votes
0answers
127 views
Call method on Controller after dialog closes
I am trying to open a dialog where user can enter a name and then call a method on controller passing the result from the dialog.
class MyController {
constructor(public $scope, public $dialog) ...
3
votes
1answer
354 views
Angular.js - does form validation emit any events?
The problem is, I'm using ui-router and I have two views, one is kind of a toolbar, second is content with a form.
Now I'd like to have a save button in the toolbar, which would be disabled if form ...
0
votes
1answer
512 views
AngularJS ngrepeat - filter based on scope data
I am trying to create a dropdown menu using angular ng-repeat.
I have a jd object with a field called parent_id which indicates parent node under which this node should show up. Help I need is to ...
0
votes
3answers
907 views
Binding with radio's not working in Angular
Using ng-repeat I display some radio's in the edit form:
<label style="float: left;margin-right: 3px;" data-ng-repeat="gender in genders" data-ng-hide="$first">
<input type="radio" ...
3
votes
1answer
2k views
Angularjs ng-click not firing under ng-bind-html-unsafe
This is the directive
aomApp.directive('aomAlert', function ($rootScope,$compile) {
return {
restrict:'EA',
transclude:true,
replace:true,
scope: {type: '=', msgCollection: '=', ...
0
votes
1answer
354 views
AngularJS - accessing directive scope
So, I'm looking to use ui.bootstrap.tooltip to appear when an element in a form is invalid.
I'm using a directive to do this - it's a bit ugly, but it works. Except for one thing - the controller ...