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
3 views
Ionic Firebase create user pass variable on complete
How to I pass the $scope variable to the oncomplete of createUser method? I want to insert data from my input field when oncomplete is triggered. Unfortunately, when I use $scope inside onComplete, ...
0
votes
1answer
9 views
AngularJS HTML5-mode with Tomcat8 and Apache2
I deployed my WAR-file containing a running Java Spring/AngularJS application to a Tomcat8 which is running behind an Apache2 with the following config:
<VirtualHost *:80>
ServerName ...
1
vote
1answer
17 views
Angular Route - Call function on load
I am using $routeProvider to route all of my apps pages to the correlating controllers, but when two routes use the same controllers (i.e. /blog & /blog:id) how can I initialize a separate ...
0
votes
1answer
14 views
Cannot save data in SQL using AngularJS and PHP
i have this code that saves a data to sql using angularJS and PHP. Somehow, i cannot save the data to my database. The angularJS code seems right and it says that its successfully saved but when i ...
0
votes
0answers
23 views
AngularJs css live changes
I have a features built on angularjs, it's a dropdown option where user can do changes of the status and changes will be reflected on status. Here is my html snippet:
The status
<td ...
0
votes
0answers
17 views
how does one re-use the same directive for multiple forms web app?
What changes need to be made to get the code below to successfully call the same validation directive from multiple different forms using AngularJS? Note that the first form is able to validate ...
0
votes
0answers
7 views
AngularJS, Rails and ui-router not showing template after switch from ngRoute
Hi I am trying to switch over from ngRoute to ui-Router but after I made the switch, the templates are not loading anymore.
I added ui-Router in my application.html.erb:
<%= ...
0
votes
1answer
22 views
Angular JS: Increment a Counter in a Service From Controller
I'm trying to fetch a value from an API inside my service for a counter, and then increment on that counter inside my controller:
service
angular.module('app')
.factory('MyService', MyService)
...
0
votes
0answers
7 views
How to read Google Analytics browser traffic + AngularJS-WP-WPAPI
I am trying to determine from the attached Google Analytics stats which spans over the last year, whether my company's website is getting alot of use on browsers like IE8.
I am unsure how to ...
0
votes
0answers
15 views
How to use $urlRouterProvider.rule
OK, this could be a ui-router bug, or could just be my fault. I posted a question on Git https://github.com/angular-ui/ui-router/issues/2342, no response yet , much appriciate if anyone could help ...
0
votes
0answers
9 views
How to get help on a whole Ionic/Cordova project?
I'm developping an application with Ionic Framework and Cordova and I've been facing a problem with the cordovaSocialSharing plugin since hours.
Here's the relevant part of the code :
...
0
votes
2answers
24 views
Creating a Weather App using AngularJS and OpenWeather
My task is to display the weather forecast from the API.
I have the following code, but I cannot get the data to show. I just started learning AngularJS and using APIs today, so any sort of help ...
0
votes
0answers
9 views
Angular Material Dialog popup not showing
So when I click the button, my whole browser window goes black and there isn't any popup showing up. When I inspect element. I can see the outline of the pop up when my mouse hover overs it but the ...
-1
votes
0answers
21 views
AngularJS ui-router not working and doesn't throw any error
I have my little angular script and I don't get any error at all in my console.
I try to display data at /posts/index.json with AngularJS ng-repeat function
app.config([
'$stateProvider',
...
0
votes
0answers
23 views
Passing specific json data on button click
I have a list of buttons acting as a beer draft list displaying some information loaded from a json file. When a user clicks on a button I want to go to a page that will display more details about the ...
0
votes
1answer
15 views
How to select a tab in a $watch function when changing array?
I tried to use the tabs in Angular Material to facilitate the navigation between dates (just slide tabs to change date) and I have also a date picker to jump quickly to another date.
The loading work ...
0
votes
2answers
15 views
Typescript strongly typing child object
I want to convert angular plain vanilla JS code to Typescript. Consider this code fragment :
app.someController = function ($scope) {
// var $scope.Data = null;
var $scope.Data: SomeCollection = ...
0
votes
1answer
11 views
Angular JS: Service Response not Saving to Variable
I'm trying to work out why the response of this service isn't saving to $scope.counter. I've added a function to my service fetchCustomers(p) which takes some parameters and returns a number, which ...
0
votes
0answers
9 views
Adding more positions to angular bootstrap-ui
Is it possible to add a position like bottomRight to angular ui-bootstrap?
if I do
.popover {
&.bottom > .arrow{
left: 80%;
}
}
The arrow will move. I just need to move the ...
-1
votes
0answers
11 views
select options getting repeated when adding attributes using directive in angularjs
I am creating a directive to add some attributes to all d controls as follows,
AttachAttributes = function ($compile) {
return
{
restrict: 'A',
link: function (scope, elem, attrs, ...
0
votes
0answers
10 views
CORS with AngularJS
I am currently trying to use two localhosts to deliver content to one another via an API.
My angularJS application is running off port 8000 and my rails API is running off port 3000. I am using the ...
0
votes
1answer
25 views
custom directive is not validating form. why not?
What code changes need to be made to get the custom countparens directive below to provide the extra custom string validation shown below during form validation? The code below DOES successfully ...
1
vote
1answer
12 views
testing angular controller (method / service calls) using Jasmine
I am trying to test a small controller written in AngularJS using Jasmin.
(function() {
'use strict';
angular
.module('bsp.account')
.controller('Account', Account);
/* @ngInject */
function ...
1
vote
0answers
18 views
Validation of 'input type file' and 'dropdown options' inside form (using angularjs)
I am still a newbie and learning angularjs which is fun and exciting. I have worked on the following plunker link. http://plnkr.co/edit/WiXEVIN6K63O50FhdzO2?p=preview
The above link is showing the ...
0
votes
1answer
15 views
AngularJS using $resource to get json data from API, getting undefined
Im getting undefined, undefined from ipCity and ipCountry
but i cant understand why.
weatherApp.service('cityService', function ($resource) {
var ipLocation = $resource("http://ipinfo.io", ...
0
votes
0answers
37 views
AngularJS view not getting updated with model changes
Controller (snippet, as its very large):
function loadImages() {
if (Authentication.loggedIn()) {
Images.get(function(s) {
$scope.images = s.images;
...
1
vote
1answer
25 views
Angular - return $modal promise and reject it
I'm trying to write a function which opens an angular-ui modal window and returns a promise once it's closed. This is normally easy, you ust return the modal instance, but in this scenario even if the ...
0
votes
0answers
4 views
kendo dropdownlist shows optionlabel in dropdown
I am using kendodropdown. I used optionLabel = "Actions" and it is displayed as an option in the dropdown how do I ignore it as a value in dropdown.
Is there a way where we can stop or hide ...
0
votes
1answer
12 views
AngularJS Add class to <td> which is generate dynamic by ngRepeat from database
I have problem with my table, because I have no idea how do it...
I have table in html which is generate dynamic by Angular with data from database and now I needed add some styles to td element. ...
0
votes
0answers
25 views
How to have access to other http.get data in another http.get request? Angular
New to Angular. I have 2 data bases, one with meals one with the meals with entries. I am attempting to access the entries and have them show up with it's meal.
The /meals gives a list of meals. ...
0
votes
1answer
9 views
When I use ng-bind-html, it will not be able to bind $ scope to this content
My code as follows:
<div class="arInfo"><p class='article' ng-bind-html="bodyText"></p></div>
js:
$scope.bodyText = <p>In its decisions, <a href="#" ng-click= ...
1
vote
2answers
31 views
Create animation with css gradient and javascript
I am working on an cordova application that allows us to scan rfid tags. Based of the RSSI signal strength I need to display a bar that shows how close or far the rfid tag is. The closer I get to the ...
0
votes
0answers
16 views
simple escape parentheses to count them [duplicate]
I am trying to make separate counts of open and closed parentheses in a JavaScript string. How can I write the regex to accomplish this?
Here is what I have so far, which is throwing errors:
...
-4
votes
0answers
19 views
How to dynamically load a script from a library (e.g. AngularJS) [duplicate]
I'm working on a website that will use AngularJS. While I want to use the angular.min.js file from a CDN as my first choice, I'd like for there to be a backup angular.min.js file just in case ...
0
votes
0answers
7 views
Unit test compare value return from text() with toEqual()?
How to compare part of returns value from text() function which present in the unit test.
For example I have angular application there is element .
I want to test it thus that element is present and ...
0
votes
1answer
11 views
one controller is loading views from other controllers, how and why?
I have the following div in my index.html, whose controller is MainCtrl. This is the div used to load views from different controllers.
<div ng-controller="MainCtrl">
<div ...
0
votes
0answers
26 views
What is the point of $sce?
If you structure your front-end in such a way that Angular recompiling code on the front end is dangerous, which is what $sce tries to prevent to my understanding, can't an attacker just bypass all ...
0
votes
0answers
19 views
Want to set pre-selected rows in UI Grid, but rows are empty?
I'm trying to set pre-selected rows in a UI Grid. I have the information for the rows I want to pre-select, and there is data in the UI Grid. One problem I can potentially see is that the UI Grid is ...
0
votes
1answer
17 views
Typescript: cannot find name 'require'
I am trying to utilize type definition file https://www.npmjs.com/package/diff-match-patch as described in the link (Angularjs).
var DiffMatchPatch = require('diff-match-patch'); <- Error here
...
1
vote
5answers
32 views
Angular JS: Using $scope.variable Across Controllers
So, I've got a counter ($scope.counter) that I increment on ng-click. The problem I'm having is that I want to increment it from two different controllers, keeping the counter value in sync.
...
0
votes
1answer
20 views
Angular 2.0. Difference @View @Component
Hi. I'm new to Angular. I'm testing Angular 2.0.
I read the tuto here and the guide here. In the tuto, the template is specified in the @Component annotation whereas in the guide it is in the @View ...
1
vote
2answers
16 views
Element loading issues in Protractor
I'm pretty muddled down by Protractor at the moment.
It seems that sometimes my elements load in time for the next action to occur on them, and sometimes they do not. I'm guessing it has to do with ...
0
votes
1answer
39 views
How to fix json parsing problems in Angular js
I'm trying to send a contactItem (string element) from my index.html to my js application using angular.js via http.post.
Every time I try to post the contactItem I get the following error:
...
2
votes
1answer
30 views
Parse deep JSON object in angularjs
I am using google maps API, and getting the response from google. Just need to get distance "text" value, e.g. 57.6 mi and duration "text" value where it is "1 hour and 1 min" from JSON that gets ...
1
vote
2answers
15 views
Toggle filtered results in angularjs
How can I filter on first click and then reset filter on second click ? I want to show items having images first and then reset filter on second click.
Please check [fiddle][1]
[1]: ...
-3
votes
0answers
30 views
ES6 syntax and Promise based asynchronous pattern
I am trying to solve the below issue
Is it possble to identify the package name in package.json file when that module is not present. I mean can we do a vice versa function in depcheck-es6
...
0
votes
0answers
20 views
large promise and user actions, not allowing click events
I am very new to promises. I have an angular app that, at one point, has a very large promise a lots of .then statements.
The view where the promise lives has and close button, taking the user ...
1
vote
1answer
14 views
How to add a new Highchart dynamically using Highchartsng
So what I'm trying to do is when a user clicks a button I want to add a new highchart element to the page. Currently I see that my container for the chart shows up but the chart does not.
Here is ...
0
votes
0answers
21 views
Use anchor link inside angulajs website
I'm using http://localhost/gest.html#!/?COM_ID=6209 link to pass param to angulajs website.
My problem is the use of link anchor inside that page.
Infact if i link to href="#link" to id="link" the ...
0
votes
0answers
15 views
AngularJS: Using ngModel to Bind Checkbox to Array Element in MongoDB
I am still fairly new to NodeJS, MongoDB and AngularJS.
I have a collection called 'Strategy' where each document defines a trading Strategy involving multiple bitcoin exchanges.
I've got the ...