Tagged Questions
0
votes
0answers
4 views
how to send parameter value in second view in angular?
can you please tell me how to display the value of parameter on second view ?Actually I make a form in which there is two field : name and class .when user press(after filling fields) add it generate ...
0
votes
0answers
10 views
MEAN.JS stack $http.post().success() passing variables into success() anonymous function scope issue
I'm trying to make this work:
$http.post('/route/path', {'username': $scope.threadedUsers[currentIndex].name}).
success(function(data) {
$scope.threadedUsers[currentIndex].ID = data._id;
...
0
votes
0answers
9 views
Upload file with paperclip and angularjs
I'm trying to implement this Angularjs upload in my rails application:
Angular File upload
This is my photos_controller:
def create
@photo = current_user.photos.new(photo_params)
respond_to do ...
0
votes
2answers
14 views
how\where do I initialize a value so all listeners are executed?
I have a an AngularJS view that includes something like this:
<select ng-change="shop.updateSizes()" ng-model="shop.color" ng-options="color.name for color in COLORS"></select>
The ...
0
votes
1answer
39 views
Method fires up multiple times
I call a method in my controller, but it fires up 2 times when I want to log object.name.
When I want to log whole object, it fires up 6 times. Do you know why?
(function(){
var app = ...
0
votes
0answers
16 views
HTTP Put not updating correctly?
I am new to AngularJS and I was trying to update my MongoDB Database. I am having an issue when I am trying to update my $http.put request. The following is my attempt at trying to do so:
Client ...
0
votes
0answers
17 views
Testing an angular controller with a service dependency
I am attempting to create a very simple unit test for an angular controller however I am finding a lot of different information with regards to mocking a service giving different approaches with a ...
0
votes
1answer
22 views
Escaping double double quotes in html attributes in Javascript
I use bootstrap and create html nodes which contain popovers with jQuery. The popovers contain html so that I have problems with the quotes and escaping:
var content = '<input type="text" ...
0
votes
1answer
30 views
doing the javascript/angular part with Polymer
so i just found out about polymer and it looks realy cool but the thing is i couldn't figure out if its using javascript or its own unique language.
so what script language polymer using? i like ...
1
vote
1answer
42 views
What should be my approach for angularjs nested ajax calls [loop within a loop]?
| | | | A1 | | | |
| AJAX 1 | --> | Response1 | --> | AJAX 2 | --> | Response2 (Final) |
| | | [ARRAY]-A1 | | A1 ...
1
vote
1answer
30 views
How to get service instance from module instance [Angular]
i have some module defined and services too with that module like below
var services=angular.module('app.services', []);
services.factory('ApiService', function($http,$cookies,UserService){
...
0
votes
3answers
18 views
I don't know how I can get the subdata in a JSON file with AngularJS
I have this JSON file:
{"__v":4,"_id":"53dbeedb1a6550ee08c55c05","name":"Quatro ...
0
votes
2answers
44 views
Why does Angular have isDefined and isUndefined functions?
I just brushing up on AngularJS and I came across angular.isDefined and angular.isUndefined, why would you use these? Why not just do
if (!obj) or if (obj === undefined)
I get why you might not ...
0
votes
3answers
21 views
Getting fewer/matching objects from json file
My json file looks like this:
[
{
"id" : "1",
"type" : "hardware"
},
{
"id" : "2",
"type" : "software"
}
]
Now when I run following code :
$http({
...
0
votes
0answers
27 views
Logout button not working - angular JS + Ionic
I did a tutorial on Angular JS which has a in-built nav bar with create item and logout buttons (which means theres a nav.js and nav controller). When I tried to fit it into Ionic, quite a few items ...
0
votes
1answer
40 views
How to execute a javascript command only once
I have a function the calls an HTTP Request GET to compare a given value to check if it matches any element within the array. If there's no match, I want to put that given value into an array but my ...
0
votes
1answer
31 views
how to save data in table in angular ..?
I know how to store data in HTML5 table .
http://www.html5rocks.com/en/tutorials/webdatabase/todo/
but I want to store data in table using angular.I make two field name and class.I want to make ...
0
votes
1answer
15 views
how to store sata in session or local in angular ..?
I know how to store data in session / localstorage..window.localstorage(key, value)But now I am using angular can you please tell me how I will store data in angular in session or local or in table ...
0
votes
2answers
38 views
Angular service returning object?
As far as I understand Angularjs services are created by passing in a Contructor function:
app.service('serviceName', function(){
this.var1 = 'foo';
this.method1 = function(){
}
});
...
0
votes
0answers
24 views
Ng-bind - Can't replace the text immediately
I try to change the text with ng-bindand read this text. But I can't do it - text is empty. How can I do it? Thank you
function Controller($scope) {
$scope.sometext = 'yo';
...
0
votes
0answers
14 views
Yeoman I don't know how reconstruction generaten code on my app [on hold]
I wrote an app and now I want to put this app to yeoman.
I rebuild HTML files and directives and when I want to paste my app.js file whole site is getting break
I changes ng-app and modules on that ...
0
votes
1answer
23 views
Using class with angular vs ng-class while using a mixed expression
I have a div that I want to give a dynamic class with AngularJS.
The div is withing an ng-repeat statement where lang.prefix is first en then sv
Using the following code works and sets the class to ...
1
vote
2answers
22 views
How do I format the display of a select from properties of the objects using angular?
$scope.StateList = {"States": [
{
"Id": 1,
"Code": "AL",
"Name": "Alabama"
},
{
"Id": 2,
"Code": "AK",
"Name": "Alaska"
},
{
...
1
vote
1answer
24 views
Posting data from Angular https to C# controller
I have read several of the questions here related to this topic and have a working solution, but I don't know how it works and it seems wrong. New to Angular so need some advice. Posting data from ...
0
votes
1answer
21 views
Can not attach input text box to an angular $scope
I have some markup in my angular app that looks like this:
<table class="table table-striped">
<tr ng-repeat="query in saved_queries">
<td ng-click="fill()"><a>{{ ...
1
vote
0answers
11 views
Can't get external library with browserify and debowerify
I have a headache on my hands. Here's my current setup:
bower to get vendor libraries (angular in this case)
gulp task to run browserify
debowerify to make the bower libraries compatible with ...
0
votes
1answer
24 views
How to access value of a select in my angularjs controller
I'm using angularjs for an application. I have several html items in an html file. Rather than access the values using the $scope.thisValue in my controller, I'd like to be able to loop through all ...
0
votes
1answer
22 views
Add simple antispam operation in angularjs form
I have a input field like this :
<div class="form-group form-group-sm">
<label for="antispam" class="col-sm-2 control-label">1+1+5 = ?
<span ...
0
votes
1answer
10 views
Angular.js - Change url from login page causes logged in area glitch
I have a confusing situation somebody probably already had.
I am implementing login / authentication with angular.js.
I've done everything like described in this link
...
0
votes
1answer
29 views
AngularJS full page refresh
I am using Laravel with Angular and need a full page refresh when I switch to a particular route.
When this link is clicked
<a href="admin/pages/{{page.id}}/content">Manage Content</a>
...
0
votes
0answers
17 views
AngularJS directive blocks filter?
I have an element directive that has an attribute directive on it. At first I created the attribute directive separately, and it worked.
However, when I try to embed the attribute within the element ...
-1
votes
1answer
18 views
Angular keep iteraction object in option with ng-repeat
With ng-options the selectedCar will be a car object
<select
ng-model="selectedCar"
ng-options="car as car.description for car in cars track by car.id">
</select>
With ...
0
votes
2answers
24 views
Running jQuery code in MEAN.JS stack
I'm starting to work with NodeJS, and more expecifically with MEAN.JS. I'm trying to run some custom JS code, using JQuery, but no matter where i put the code, it nevers runs as expected. This is my ...
0
votes
1answer
26 views
Text Area linked with drop down
I have a drop down linked to a text area, so that when a choice is selected from the drop down the textarea automatically populates from the same model. A working version can be seen here: JSFiddle
...
0
votes
2answers
45 views
Wierd AngularJS error
I am rather new to AngularJS programming and was working on a sample application. I came across a problem while returning an object from a service. Consider following code in my custom service:
...
1
vote
2answers
33 views
how to completly remove # tag from angular route?
i am using $locationProvider.html5Mode(true) to hinding # tag in addressbar.
...
0
votes
2answers
22 views
How to display value in Input box with AngularJS
I just started learning AngularJS. I want to implement a page for editing user info by showing the old info in the input field on the page. whenever the user want to update info they can see the old ...
0
votes
1answer
18 views
Showing data in table from 3 different JSON arrays in AngularJS
I have a JSON data like
{
tableList:["a","b"],
dbList:["c","d"],
score:[2 , 5]
}
I want to print this using AngularJS in Table like
DB Table Score
c a 2
d b 5
Can ...
0
votes
1answer
25 views
Angularjs to return $http response to caller Object
How can I pass the response value to the parent object. The invoker who make the http service call in angularjs? What I have is a BaseModel where it will do the get like following. The idea is ...
1
vote
2answers
22 views
Data not updating at the expected time in Angular
I have an AngularJS application that lists out data from a server in a view that looks like this:
<table class="table table-striped">
<tr ng-repeat="query in saved_queries">
<td ...
0
votes
2answers
18 views
Angular inside of Angular - solving: WARNING: Tried to load angular more than once
I have a small angular app that just has one directive.
It will be used on many other websites, simply by them including one JS file and then using the directive anywhere on their page.
The problem ...
0
votes
1answer
37 views
AngularJS: filter array
I created an element directive for a table with data. The table uses ng-repeats to render all of the rows/columns.
I created an attribute directive for the element directive. It's purpose is to get ...
0
votes
1answer
26 views
I can't get datas from json file with angula.js
I have theses codes:
index.html:
<!DOCTYPE html>
<html lang="en" ng-app="pizzasApp">
<head>
<meta name="viewport" content="width=device-width, ...
1
vote
1answer
18 views
How to handle server side errors in angularjs
How do I handle server side errors with angularjs. I saw a few solutions, like How to properly handle server side errors?, but they don't really fit my needs/maybe I need to change my failing ...
0
votes
1answer
41 views
Add new AngularJS variables with JavaScript
I'm trying to make a dynamic form with AngularJS and JavaScript. The objective is to add how many inputs the user need and transform all those inputs in AngularJS variables that print it on body. So I ...
0
votes
3answers
31 views
How do I set select default option in angular?
So I have json data that is retrieved from the server that looks like this:
$scope.StateList = {"States": [
{
"Id": 1,
"Code": "AL",
"Name": "Alabama"
},
{
...
2
votes
2answers
41 views
How to set the initial value of ng-model to an empty string in angularjs?
I want to be able to set my initial value for an attribute of my model as such
<input type="text" ng-model="selectedModel.title" name="title" value="" >
As shown above, I want the value of ...
0
votes
2answers
23 views
Dynamically add ng-click in dropdown directive
I'm trying to dynamically add a ng-click to a bunch of li's that get dynamically created inside of a directive. The idea is to hide the select element and overlay it with a custom div with a ul and ...
0
votes
0answers
34 views
AngularJS encodes angle brackets
The situation:
I have a small angularjs app that will let me save an "article" and then display it. An article will contain plain text as well as examples of html, js, css, or php code. I can save it ...
0
votes
1answer
20 views
AngularJS ng-repeat filter on unformatted date expression
I have some JSON I pull into my Angular application. I use ng-repeat to output the JSON to the page, but I would now like to filter on a date field. I can filter on the necessary field using the ...