Tagged Questions
AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Whatever(MV*) capability and reduce the amount of JavaScript needed to make web applications functional. These types of apps are also frequently known as Single-Page Applications.
0
votes
0answers
4 views
Angular Datatables Issue with .fromSource
Here is my controller
(function () {
var manageBackOrdersController = function ($scope, $http, DTOptionsBuilder, DTColumnBuilder) {
$http({
url: ...
0
votes
3answers
29 views
How can I make this function more efficient?
I have this data structure of credit card types.
It would be nice to make the hasTransFee more efficient. If I started adding storecards etc to this list it could get quite big so the faster it ...
0
votes
1answer
14 views
Angular - Break line text
I can't save break line text into my database, how to solve this issue?
My save data suppose to be like this
I want to ask something.
Can I?
Not like this
I want to ask something. Can I?
html
...
0
votes
0answers
9 views
Angular directive ui-show breaks ng-click
Issue
ui-hide and ui-toggle randomly breaks binding of ng-click sometimes, only when the ng-click target is followed by the ui-show, and doesn't happen with all nodes (example with text instead of ...
0
votes
0answers
8 views
$resource and mongoDb in angularJS
it's been a week that i'm working with a project with angularJS and all i want is to display data after submit the form .
i did this with php and mysql and could'nt show data from database .
php
...
0
votes
0answers
10 views
Angular complex routing, multiple parameters
So im currently trying to figure out the best way to work with multiple routes in angular. So for example I have this in my app.js:
myApp.config(['$routeProvider', function($routeProvider) {
...
1
vote
2answers
27 views
AngularJS directives data binding doesn't work
DEMO
Here is a simplified version of the two directives I have, my-input and another-directive:
HTML:
<body ng-controller="AppCtrl">
<another-directive>
<my-input ...
0
votes
0answers
5 views
AngularJS File Upload posts to server, which returns Breeze SaveResult
The goal of the request is to upload a file to the server and return two objects for breeze to register and use locally - i.e. an object representing the file uploaded and a news item.
I am using ...
0
votes
0answers
3 views
Deploy AngularJs app an Zend Framework 2.2 app in same url
I have developed a website with PHP Zend Framework 2.2 backend (API) and an AngularJS / Bootstrap front end.
In local mode, I am using 2 apache virtual host to run this website and it works fine.
...
0
votes
1answer
13 views
Why are my two different angularjs services resolving to the same restful Java EE web service?
I have two angularjs services and they are supposed to call different restful services (the first one retrieves a single user and the second one returns an array of users). Why are they both calling ...
0
votes
0answers
8 views
IE9: AngularJS Causes “SCRIPT58734: Could not complete the operation due to error c00ce56e”
I think this is caused by routing in angularJS. Points to:
angular.min.js, line 78 chacter 453.
There's also a problem with relative JS/CSS files that start with same value as having "http: ///" ...
0
votes
1answer
12 views
Angular $parsers: why is a SPACE disregarded when typed into this INPUT element?
I am looking at the directive below in the debugger. I have a breakpoint set on the line beneath the line that is commented out, at var transformedInput = text.replace(/\D/g, '');
When I type a ...
0
votes
0answers
9 views
Append a view in angular instead of replacing with $routeProvider
Is there some sort of parameter I can set in angular to append views instead of replacing the content? Something like this:
'use strict';
angular.module('app', [
'ngRoute',
'app.home',
...
0
votes
1answer
14 views
angularjs repeat not working
I have angularjs setup with routes and I am having some problems with ng-repeat. Here is the code I have in my view
<div class="jumbotron text-center">
<h1>Home Page</h1>
...
0
votes
0answers
13 views
ng-class does not triggered on invalid form field
I am testing angular-fcsa-number directive, during the process the wrapper element of the input field is not assigned 'has-error' class even though the field is invalid. It seems to me that ng-class ...
0
votes
0answers
12 views
How to make frisby.js scripts “pause” during chained executions of apis
I want to test a session timeout using Frisby.js. So I want to call our login API and call an API to demonstrate the user is logged in.
Then I want frisby.js to wait 20 minutes for the session to ...
0
votes
0answers
17 views
Angularjs division by scope variable fails
I use angular-timer.
This works:
{{(seconds/10)*100}}
But this one does not:
{{(seconds/secondsToAnswer)*100}
(it evaluates to NaN)
However, I set the secondsToAnswe to 10 in the ...
0
votes
0answers
7 views
Workflow for API-based app built on node.js
I am building a reporting app on node.js and Angular.
I am using the Quickbooks Online API to pull in reports information.
I have to add custom fields to the reports I pull in and save this ...
2
votes
2answers
31 views
Angular $q then hell
In angular's Q implementation, how could we make this kind of call looks better? In this case, d3 loading has nothing to do with data loading, it should be paralleled for sure.
d3Q.init()
...
0
votes
1answer
18 views
AngularJs - After element is removed/destroyed cleanup
Scenario
I have a directive that wraps the target element in a div to contain the other UI elements that get created with the directive, my problem is that when I try to unwrap the source element ...
0
votes
0answers
11 views
Using an ng-option dropdown in a ui-grid[ng-grid 3.0] editableCellTemplate
I'm using ng-grid's new 3.0 release ui-grid to make a grid in my application. What i'm trying to do is make one of the editable cells in my table an ng-options dropdown that is filled with data ...
0
votes
1answer
20 views
Set and get value with factory, angularJS
Here's a service:
myApp.factory('myService', function() {
var test = 5;
return{
setTestVal: function(val){
test = val;
},
getTestVal: function(){
return ...
0
votes
0answers
13 views
How to map Asp.Net User table to web api 2 controller
I am trying to Get my registered users to a table. I do not know how to map the controller to the sql AspNetUser table. I would have thought it would be similar to my other classes? It is coming back ...
0
votes
1answer
14 views
How to allow input type=file to accept only images files in Safari
I have this:
<input class="inline" id="imgInput" name='imgInput' type="file" ng-file-select="saveImage($files)" accept="image/*" data-ng-model="inputImage">
It works in Mozilla and Chrome, ...
0
votes
0answers
12 views
How can I create a ng-model with a collection from a dynamic created HTML code
How can I create a model in the scope to represent the data from from a dynamic created table(form) with MVC and Angular.
In this code I am creating the table with a model from MVC. Each row has a ...
-1
votes
2answers
17 views
AngularJS Select and ng-options: Can I bind and object to ng-model while only displaying a property?
I'm binding a select element to data that looks like this:
var gearConditions = [
{ id: 1, value: 'New' },
{ id: 2, value: 'Like New' },
{ id: 3, value: 'Excellent' },
{ id: 4, ...
0
votes
0answers
25 views
How do I properly change a scope in angular.js by using an ever changing javascript variable?
I am currently working on a project that requires me to inject information as it changes into many scopes so that I can update the view dynamically. The issue is it will not be a CSV file or JSON ...
0
votes
0answers
6 views
Devise auth with Rails Metal API and existing session?
I'm having trouble finding an answer to this one, but im sure there's a solution.
I have a Rails app, with Devise, users login and are directed to the /user/dashboard page which is an Angular based ...
0
votes
1answer
15 views
Can't get tests to work in presence of third-party module
I have an AngularJS controller test that works just fine UNTIL I add a certain module. Here's the error I'm getting:
TypeError: 'undefined' is not a function (evaluating ...
-1
votes
1answer
18 views
Having problems with the correct syntax of a ng-options select
I have two drop down menus, the first is a list of states. Pick a state, second drop down is populated with the corresponding counties. On the back end I am getting a value for the state (AL) and a ...
0
votes
2answers
41 views
Adding 2 Object.keys to one array
I am iterating over this in my html file to create a dynamic table header.
I have a nested object
$scope.tasks = [{ "Number": 159232, "Title": "BUG", "Status": "pending", "Link": "www.google.com", ...
0
votes
1answer
16 views
Stop two way databinding on model
I'm fairly new to Angular so if there is some incorrect thinking here, please let me know.
I'm trying to create two separate scope variables based on the same data set. I assumed that I would just ...
0
votes
1answer
36 views
Modify jQuery plugin generated HTML
I am using a jQuery plugin (that I did not write) in angular. I wrapped the plugin in a directive and I call $(element).jQueryFunction() on it and the plugin generates a bunch of HTML. The HTML the ...
0
votes
1answer
14 views
angular directive scope: setting a default value
I'm creating a datepicker directive, part of its markup is:
<select class="form-control" ng-model="day" ng-options="day.nr for day in allDays">
I'm trying to define allDays in the scope ...
0
votes
1answer
7 views
ui-route parameter $location.path
Anyone tried to change view via $location.path with ui-route, but with a parameter?
I'm trying to do that but it doesn't work. I think it's from my app.js routes definition that doesn't work
What I ...
0
votes
0answers
17 views
what part of this angular regex is permitting space as a valid character
I am looking at an angular directive for numeric input only:
app.directive('productionQty', function() {
return {
require: 'ngModel',
link: function (scope, element, attr, ngModelCtrl) {
...
2
votes
1answer
13 views
One-time binding throwing error with {{::photo.src}}
I'm trying to use a one-time binding in Angular. I have the following piece of HTML:
<img ng-src="{{::photo.src}}"/>
When the page loads, Angular throws this error:
Syntax Error: Token ':' ...
0
votes
2answers
42 views
Angular.js with JSON not working?
I wonder if you could help me out. I've been trying to get JSON to work with Angular.js but I've been having a rough time with the specifics of a JSON $http.get() call. I would like to simply just ...
0
votes
0answers
8 views
Google Earth regions not working
The following code is in an angular directive:
// -- Regions stuff
var regions = {};
regions.us = {};
var lod = ge.createLod('');
var ne = ...
0
votes
2answers
17 views
AngularJS controller and service creation
Im working on a new Angular project with the following files:
//app.js
var mainApp = angular.module('mainApp', ['serviceA', 'serviceB', "ctrlA", 'ctrlB']);
//ctrlA.js
var ctlA = ...
0
votes
0answers
16 views
angular factory to modify svg on page
This is a follow-up to this question, though they're only loosely related.
My factory is intended to place some svg boxes around some breadcrumb links.
My question is: is a factory the right way to ...
2
votes
1answer
8 views
How to save a model with related records in Eloquent ORM from JSON
The Goal
An Eloquent model, Alum, has a many-to-many relationship with School. One alum can have gone to many schools, and one school can have many alums.
Using Eloquent, I can retrieve and output ...
0
votes
1answer
29 views
Need to convert controller in to factory?
My goal is to be able to exchange data from two controllers, Ive been told I can create a service and then inject the data in to other controllers - I however am having trouble converting this ...
1
vote
0answers
22 views
Html zoom only div element
I have angular project and I want to zoom some div on scroll.
So far I only found zoomooz.js library which is based on jquery. So I want to know if there is any other library which is not based on ...
2
votes
2answers
23 views
Understanding a localhost Image loading error in Angular JS
How can I find the error of the following error report?
GET http://localhost:8080/img/%7B%7BCurrentPage.img%7D%7D 404 (Not Found) angular.js:2763
r.html angular.js:2763
S.(anonymous function) ...
0
votes
1answer
12 views
How can I get an object with a collection using Angular-Resource call an API
How can I get an object that have a collection of it using $resource service.
I created a service to call the API end-point. The service is returning the JSON data with this format. but Angular is ...
0
votes
0answers
10 views
Trouble with active tab default using AngularJS, UI Boostrap, and UI Router
When using a UI Boostrap tabset along with nested sticky states created with ui-router and ui-router-extras, I have an issue where navigating to a tab's state via URL will select the first tab along ...
0
votes
0answers
16 views
Multiple Parent Directive Instances
I am trying to create a pair of directives with a parent child relationship. I found that '^require' works well for this but the issue is I would like to have multiple instances of the directives on ...
0
votes
0answers
23 views
Parsing the value of an input in angular breaks when using angular 1.3.x
Using angular 1.3.x, I have a parser in a directive assigned to an input.
When the user enters text into the directive the function that has been pushed to the $parses array is run. However when ...
0
votes
2answers
24 views
Directives are not working in Angular 1.2.20
In a previous question, I was having problems getting a complex widget to properly work.
After waking up with a clear head, I decided that I should start with a sanity check: can I get a basic ...