Tagged Questions
AngularJS (a.k.a. AngularJS 1) 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 applications are also frequently known as ...
0
votes
0answers
4 views
SyntaxError: Unexpected token R in JSON at position 0 at JSON.parse (<anonymous>)
I am trying to delete a record in the database and then remove the row in the HTML page using angular.js. But even though the record is getting deleted I am unable to splice the row the HTML page. I ...
0
votes
0answers
7 views
How to get current route custom data in angular 2?
I have set up routes is like below
const appRoutes: Routes = [
{
path: 'login',
component: LoginComponent,
data: {
title: 'Login TTX'
}
},
{
path: 'list',
...
1
vote
0answers
7 views
Display error when iframe refuse to display
I've got this message when try to put the url in iframe:
Refused to display '' in a frame because an ancestor violates the
following Content Security Policy directive: "frame-ancestors 'self'".
...
0
votes
0answers
4 views
$cookies cannot see existing `JSESSIONID` cookie [duplicate]
I have an angular (1.5.5) app that authenticates via a GET request with an Authorization header. From this request, my browser registers a JSESSIONID cookie for the current domain:
I would like to ...
-1
votes
1answer
18 views
How to capture user inputs and write it into client side Text file
Whenever submit button is clicked, I want to write all html inputs fields data and want to save that data into a text file.
onSubmit I was able to download the text file with input data but I want ...
0
votes
0answers
10 views
Updating mongodb in a mean stack
I want to update my mongodb I know what to write on the server side but i dont know how to use it on the client side in angular. can you help ?
here is my server side code
module.exports.updateUser =...
0
votes
0answers
4 views
Angular Route for folder gives error
I have written 2 ng-app in one project, one is user and the other admin.
To remove the # from the url I had used the below code in both app.config function
$locationProvider.html5Mode(true);
and in ...
0
votes
0answers
16 views
getting values from sessionStorage
I am trying to get the value from sessionStorage and map it to my ng-model, but
when i do that in my ng-init its not working.
The problem is in my actual code i am inside a ng-repeat so my ...
0
votes
1answer
11 views
Laravel 5.3 with angularJs 2 Setup
I am trying to setup laravel 5.3 and AngularJs 2,
I have seen all the available resources on google which is mostly for the angularJs 1 and laravel 5.1 and 5.2. I followed the them but there is ...
1
vote
0answers
7 views
UI-Router redirects when url parameters are present
I was building a site with Angular and UI-Router, came across this situation and I can't seem to understand why this is happening.
I have an abstract parent called main and two nested states. The ...
0
votes
2answers
26 views
How to get value from dropdown list with angularjs
I populate a select box with data from backend and it works well, but when I click on an item to get it value, it gives me undefined:
<div class="col-md-5">
<label class="child-label" for="...
0
votes
0answers
13 views
How do I make use of ng-repeat when using database objects in order to get my search box working?
I'm currently trying to implement a search box in order to filter dossiers, like so:
<div class="pull-right">
<form id="search" name="search">
<div class="form-group">
...
0
votes
0answers
15 views
Setting form input value from a promis data
So let's say i am posting this form to some web service.
<form name="myForm" id="myForm" method="post" action="https://servicelink.....etc" accept-charset="utf-8">
<input type="...
0
votes
0answers
3 views
Karma Unit Test cannot serialize cyclic structure
I am using Karma to write unit tests for my angular code. I have the following test which fails:
it('handles a successful log in', function() {
$scope.login(user);
deferred.resolve({data: {...
0
votes
0answers
7 views
HIghcharts - chart width gets out of container
I am trying to figure out why I have that chart wider than the container. I noticed that if I remove the width completely for the first screenshot and then set width: 100% in the next. However, I am ...
0
votes
1answer
13 views
Angular way to set onerror on iframe
Is there angular way to setup onerror attribute on iframe so I can use angular expressions. I've tried to use this:
<iframe onerror="{{vm.error()}}" ng-src="{{vm.url}}"/>
but got error:
...
0
votes
1answer
9 views
Angularjs exclusive radio buttons in table row
I am using angularjs v1.
I would like to have exclusive radio buttons in each table row. Each row will look something like below;
The radio buttons should be exclusive. In other words, only 1 of the ...
0
votes
0answers
31 views
Ask for controllers in Angular
My web application uses angularJS and I have a problem because I load almost all pages in a template request. I will show you the code:
<body>
<div resp layout="column" layout-fill ...
0
votes
1answer
18 views
Angular send User IP in a post request
How can i get the user IP and send it in a post request?
.controller('LinkCtrl', function($scope, $http){
$http.get("http://ipinfo.io").then(function(response){
$scope.userIp = response....
-2
votes
0answers
12 views
Print issue with page-break-after
In my application have Print option for print invoice, in which payment stub/payment information is always moved to next page, even if we have some blank space available on the first page. I use page-...
0
votes
0answers
15 views
HTML5 auto focus not working in firefox
I am working with and angular JS and HTML5 application. I have a login form with username and password field. when the login page loads i want the focus to be on the username by default.i have used ...
0
votes
0answers
7 views
Paypal In-Context Parent page not redirecting
I have the same problem as this question but his implementation is different.
Paypal Button Implementation
The reason I implemented it like this because we need to have the paypal button as a link. ...
0
votes
1answer
35 views
AngularJS: retrieve array from object after $http get
Sorry I am new to Angular. And this is probably dump question.
I have following data structure in a json:
[
{"id": "1", "name": "Alan", "location": "US"},
{"id": "2", "name": "Bella", "...
0
votes
1answer
7 views
my directive not able to access controller method in angular js
I really don't know why this should not work... please help spot the reasons.
var app = angular.module("schoolBook", []);
// Data for friends
app.factory("friendsData", function(){
return [
{id:'1'...
-4
votes
0answers
18 views
How to make controller to work in a custom directive?
i am working with angularjs.The problem is that i wrote a controller in directive after a compile function and the output through the compile function is shown as that in the pic. i.e "first in the ...
1
vote
1answer
18 views
UI-router: deal with nested controllers
I have following config:
.state("addUser", {
url: "/addUser",
templateUrl: "users/add-user.html",
controller: "AddUserParent",
controllerAs: "$ctrl",
abstract: ...
1
vote
2answers
32 views
AngularJS Bootstrap - Error in Console
I'm trying to set up $uibModal from AngularJS Bootstrap, however I get an error in console. More on that below.
app.js:
var app = angular.module('carApp', ['ui-bootstrap']);
ctrl.js
app.controller(...
0
votes
0answers
6 views
$http POST for Ionic Push causes Authorization Error
With the help of Ionic Push, I am now able to send push messages via the Ionic dashboard to my device. However, I would like to create these push messages manually so I can for example, inform people ...
0
votes
1answer
9 views
How to get data from http://domain1.com localstorage to http://domain2.com express.js
how to get that data "52" from localhost:3000/ to localhost:8080 which is express.js. anyone? please help thank you
see screenshot
0
votes
2answers
26 views
$scope.getlanguage is not a function
Hello sorry for a nob question But i am trying to learn angularjs here i implemented a function and trying to calling it on a page load
here is my function
$scope.getlanguage = function () {
...
0
votes
2answers
18 views
D3 - Getting text on the top of rectangles in Vertical Bar chart
I am making a vertical bar chart with D3 successfully. I further want the value of frequency to lie on the top of each rectangle. I am able to get the complete structure and rectangles. But, I cannot ...
-2
votes
0answers
9 views
how to import the xl file and stored it in database in angulrjs project
how to import the xl file and stored it in database in angular JS project.
I have already taken one button and browse button to select the XL file but i dont know how to read xl and stored it in ...
1
vote
2answers
31 views
how to add ng-model to dynamically created input text fields
This is my angularjs code to create input text fields dynamically.
<form action="demo_form.asp" method="get">
//statically added textfields
value1:<input type="text" placeholder="...
0
votes
0answers
46 views
How to create a div that display's an uploaded image
I need to create a div which will do functions of uploading image file and displaying the same file as a preview.
In mouseover to that div should display opacity=0.5 with camera icon and upload ...
0
votes
0answers
8 views
How to send a DOM object from main to renderer in electron (and angular)
With electron, I am creating a window and I need that window to display some information that is in a DOM object. I have to do that within the renderer window, and I can trigger that function in the ...
0
votes
0answers
11 views
autocomplete md-angular : json from promise
I am starting from the custom template in material-angular documentation
It works fine but in my case,I have to use a resource to get the list of datas.
If I replace
$scope.repos = loadAll();
...
0
votes
0answers
22 views
Angular ng-option dynamic with ng-repeat
Here I have Items Like this
"items": [
{
"$id": "2",
"Id": 1,
"Name": "Weight",
"Order": 1,
"IsCalculated": 0,
"...
1
vote
0answers
28 views
Loaded scripts dont work on template loaded by angular directive
Im using the materialize framework to handle my front end ui.
I have a directive which loads a table of data:
app.blade.php
...
<div class="container">
<div class="row">
<...
-1
votes
0answers
7 views
Multiple select field within angular form auto jumping only in ios
selecting first select will auto jumping to second select without selecting first select option .i encountered this problem in ios only.. it works fine in android.. second select will depend on first ...
1
vote
0answers
12 views
Deploy Angular2 Application with angular-cli
I'm new in Angular2. I've read a few things about deployment of ng2 apps.
1) I have installed latest beta version of angular-cli.
2) Then I've created a new project with angular-cli.
3) Then I'...
0
votes
1answer
19 views
Is there any way to set the custom header when making a API call?
I want to add custom header at the time of API call. I am actually calling a function from controller and inside that function the $resource object is going to be set as follows:
// Generate the $...
0
votes
0answers
20 views
Jquery plugin insertion in Angular
I wanted to insert responsive nav jquery plugin into the directive. This plugin provides keyboard accessible navigation. I have tried the below example of jquery plugin initiation but prompts an error ...
-4
votes
3answers
53 views
How to correctly use radio button to get selected value
I need to get the price(value) of selected radio button and use it on JS then return it and display it on HTML
Javascript :
$scope.bases = [{
name:'Tomato',
price:3
},{
...
-1
votes
0answers
11 views
Am getting second http response before than first http response in angular
I have sent twice request via $http service(AJAX) with different data, But I got the second service response before than first service response.
2
votes
2answers
20 views
Iterate over subscriber
I'm having a bit of a problem understanding the observer / subscriber model and looping through that return.
So I've got a cocktail component that grabs an array of cocktail objects.
The core of ...
0
votes
0answers
6 views
I want to add AngularJS to my CMS made with ZEND 1 MVC framework
Where do I start? I got a bunch of views in phtml and i want to display them using AngularJs not ZEND defult MVC.
0
votes
4answers
26 views
How do I show different options on dropdown?
I have got a dropdown button and I want to show different options depending on, if the difference if the number before is negative or positive.
<td id="diff" ng-model="diff">
{{val1 - val2}}
...
1
vote
0answers
34 views
Add or Remove selected elements from multi select box using angular js
I want to display one dynamic table, But table columts i wane to select at run time. For that purpose I have taken two multi select box, in first Multi select am loading all column names using Json.
...
1
vote
3answers
20 views
Trigger bootstrap modal by AngularJs and then get data by $http.post
I have a list of customers each customer have button more info.
I want , when i click on it then showing bootstrap modal by AngularJs controller and then request data by $http.post and getting some ...
0
votes
0answers
10 views
Use scriptmanager in mvc-5 view
I am creating a web app in mvc-5, the same app is created by me in asp.net now i want to do the same in mvc-5
i used rdlc reports in asp.net with scriptmanager
<asp:ToolkitScriptManager ID="...