Tagged Questions
AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Controller (MVC) capability and reduce the amount of JavaScript needed to make web applications functional. These type of apps are also known as Single-Page Applications.
0
votes
0answers
3 views
How to service call using angularjs
I have the following json data service file. {
"id": "exam_history:exam_colon",
"text": "When was the last time you had a screening for colon cancer?",
"answer": {
...
0
votes
1answer
7 views
what does the scope in the linker function represent in angularjs directive
What does the scope parameter in the link property of the directive definition object represent. Is it the scope that the directive will be used in or is it an isolated scope for every time the ...
0
votes
0answers
4 views
Properly Handing Anchors in AngularStrap's ScrollSpy
How can I properly use AngularStrap's ScrollSpy interface to link to anchors within the current document?
Looking at the AngularStrap documentation I see that when a link is visited a double hash is ...
0
votes
0answers
7 views
Angularjs Dismiss Modal Outside Modal Controller
I'm trying to close a modal when a promise is accepted from a Service, i can't figure it out: this is throwing an 'Can't read property value of undefined' ....
$scope.sendReply = function() {
...
0
votes
0answers
10 views
Create a angular module listener
I want to create a module that when it is injected in a controller, and when some text input field is clicked on, the module to do whatever it needs to do.
So do you have any suggestions on how to ...
1
vote
0answers
16 views
Angular Data array empty after ng-repeat
I have problem with my data array contains alphabets.
I am using ng-repeat to display data of alphabets. I have following array of alphabets in my scope.
$scope.alphabets = ['A', 'B', 'C', 'D', 'E', ...
1
vote
1answer
10 views
Introducing delay in displaying a message . transition-delay property not working
I have the following div tag which contains an up arrow.If hovered upon it displays a message.
I want a one second delay in bringing up that message. I used transition-delay property but its not ...
1
vote
1answer
11 views
How can I include form fields as an ng-include inside form?
Relatively new to Angular, and trying to create a form that is used for both create and edit operations. There are forms fields that I am hoping to share, but from what I understand ng-include ...
1
vote
1answer
18 views
Link function not called
I have a directive defined as following -
.directive('codesection', ['$compile', function ($compile) {
return {
restrict: 'E',
scope: { current: '=', parent: '=', index: '=', params: ...
1
vote
2answers
19 views
Can you do conditional formatting with AngularJS?
I have an element containing a value from my controller:
<span>[[myvalue]]</span>
which I'd change the background color depending on the value. For example values 1-5 should have red ...
1
vote
2answers
10 views
AngularJS - Multiple keypress at the same time
I have the following $broadcast to catch keypresses in Angular:
$document.bind('keypress', function(event) {
var key = event.which;
$rootScope.$broadcast('keypress', event);
...
1
vote
0answers
8 views
php-angularjs executable phar not working
I have my single page application with angularjs and php and after the completion of project I created executable file successfully but it seems not working any more. Here are my php code for creating ...
1
vote
2answers
15 views
Re-rendering entire ng-repeat
I'm unable to re-render ng-repeat. The ng-repeat is connected to a scope variable, which I'm trying to change using an ng-click. The value of the variable is changing on ng-click, but the ng-repeat is ...
1
vote
1answer
9 views
Protractor: get value of binding with xpath
If I have html like this:
<body>
<div id="menu">
<div id="button"> {{ someBinding }} </div>
</div>
</body>
and I have a statement in protractor ...
1
vote
0answers
7 views
Angular-UI ui-router supporting infinitely nested states
I have a situation in my Angular app where I'd like to consider an infinitely nested state/route. For example, let's say that I have a person and I want to see the lineage of the family. I might ...
1
vote
1answer
14 views
Is there a way to add a CSRF token validation on GET requests in Django to mitigate GET requests to a JSON API?
I'm currently building a webapp using Angular JS and Django. At this point in the angular documentation, I was led to this article about the vulnerabilities of JSON GET requests. Django supports a ...
1
vote
0answers
6 views
Post Multipart File inside model - Restful Angularjs - Spring Server
I want to post via Angularjs a file (multipartFile) inside my Model
that is my controller model
$scope.modelDomain = {};
$scope.modelDomain.id = compose.id;
$scope.modelDomain.title = ...
1
vote
0answers
6 views
AngularJS “No pending request to flush” while unit testing a controller with a $resource
I am writing unit tests for a controller. This controller has a $resource service injected :
function controller($scope, Service) {
Service.get(function(result){
// do stuff with the ...
-2
votes
2answers
33 views
AngularJS ng-repeat without markup?
Question:
How can I use ng-repeat without injecting markup?
The trick doesn't seem to work (working example==correct answer). The -start, -end trick won't work.
I've found solutions that come ...
1
vote
1answer
24 views
AngularJS and jQuery-UI Sortable not working
I am trying to build a very simple angularjs directive that will allow me to nest jquery-ui sortable lists.
I have a pure jquery version that works but when I add in the angularjs directive code it ...
1
vote
0answers
7 views
Check for pending request in socket.io
In Angular I use $http.pendingRequests to check if the request is pending to the server and to show a small progress bar. Is there any way to achieve the same result with Socket.io ?
1
vote
2answers
26 views
progress bar error in angular bootstrap application
I have the following angular app:
<!DOCTYPE html>
<html ng-app="StudentProgram">
<head>
<title>Student Program Management</title>
<script ...
1
vote
1answer
10 views
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
I have created an API in Django, and some plain files from the desktop for angular and html. I like to fill an angular app with the API output. The request reaches the webserver, but then i get an ...
2
votes
2answers
16 views
Angular noob: Why is my homepage not loading (routes related)?
This is my first time playing with Angular.js. I have an index page:
<html ng-app="toDoListApp">
<head>
<link rel="stylesheet" href="css/app.css"/>
</head>
<body>
...
1
vote
0answers
24 views
Conditionally open a modal in AngularJS
I want to implement a functionality similar to what Facebook does with its photos. Here's the use case:
User goes to /—a page with a list of links
He clicks on a link
A modal window appears and the ...
1
vote
0answers
13 views
AngularJS : How to unit-test a provider
After several hours of searching and experimenting, my mind is blown. A straight-forward and working example of how to unit-test an AngularJS provider is nowhere to be found and I cannot get it to ...
1
vote
0answers
13 views
JQuery custom dropdown plugin with AngularJS
I have seen this amazing drop down [on codrops][1]. But I need to use this in an AngularJS application. How can I use this JQuery plugin in my AngularJS application. I am very new to AngularJS. Is ...
1
vote
2answers
17 views
AngularJS routing to different page
In Angular, how do I redirect to a different page? With all the examples I've found, it only redirects to a relative URL, i.e. my currentURL+'#/new_newPath'.
Here is my code:
function ...
1
vote
1answer
17 views
How to get radio button checked in AngularJS?
I'm stuck with something supposed simple: get the id of the checked radio button to give it to a function.
Please look at the code bellow:
In HTML :
<ul>
<div ng-repeat="r in ...
1
vote
1answer
9 views
How can I debug an Angular JS $http.put that seems not to do anything?
I have these two functions:
var getConfigs = function () {
var defer = $q.defer();
$http.get('/api/Config/Get')
.success(function (data) {
defer.resolve({
...
0
votes
1answer
31 views
angularjs - check if input has focus
I have an input with a minimum number of characters required. When a user start typing something and then switch to another field without reaching the minimum number of characters required, I want to ...
0
votes
0answers
4 views
code snippet for consuming JSONP service in Factory in AngularJS
I want to consume a JSONP service in Factory(AngularJS) using $http or $resource and then I want to pass the factory object in controller as its dependency to bind the data in view.
I am able to do ...
0
votes
0answers
18 views
Unable to get posted data by $_GET, $_POST & $_REQUEST in Angularjs
I am new to AngularJs. I was trying to create a simple application using angularjs.
In a simple application i am not able to print posted data via $_POST, $_GET or$_REQUESTin my php script.
While ...
0
votes
0answers
6 views
Google Autocomplete in angular directive not working on mobile safari
I have an angular directive that listens for a google place 'place_changed' event. The code works just fine in desktop browsers.
However, it doesn't work on mobile safari in iOS7 (haven't tested ...
0
votes
0answers
15 views
Can't get CORS working in Firefox
I'm trying to get a simple example working with the MEAN stack and I noticed that my DELETE request does not work in Firefox. I believe this is due to CORS.
When i click a link to submit a DELETE ...
0
votes
0answers
11 views
How to print a selected image inside ng-repeat Angular directive
What's the best solution to print only a selected image rendered inside an ng-repeat Angular directive ?
How do I resize the selected image to fit an A4 page before the print dialog box appears?
...
0
votes
0answers
25 views
Jerky interrupted animations with ngAnimate
I've noticed that with ngAnimate loaded CSS transitions are "jerky" when interrupted with another transition. That is, they seem to jump ahead to the target state, rather than start from the current ...
0
votes
1answer
15 views
angularjs sanitize to remove only JS
I intend to allow users to input iframes, custom inlines styles and maybe other things.
But I would like to remove anything JS.
By using $sanitize I seem to remove too much.
1
vote
1answer
14 views
Can't Access individual JSON data [AngularJS]
I have an external JSON file hotel.json.
{
"hotel_info": [{
"booking_id": "2",
"hotel_name": "Ascot Lodging",
"star_id": "2",
"street": "Via Vincenzo da Seregno",
...
0
votes
1answer
18 views
angularjs orderby default limitation
let say I have json like this
var json = [
{
'id':1,
'sales':
[
{'salesId':123},
{'salesId':456}
]
},
{
'id':2,
'sales':
[
{'salesId':789},
...
0
votes
0answers
13 views
Display result of request in different page on JQM/Angular
I'm creating a little JQuery Mobile + angular app.
I have index.html page which has few controls. When clicking on the button, I'm calling a function in the $scope of the controller which returns a ...
1
vote
1answer
13 views
How to remove repetitve function from angularjs controller
Hi i am writing some code staff under angularjs but i has to make duplicated code from controller to other for example let's assume that we have two controllers editProductController and ...
0
votes
1answer
12 views
Jasmine test for scope methods fails
I have an spec that test's if the method in scope was called (see below)
describe("Event Module tests", function () {
var scope, simpleController;
beforeEach(module('SimpleApplication'));
...
0
votes
0answers
14 views
How to compare the performances of two versions of an (Angular) application?
I would like to use angular-translate in my application (which is pretty big). How can I objectively measure the performance loss?
0
votes
2answers
10 views
Angular Directive on Binded Values
Im trying to make a text formatting Directive in Angular.
In my current application i have many places where i have to present time in HH:MM:SS format, the time in the DB is saved in seconds. So i ...
0
votes
0answers
18 views
Angular directive to replace external links
How can i create a custom filter to replace:
<a href="http://www.externalsite.com">Whatever text</a>
into this:
<a href="#" ...
1
vote
1answer
23 views
How to pass object/multiple arguments from Angularjs factory to spring controller
I am a newbie in Angularjs so please bear with me,
I have a requirement where I have to pass an Object to factory from controller.js in AngularJS , which calls a rest service and that object param is ...
0
votes
0answers
11 views
angular ui router directive dynamically ui-sref
HTML
<li class="dropdown signals" signals="signals" data-nb-signals="" style="visibility: hidden;">
<a data-toggle="dropdown" href="#">
<i class="glyphicon ...
0
votes
1answer
17 views
$rootscope not holding value
I am using the following code to store username ('pqr') value in rootscope but it is scoped by $http.get mehtod
angular.module('myApp').run(function ($rootScope,$http) {
$rootScope.username = ...
0
votes
2answers
24 views
How to update AngularJS view when the value has not changed?
In my view I diplay a photo from the user's profile, in my view I have:
<img src="{{user.photo.pathRelative}}"/><br/>
When user uploads new photo it is uploaded to the server and the ...