Tagged Questions
0
votes
0answers
3 views
is it possible to get all directives of one type in controller in angularJS?
I have a view which contains 20 instances of the same directive, directives are quite big and customizable. I want to be able to list all of those directives dynamicly, so i dont have to create new ...
0
votes
0answers
5 views
Posting form with CSRF token in Angular Js
I want to post a form with CSRF token using angular. I have a working code in Jquery but not able to figure out how the same can be converted to Angular.
$("body").on("click", "#logout", function() {
...
0
votes
0answers
10 views
AngularJS errors in IE8
I am working with a new angular app and need to make it backward compatible to IE8. From what it looks like it loads in my routing info, loads the template (to a point) but in the concole log i see ...
0
votes
1answer
13 views
AngularJS Event Handler Does not fire
I have a form that I am trying to submit via the ng-submit event via a custom Auth service.
login.html (partial template)
<div class='container'>
<form class='form-signin' role='form' ...
0
votes
1answer
9 views
'Access-Control-Allow-Origin' header issue when using Restangular
I'm trying to use Restangular in my AngularJS application to access a REST API and I'm facing an issue with the 'Access-Control-Allow-Origin' header. I know that this needs to be returned with the API ...
1
vote
1answer
17 views
Custom directive to conditionally render wrapper element
Using AngularJS, I want to be able to conditionally render a HTML element with contents or just the contents of that HTML element. For example, I either want to render an <a> tag around some ...
0
votes
1answer
10 views
Stuck with Angular-UI TinyMce
I'm trying to use the Angular-UI TinyMCE directive in my Angular app.
What happens is, I query an endpoint, it returns an array of objects. I have a function that then converts that to a long string ...
0
votes
2answers
17 views
Creating AngularJS object that calls method on app load
I am wondering if there is a convention within AngularJS for creating an object that lives within the app module, but is not attached directly to the view in any way, but is called when the view has ...
0
votes
1answer
15 views
ngOptions “track by” expression
I am trying to use the 'track by' expression to track selections by id, in an array of objects. However, I can't seem to make it work like I think it works.
//ids from server
$scope.serverDTO = ...
1
vote
1answer
18 views
Using pagination with images
Alright so, a friend and I are trying to build a website. It gets pictures from two directories, and shows them in chronological order (the image name is a timestamp). We make a JSON object using PHP ...
0
votes
2answers
32 views
Imitate backend API with AngularJS
Bare with me on this, it might be pain to read this question.
I am building a GUI for an app whose API is still being worked on. I have an idea of how it will look but it's not functional yet. I have ...
0
votes
0answers
19 views
redirect to one module to another module views in angularjs
I have two modules in angular application. Lets say for example module A and Module B. I have some set of views in module A. when the user hits the index file of Module B, i need to redirect/show the ...
0
votes
1answer
22 views
UI angular modal controller $scope values handling mistake
I'm using angular UI modal, in the template of my modal I have 2 inputs and a button, this are using th ng-model attribute, ok, I have a controller set for the modal, which works, it does everything ...
0
votes
1answer
9 views
Exporting Angular Kendo UI Grid to Excel
I have a project where I using the Angular Kendo UI Grid and would like to be able to export the data to an excel document. I have looked at the ng-grid csv export but it appears one is required to ...
0
votes
0answers
27 views
AngulaJS UI-router retry promise
I am using ui-router in my angular project. My question is: What's the best practice to retry and handle correctly a promise inside a resolve?
Right now I am simulating a disconnection or timeout, ...
0
votes
0answers
15 views
Angular.js bug with safari?
I'm working on an app, that's client side is written in angular.js.
It works perfectly EVERYWHERE, even in safari ... until I reload.
When I reload in safari the page renders blank, but here's the ...
1
vote
1answer
20 views
AngularJS - Keep Checking Variable/Function
I would like to know what is the best way to keep checking a variable in AngularJS.
I made a simple clicker game where the user keeps gathering gold, so I need to be constantly checking the number ...
1
vote
0answers
18 views
Angular ng-repeat and filter error (version 1.1.5 works, 1.2.15 with error)
I've created a plunker to show the error:
http://plnkr.co/edit/C64fRUQycG2aplmMFZks?p=preview
There's a strange behavior using angular version 1.2.15.
After an operation of drag-n-drop (using ...
1
vote
0answers
11 views
Integrating SPA-like behavior in existing .NET 2.0 Web Form Application
I maintain a large .Net 2.0 web forms application. My users were complaining about the clunkiness and slow speed of one part of the app. So I created a JSON web service that interfaces with the ...
0
votes
1answer
33 views
Reducing event triggers on evaluated ng-disabled in AngularJS
Use Case
I have a set of controls on a page, roughly 60+. Each control evaluates a string expression to decide whether or not the control is disabled based on data entered within the form itself. The ...
0
votes
1answer
28 views
Convert JSON Array to HTML wrapped String - Angular Service
I'm trying to use a wysiwyg in my angular app. What I want to happen is, I query an end point for an array of objects. Then based on the property name the data inside it gets wrapped into a different ...
-1
votes
0answers
24 views
os x mavericks what the best tool to instal component into AngularsJS [on hold]
I'm learning AngularJS with Node.js by following a 2013 video tutorial.
like recommended by the tutorial i installed javascript module with Bower
I set up the file loading the javascript like ...
0
votes
2answers
21 views
How to access the global javascript method using angular $window object?
How to access the global javascript function using angularJS $window object and assign/bind it to the ng-model/scope variable?
Have a javascript method defined outside scope of angular, need to access ...
1
vote
2answers
44 views
Angularjs Show and Hide Button within ng-repeat
I have a list which populates a screen using ng-repeat.
Each row has a button for the user to click on to select the row.
Typically what you would use a radio button for but the user wants a button ...
0
votes
0answers
6 views
dhtmlxcalendar and Angular - Same values in tags input
I use dhtmlxcalendar and Angular.
I have my tags CALENDAR value="{{value}}" and tag input with dhtmlxcalendar.
I need click to input, choose Date. And all my tags CALENDAR get this Date.
Or if I ...
0
votes
1answer
18 views
AngularJS ReferenceError: $window is not defined
I'm trying to re-direct my users if they pass my form validation (checking usernames and passwords against database values).
The validation works fine but in my .Success function the redirect doesn't ...
0
votes
2answers
34 views
angularjs directive controller $element
i see angularjs highly suggested not to do any dom manipulation in the controller,
only setting the state of the scope, example pulling data from ajax etc,
https://docs.angularjs.org/guide/controller
...
1
vote
1answer
16 views
Loading External JavaScript file after view page is loaded in AngularJs
<div ng-app>
<form ng-submit="addTodo()">
<input type="text" ng-model="todoText" size="30"
placeholder="add new todo here" id="inputtext">
<input ...
0
votes
0answers
7 views
How to send cookie in angularjs fileupload directive
I had implemented a method through which we climbed file and sent a cookie-XSRF token, now I've changed to implement file upload through directives, but does not the csrf.
How I can send in the post ...
0
votes
1answer
15 views
pass html variable to angular function
I am trying to pass a handlebar HTML variable to a scope function using Angular and if I pass using function('{{variable}}'), the value received in the function is literally {{variable}}. If i use ...
1
vote
1answer
29 views
Why is the Angular filter running twice?
So here is some simple sample code I setup from an example today while I was learning Angular.
jsFiddle link
Couple questions:
How does it know to run categoryFilterFn. I'm guessing anything ...
0
votes
1answer
18 views
AngularJS- understanding angular-seed module style
Many angular examples use simple global functions. Angular-seed and yo angular use a more complex coding style. Here is an example of a simple styled example from stackoverflow/jsbin: ...
0
votes
1answer
14 views
AngularJS fn is not a function error using $timeout with a function with parameters
I'm making a webpage that you can edit the text and after you stop typing for 1 second it will automagically save what you've typed.
Currently i'm just working out the $timeout details. I have it ...
0
votes
3answers
36 views
Getting URL variables via javascript
I have a url www.myurl.com/angularjs?var=myvar
I am just starting off with AngularJS (and javascript to be honest) and am trying to get the value of 'var' and pass it to my controller but I have no ...
1
vote
1answer
32 views
AngularJS Select Mutiple - How to submit the id and not and not the entire object
I have a multi select as follows:
<select
class="form-control"
ng-model="formData.selected_tests"
multiple="true"
ng-multiple="true"
ng-options="c.test for c in tests"
...
0
votes
0answers
24 views
How to map data mapping in Angular $resource
Take the following example from Angular's docs:
var CreditCard = $resource('/user/:userId/card/:cardId',
{userId:123, cardId:'@id'}, {
charge: {method:'POST', params:{charge:true}}
});
// ...
0
votes
1answer
16 views
Angular js and google maps
I am a newbie in Angular js. So far I have managed to run some tutorial. But here is what I would really like to do. I have a service that gives me latitude and longitude. I would like to get these ...
0
votes
2answers
15 views
ng-model is not updating with $setViewValue (adopting jquery-ui autocomplete)
Here is full example on jsFiddle:
http://jsfiddle.net/m5Lgu/
Here is code of the dircetive:
app.directive('autoComplete', function() {
return {
scope: { 'uiSrc': '@' },
require: ...
0
votes
1answer
11 views
Passing parameter to XMLHttpRequest eventListener function
I have an angularjs application with a file upload screen.
In order to monitor progress of file upload, i have registered 'progress' event handler as follows:
xhr.upload.addEventListener("progress", ...
1
vote
0answers
29 views
ng-model with checkbox does'nt work inside <span>
Why this doesn't work?
<span class="btn-group" data-toggle="buttons" ng-repeat="team in teams">
<label class="checkbox btn btn-primary" for="{{team.id}}">
<input ...
0
votes
1answer
15 views
Codeigniter + Angular Js: How to keep flashdata?
This is the situation:
I am making a simple app using Codeigniter + Angular Js.
I made a client side validation with Angular and server side validation with Codeigniter.
The both are working fine, ...
0
votes
1answer
42 views
orderBy not working properly
I create 3 group - priorty 1,2 and 3 and use orderBy:priorty expect each pushed task will goes into their group. But after I test with more data I found within each group there's strange behaviour, ...
0
votes
4answers
46 views
Confusion about $q and promises
I have read up on Kris Kowal's Q and angularjs $q variable for a few hours now. But for the life of me I can't figure out how this works.
At the moment I have this code in my service:
resetpassword: ...
0
votes
2answers
46 views
cannot read property 'push' of undefined
$scope.AddTask = function () {
$scope.tasks.push([{
"taskName": $scope.taskName,
"priorty": $scope.selectedP
}]);
};
$scope.tasks = [{
"taskId": 1,
"taskName": "task ...
0
votes
2answers
32 views
keydown fires multiple times before keyup
I have an angular.js webapp which use shortcuts. When I press any key, I get N keydown events, then N keyup events, where N is between 2 and 5, while I expect it to fire only once.
Here is the code ...
0
votes
2answers
39 views
Get the first item in a json array in angular?
I am trying to get the first item in a json array that i get from a web service i call with a factory.
My controller:
CreateProjectIndex.controller('GroupCtrl', ['$scope', 'GetGroups',
...
1
vote
1answer
53 views
How to get the value of a variable from a callback function?
I want to get the contacts value from my a callback function.
How to have my this.recherche = contacts ?
App.provider('ContactsP', function() {
this.$get = function() {
return function(search) {
...
1
vote
0answers
23 views
angularjs orderBy default auto sort
think of it like a to-do list, which has priority option. In my pushed <li>, I used orderBy:priority and it work fine. But later on I found the data I load from the back-end messed up its order. ...
0
votes
0answers
15 views
html video source directory not updating when creating a new source-file
I created a video tag with:
<video width="auto" height="auto" controls="controls" id="videoId">
<source src="media/sample.mp4" type="video/mp4" />
</video>
After I processed ...
0
votes
0answers
36 views
Angular js - leave the OLD view until the new view is fully loaded/renderd
Usually clicking a new link angular starts immediately rendering the new view removing the old one view.
What i would like to achieve is to leave the old/previous view (if
exists) until the new ...