Tagged Questions
1
vote
1answer
26 views
ng-select AngularJS
I'm trying to put together an ng select to select these quantities:
"splits":[
1,
2,
3,
4,
5,
6,
8
],
<select ng-options="?" ...
0
votes
1answer
33 views
Is it possible to pass GET response data back to same factory?
Question:
From any controller, how can I call the getPages function, return the data back to the controller and replace the empty Page.details.refobject with the GET response data?
is it possible ...
0
votes
1answer
17 views
AngularJS Chained Select reset to defaults
I'm presenting some data from a JSON file using three chained select menus.
Here's the Plunker example:
http://plnkr.co/edit/vRTrjmMX5cdLCmuwxT2l
<select
id="crops"
...
0
votes
0answers
10 views
Testng a partally executed $timeout in AngularJS
I have an AngularJS service. This service uses a $timeout in its function. I'm trying to figure out how to test this service in various situations. Here is my code:
myApp.factory('myService', ...
2
votes
1answer
12 views
ng-table reload does not work
I created a ng-table like:
data = $scope.publications;
$scope.tablePublications = new ngTableParams({
page: 1, // show first page
count: 20 // count per pages
...
0
votes
0answers
21 views
Angularjs not reloading page on url click
I have a web app that use angular for a calendar / events.
The only module that I'm using is ngResource. I'm not using ngRoute. When I reload a page with "ctrl+f5". The scripts are loaded and ...
0
votes
1answer
9 views
AngularJS Directive Applying Wrong Data
So I've written a custom directive in AngularJS that generates a HighCharts graph when the page is loaded.
The issue I'm having is that it is applying the data of two separate queries in the back end ...
0
votes
2answers
14 views
Angular JS promise/defer: using framework Quickblox, How to upload images and then upload public urls to custom object
I am making an app where I'd like users to be able to upload 5 images of themselves.
I am using a backend-as-a-service (Quickblox), which requires me to create the blob files and upload them ...
0
votes
1answer
9 views
Protractor test page tat requires login
I am trying to test admin page that is part of angular app, that page is requires login.
When i tried to move the browser to the test page, the browser redirects by the server to the login page (that ...
0
votes
1answer
26 views
Exposing the current state name with ui router
I'm trying to implement a language switcher where if a user clicks on "de" from any given page on an "en" side - it takes them to that page of the "de" side. If I console.dir the $state parameter, it ...
1
vote
2answers
25 views
AngularJs Load dependencies files
I'm learning angularJS and in all tutorials and screencasts I always saw to use angular writing code all in a unique file, example directives, controllers, factories ecc...
Logically for large ...
0
votes
2answers
23 views
ng-change not working on ng-select
I'm using a select box that is populated by the ng-options. Unfortunately, I cannot get my ng-change function to call.
Here is my Fiddle
Here is my js:
var myApp = angular.module('myApp',[]);
...
2
votes
1answer
22 views
Validating input using Angularjs on IE8
I have a form (made using divs) that gets displayed when i select an option using dropdown menu.
Am using ng-options for dropdown selections. My issue is I need to support IE8. I know IE8 does not ...
0
votes
1answer
8 views
How to actually reset $httpBackend expectations?
I've tried and tried to get this to work. The documentation is terse, at best:
resetExpectations(); - Resets all request expectations, but preserves all backend definitions. Typically, you would ...
0
votes
0answers
11 views
CSRF using Angular.js with PHP CodeIgniter backend
I am trying to implement CSRF with Angular.js and CodeIgniter, however, I am not sure if my method is secure.
When Angular sends a post, put, or delete request, I have a custom security class in PHP ...
-1
votes
1answer
21 views
AngularJS ng-show one condition with multiple elements
I have three divs with an ng-click with a "showMe" boolean. Their paragraphs have an ng-show that evaulates "showMe".
My question is, how can I use one condition to show the paragraph on the div I ...
0
votes
1answer
24 views
Using AngularJS Values in JavaScript Function
I have a function that calls some code using the Jcrop API that takes in some values to set aspect ratio. However, I need those values to come from a data connection for which I'm using Angular. So I ...
0
votes
3answers
27 views
Loading Module in AngularJS Service
I'm learning AngularJS. Currently, I'm trying to load a third-party module in my service. Specifically, I'm trying to load angular-moment. My service is defined like this:
myApp.factory('myService', ...
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 ...
2
votes
3answers
36 views
Angular ng-class if else
I'd like to know how to do to make the False ng-class.
page.isSelected(1) is TRUE if the page if the page is selected, else FALSE
<div id="homePage" ng-class="{ center: page.isSelected(1) }">
...
0
votes
1answer
19 views
How to load module on demand in angularjs?
One thing should be notice is what i mean "module" is defined by angular.module() method,not controller or service.And there's already some solutions about how to load controller and service on demand ...
1
vote
1answer
24 views
AngularJS databinding not updating until arbitrary event is fired
so I can't really make a fiddle out of this problem due to client restrictions but in general I have a two way data binding string that won't update on the html side until some arbitrary event is ...
0
votes
0answers
6 views
Ionic / Angular ui-router - tabs returning wrong URL/content
I have an Ionic tab menu which shows 4 items (code here and codepen just has 2 items for clarity) and a "more" item which leads to further menu choices displayed as a list in an ion-content. It uses ...
0
votes
3answers
40 views
Angular ngRepeat orderBy order in Object
I have the following JSON data and I'd like for Angular to do an ngRepeat for each key inside Specification and be displayed in the same order as they are in the object:
"Specification": {
...
0
votes
0answers
11 views
Angularjs page not loadingon IE11 with routing and JSON
I have an issue with Angular and internet Explorer (it's working on chrome and Safari)
I am making a blog with different article from json data, and when you click on the article, a new page is ...
1
vote
2answers
25 views
Angular, hide parent when there are no child-elements with nested ng-repeat's
I know there are some posts on the subject, but I could get this specific example working,
because of the nesting:
I have a FAQ with 3 levels of nesting, rendered by ng-repeats,
I want to hide the ...
1
vote
0answers
34 views
Using angular expression in html onclick attribute
I am using angular to build a table for me dynamically. The Expression user.User.id needs to be listed out as an integer in each place that I use it and it works everywhere except inside a html script ...
0
votes
1answer
37 views
How can you filter objects by an array in angularjs
was just wondering if you can filter an existing array with another array of filter.
So say our original json was:
[
{
"bookname": "harryporter",
"year": "2000",
"author":"J. K. ...
0
votes
0answers
16 views
How e-commerce sites retrieve images ? [on hold]
I have a website where AngularJS and NodeJS is used. I want to retrieve around 100 of images with its properties such as price, size etc. The number will grow over a period of time.
How does all ...
1
vote
1answer
35 views
Toggle Classes with Local Scope
I am trying to toggle an active class for a single button in each row. I can toggle the class on, but I cannot figure out how to remove it once the condition has changed.
Please see this example.
At ...
0
votes
1answer
34 views
Search AngularJS resource using query string
I have the following resource set up in my AngularJS app:
var phonecatServices = angular.module('phonecatServices', ['ngResource']);
phonecatServices.factory('Phone', ['$resource',
...
0
votes
2answers
19 views
Using Express Handlebars and Angular JS
Background
I am currently building a website that uses NodeJS for the server, Express Handlebars(Just Handlebars but server side) , and hopefully AngularJS for some client side stuff.
The Problem
...
0
votes
2answers
27 views
Globals across Angular services?
Can I define global variables or functions that can be accessed by all of my Angular service modules?
For example, I have several services that make http requests to various endpoints of the same url ...
0
votes
0answers
14 views
ng-Grid error when getting focus
I'm having a problem with ng-grid that I can't figure out. Whenever I click on a cell I get this error:
TypeError: undefined is not a function
at ...
0
votes
2answers
35 views
Push json data to existing array in angular js
I'm having issues with pushing data to an existing array. You can see I'm posting the data to a table, however, when a user enters an 8 digit barcode, I like to push the data to the table.
Factory
...
0
votes
0answers
35 views
Why are all my scripts transferring as MIME type text/html?
I work on a large node.js/Angular.js application. We use grunt to recompile public scripts and markup. Most of the time, I have no problems running the server locally. Every time I make changes, I run ...
0
votes
0answers
20 views
How can I port jQuery code for resizing Bootstrap modal windows to AngularJS?
I am resizing Bootstrap modal windows based on their content with a little help of jQuery. The whole thing is basically working as a custom-built lightbox. Now I would be very happy if I could use ...
0
votes
2answers
16 views
AngularJS: what is $templateCache?
While profiling a large AngularJS app, I started tracking $templateCache.
https://docs.angularjs.org/api/ng/service/$templateCache
What is this object? Does it store the partials as they are ...
1
vote
3answers
25 views
Manipulating DOM with AngularJS
Im trying to manipulate my table with angularjs using directives.
I want to add a new class to the first td with id=2 like this:
gameApp.directive('mapActivity', function() {
return {
...
0
votes
1answer
17 views
Angular.js ie ajax request issue
I have a problem with angular.js ajax call with IE. The first time I do the request, all is working good (I get the good result). But when I do an other ajax call (same request) without refreshing the ...
0
votes
2answers
13 views
How to define AngularJs service with REST (using $resource) and other more method
I want to define more methods on the same settings service other than the REST method I already have.
I don't know how.
var settingsService = angular.module('settingsService',['ngResource']);
...
0
votes
1answer
15 views
angular.identity is undefined
I'm trying to use the following...
.withHttpConfig({transformRequest: angular.identity})
but i always get undefined is not a function It does not seems to know what angular.identity is. Can anyone ...
0
votes
2answers
34 views
Passing JavaScript to Closure in JavaScript
I'm learning how to actually use JavaScript. I've run into a situation where I'm getting an error. The error is: TypeError: 'undefined' is not an object (evaluating 'this.flagged'). I've narrowed down ...
0
votes
1answer
22 views
Initial loading spinner for AngularJS
I want to show a spinner on the first load of my application like: https://devart.withgoogle.com/
I've attempted to do this via the Services module like so:
angular.module('InitialLoad', [])
...
1
vote
1answer
12 views
Is it possible to use Protractor for testing any non-AngularJS application?
If I have a web application written for example in Ember/backbone, can I still use protractor to test it? Is there any advantage over testing it using WebdriverJS?
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
vote
0answers
18 views
Initiating same angularjs app in two places
I have a html template that is being used for multiple projects. In that template I have two places where I can set the content.
The layout is something similar to this:
<body>
...
0
votes
1answer
23 views
AngularJS, insert predefined DOM element into html
I have an predefined Canvas element in every element of results array, which I use in ng-repeat. I need to place this canvas inside of every element of ng-repeat. {{result.canvas}} didn't work and ...
0
votes
0answers
8 views
How to mock constructors in AngularJS(in particular Date() constructor)
I need to test a function that accepts millisSinceEpoch and returns the time if the date is the current date else returns the time.
getLocaleAbbreviatedDatetimeString: function(millisSinceEpoch) {
...