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.
1
vote
0answers
3 views
Saving persistent data to a service with TypeScript
How do you all save data to a service using TypeScript?
If I have a service like this:
class MyService {
persistentData: Object;
constructor() {
this.init();
}
private init ...
0
votes
0answers
18 views
Why does browser freeze in AngularJS controller method?
I have the FireFox developer tools open, and the debugger has break points at every line in a function that handles form input. The debugger indicates that execution of the method simply breaks at ...
-1
votes
0answers
10 views
Refresh Div & 1 Link 2 IFrames Issue
Pastebin URL with my code: http://pastebin.com/u5KS6rZW
Greetings! I am working with the above and I am having a couple issues that i am stumped on. These were a couple things that were working ...
0
votes
1answer
8 views
$valid inside ng-repeat in AngularJS
I know how to show errors in angular js in case the all form input are invalid. I also know how to show message if one field is invalid.
The Question is how to show a message inside ng-repeat of ...
0
votes
0answers
6 views
How to mock a XMLHttpRequest with a callback request in Karma/jasmine?
I have the follow factory with a XMLHttpRequest in this request exists a callback, this callback is on dependency of the XMLHttpRequest , I want to know if exist how to mock this factory.
...
0
votes
0answers
9 views
change data to JSON format and save in local file in AngularJS
I want to change below response to JSON format using Angularjs and add it in "data.json" file
The response is:
...
1
vote
0answers
14 views
Three state checkbox with angular directive
I'm new to angularjs and I'm having a very difficult time attempting to create a directive to implement a three-state checkbox. I'd like to create a two-way binding between the isolated scope variable ...
0
votes
1answer
13 views
How can I find the source of a particular portion of markup in an Angular app?
I'm learning Angular on the fly while working on the front-end of a web app. I'm having to make some changes to the markup and because the final output comprises of many templates it is often ...
0
votes
0answers
11 views
How can I format datestrings with a single digit month and/or day into a Date object for iOS?
Dates are stored in my database table as datestrings, and in order to display dates correctly on iOS I replace the space with a T when I retrieve them.
myApp.filter("ios-date", function($filter) {
...
0
votes
0answers
12 views
$http.post - faild to load resource
when i try to post data to my sql db from angular js I allways get the error:
Faild to load resource: net::ERR_INSECURE_RESPONSE
INSERT ERROR
Thank you for helping :)
function
$scope.add = ...
0
votes
0answers
8 views
ui-router: Reset $state without using $state.go()
First off, I think the overall issue here is that AngularJS still doesn't have a sensible, best practice way of "restarting" the app and all its components. So far, the best practice seems to be ...
1
vote
0answers
11 views
Avoiding flicker in popover directive
This simple directive function:
function popoverHelp () {
return {
restrict: 'E',
scope: {
title: '@',
text: '@'
},
templateUrl: ...
0
votes
1answer
11 views
Issues with ui bootstrap modal CSS and printing
I am creating a webpage using angularjs and ui bootstrap to create modals. Then I have javascript to print just the modal. However, I am having an issue with my CSS. Firstly, for some reason (most ...
0
votes
0answers
23 views
angularJS preventing click event in ng-file-upload
I've read questions such as
How to trigger ng-click [AngularJS] programmatically
how can i trigger the click event of another element in ng-click using angularjs?
I've also read some other ...
0
votes
1answer
9 views
Why I need a $scope.$digest in Promise
All:
I am pretty new to angular digest, right now, when I use Promise, in its then function, I have to use $scope.$digest() to make scope variable change takes effect on other place, like:
Here I ...
-1
votes
0answers
21 views
Angular filter ng-repeat subarray by checkboxes
I have a list of objects (users) with subarrays
[{
name:'username',
offer: [1,5,123,12]
},
{
name:'username2',
offer: [1,3,13,212]
}]
and i have a list of checkboxes (500 elements, grouped ...
0
votes
0answers
7 views
AngularJS one file at a time upload
I am working on a AngularJS file upload controller. In this case the user should be able to upload a JPG containing all EXIF information in the file.
However, these are big (5mb+) jpg's send to a ...
0
votes
0answers
8 views
angularJS print directive losing 2 way binding
I have a print directive in a SPA that seems to lose its 2 way data binding after the first print function is ran. I am sure it has something to do with the cloning and appending of the element.
The ...
-3
votes
1answer
9 views
What things should be dynamic in Angular? ADVICE?
Quick summary on my project:
A small social network, with the ability to post updates, photos, videos.. Follow and message people..
I'm pretty experienced with full stack technologies and many front ...
0
votes
0answers
15 views
jsonlint is not defined - codemirror
I have ui-codemirror implemented in angular application. After turning on lint I have an error in console:
ReferenceError: jsonlint is not defined
at ...
0
votes
0answers
8 views
unable to load backend data to the table of ag-grid (Checkbox doesnt update)
I have the backend data in an object as follows.
Object
[0]:
name: 'Alex'
sex: 'Male'
new_joinee: 0
[1]:
name: 'Anna'
sex: 'female'
new_joinee: 1
[2]:
name: 'lester'
...
0
votes
1answer
10 views
Angular directive controller unit test using window.confirm
I am trying to get 100% test coverage for a directive. The directive has a controller with a function that uses the window.confirm method.
'use strict';
(function() {
angular
...
0
votes
1answer
38 views
Angularjs ng-repeat directive issue
index.html
{% extends "base.html" %}
{% block header %}
{% endblock %}
{% block body %}
<div ng-controller="SCTestList">
[[messages]]
<tr ng-repeat="item in ...
0
votes
1answer
11 views
How to build a http request handler to cancel multiple same requests in Angular [duplicate]
All:
There is a common operation in my Angular project is:
Click a button, init AJAX call, download data. But there is one thing related to user action which is multiple clicks in very short time( ...
1
vote
0answers
18 views
Creating a two column dropdown in angular-ui-bootstrap
I have about 13 items in my list, so I'd like to make my dropdown menu in ui-bootstrap have at least two columns. Right now, here is my html for the button:
<div class="btn-group" uib-dropdown ...
-2
votes
0answers
22 views
How to write CRUD operation using AgularJS, consuming RestAPI and modal dialog
I am writing a single page application using AngularJS, where I have to register a user.
When I click on button it, populates a modal dialog and when the user has filled the remaining detail and ...
0
votes
1answer
13 views
Getting external Token into my Angular application
My http server framework is serving a static (Angular) SPA.
To authenticate users, they will need to enter their email adress and submit it. They receive a link per email in the form of ...
0
votes
1answer
11 views
accessing ng-if expression from sibling scope
The ng-if attached to the footer element has expression "clicked" which when the app first starts I expect that it gets evaluated to false by angular.
When the button "class=menuLeft" is tapped, ...
0
votes
0answers
22 views
Why won't ui.bootstrap load?
I have my scripts listed like so;
<script src="//code.jquery.com/jquery-latest.min.js"></script>
<script src="//code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
...
1
vote
1answer
14 views
Directive scope attribute injection behaviour
What I want to do is pass in a JavaScript key code (in my snippet I'm using 13 which is the enter/return key) but the second directive in my example below does not work as expected.
For some reason ...
1
vote
1answer
9 views
Object reference not set to an instance of an object in AngularJS on Internet Explorer
Symptoms:
When loading AngularJS in Visual Studio 2015 through an intranet url, an error is thrown in the AngularJS library at this point:
line 7: if(H(b)||Ta(b))
(for angularjs.min.js)
...
0
votes
2answers
28 views
Angular Resolve: Variable is not defined
I am working with Angular Routes for the first time and I recently posed a question regarding a refresh losing some data, the answer I received was to use resolve. It seems to be the solution I was ...
0
votes
1answer
8 views
Ionic not working in IBM Mobilefirst Platform
I created simple project in IBM Mobilefirst. I have very simple Ionic layout:
<body style="display: none;">
<ion-pane>
<ion-header-bar class="bar-stable">
...
0
votes
1answer
12 views
AngularJS + Node: Blank page when deployed to Heroku
Let me start by stating I have never built my own app and deployed it to Heroku. Now that I am trying, I have debugged my way through some issues, but now it seems as though my app is loading without ...
1
vote
1answer
17 views
How to send string over Angular $http to C# ASP.NET backend?
I want to send a string via Angular $http to my ASP.NET C# backend. I am using web-forms. However, i get the following error:
POST http://localhost:49730/Default.aspx/get_requested_table 404 (Not ...
0
votes
0answers
10 views
Angular Chosen not Updating from API Call
I am populating a select box with angular chosen:
<select ng-change="checkSelection()"
chosen=""
class="form-control chosen-select input-md"
data-placeholder="Select a ...
0
votes
1answer
14 views
$timeout not working correctly with ng-class
I was trying to do something like
$timeout(function() {
if (someCondition === true) {
_this.isVariantShowSaving = true;
}
}, 50);
in a controller (note:I used controllerAs syntax saved var ...
0
votes
0answers
7 views
How to use JSPM overrides in SystemJS config file?
My JSPM version: 0.17.0-beta.5.
My project is using ES6 style import statement using TypeScript.
So...
I installed angular-ui-router like so:
jspm install angular-ui-router
This saves the ...
0
votes
1answer
24 views
Angularjs: Does manual bootstrapping has bad performance issue?
I'll explain it shortly hope you could provide your explanation in regards to this question.
What i currently have is a traditional AngularJS app while a certain div in my body includes the ng-app ...
1
vote
2answers
33 views
function to sum value of an specific field from ng-repeat
I want to create a function to sum the value of an specific property coming from a web service in json.
This is my function:
$scope.exportData = data;
$scope.totalLW = ...
-1
votes
1answer
8 views
Angular UI bootstrap Datepicker in landscape view like Material datepicker
I'm using Angular UI bootstrap's datepicker , but I need to update the datepicker like Angular Material datepicker as below link:
[Codepen Link][1]
Reference for such date picker I got from ...
0
votes
2answers
8 views
XMLHttpRequest cannot load Response to preflight request doesn't pass access control check
In my Angular app below is the error I'm getting when I try to login while developing locally (Chrome):
XMLHttpRequest cannot load https://www.tickertags.com/app/api/login.
Response to preflight ...
1
vote
1answer
25 views
How to spy on a service function that calls another service which returns a promise - typescript
Parent Service:
module proj.Stuff {
export class ParentService {
//...properties, constructor, etc
public refreshStuff(id: number) {
this.childService
.getStuff(id)
...
0
votes
0answers
16 views
AngularJS Dynamic forms Select option ng-model doesn't get update in directive
I have used ng-form to build dynamic forms with angular 1.4.5 version. I'm trying to get selected value from select option on ng-change event but getting undefined value in directive. I'm setting all ...
0
votes
2answers
22 views
AngularJS: templateUrl is rendering before the controller is free
Below is the code which making some trouble
angular.module("cattle_feed_frontend", ['ngResource','ngRoute'])
.config(['$routeProvider', function($routeProvider){
$routeProvider.
...
0
votes
0answers
16 views
Angular translate on race condition
I'm using angular translate with a yeoman scaffold for my project. I've made a simple module to handle the loading of the translations and be accessible throughout my entire project.
If I run gulp ...
0
votes
2answers
23 views
$http.post not acting as expected in AngularJS
I've seen this topic discussed several times, but I'm still confused after reading every answer I've seen on this topic.
As many have before me, I'm trying to create this basic To Do app with CRUD ...
0
votes
1answer
21 views
pass razor variable to angular function
razor code
@{string razorVar= "test";}
HTML
<div ng-class="{active:vm.testSelected(@razorVar)}"> ...</div>
angular controller function
vm.testSelected = function(jsVar) {
...
0
votes
0answers
36 views
Why I cannot GET large json and use it in my node.js/angular app? (small json works)
I have a webservice written in node.js for getting users from my mongodb/mongoose database. When I have less than 100 records everything works smooth and when I type the localhost:3000/getUsers I see ...
0
votes
1answer
11 views
Does ngAnimate look at CSS classes to determine animation length, or does it detect the `animationend` event?
Pretty much what the title says.
When adding/removing content from the DOM, ngAnimate will leave the element in the DOM until the animation is complete. I can't tell if it is looking at any ...