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
7 views
ng-if an element has a certain class
I was wondering if it is possible to have an ng-if be true if an element has a certain class.
Example:
<div class="edge" ng-repeat="item in items">
<div ui-view ng-if="(ng-repeat div has ...
0
votes
0answers
2 views
Angualr JS construct JSON object for Delete
I am trying to construct JSON object to pass to REST API for delete . Iam facing issues while calling the REST . I feel that iam not properly constructiong my JSON object . This is my angular ...
0
votes
0answers
2 views
angular url is adding unwanted characters
I had a project where the url just worked fine when working locally by going to
localhost:9000/
the url would become
http://localhost:9000/#/
As of some change I made it now goes to
...
1
vote
0answers
5 views
Angular 1.5 Components & Form Inputs
I just started AngularJS and am seeing the modular benefits. Problem is that I I am struggling with forms and components. How do I log my form values? This is extremely basic but I continually get ...
0
votes
0answers
5 views
Possible to access $stateParams in config block
I'm trying to integrate with a third-party tracking service (i.e. google analytics), and I'm trying to access $stateParams within Angular's config block.
I'm getting the Unknown provider: $...
0
votes
0answers
21 views
AngularJs: How to show alert on form submit
I'm trying to figure out why my I don't get alert after I complete the recaptcha and click the submit button.
Here is my code:
AgularJS
app.controller('contactController', ['$window', '$scope', '$...
0
votes
1answer
10 views
How can I scroll to google map container div?
Assume I have button on top of page and I also have google map in bottom of page.
I want to scroll to the map by click on this button. Is it possible?
I wrapped the google map with div and I tried ...
1
vote
0answers
8 views
Express angular app not serving assets in ie9
I have an angular/express application. It works fine in all browsers but when testing IE9 I am getting 304/Aborted on all of my assets.
i am using app.use(express.static(__dirname + '/app'));
I am ...
0
votes
1answer
9 views
How to install a specific version of angular-animate with bower?
Im using angular 1.4.14, and I want to install angular-animate,
my json looks like this:
{
"name": "abc-front",
"version": "0.0.0",
"dependencies": {
"angular": "^1.4.0",
"bootstrap": "^...
2
votes
2answers
31 views
AngularJs: How to assign 'ng-style' directive value based on 'ng-repeat' count
I have an Angularjs sample snippet. here using ng-repeat directive to display names in a table, I am planning to add ng-style directive to add vertical scroll bar to a table based on table row count. ...
0
votes
1answer
7 views
Kendo UI tab strap with angular is not showing new tab
There is a tabstrip being used and in the browser I can see 3 tabs
2 are active and last is not
Upgrade Product | Membership Info | Agent Notes
I want to ADD another tab, but 1. I can't get the ...
0
votes
0answers
8 views
ionic-deeplink-plugin not working
I was following the tutorial at http://blog.ionic.io/deeplinking-in-ionic-apps/ on how to do Deeplinking in Ionic Apps. I installed the plugin for my app:
cordova plugin add ionic-plugin-deeplinks --...
0
votes
2answers
13 views
Angular 1.5.x - passing a variable to a built-in filter
I'm trying to filter data based on the select and input fields. Here is part of my code:
<select ng-change="students.changeValue(changeFilter)" ng-model="changeFilter">
<option ng-...
0
votes
2answers
36 views
AngularJS use variable in ng-* statements
I use AngularJS 1.5, and I want to use ng-repeat to build a form.
Now, I have in my code :
<div class="form-group" ng-class="{'has-error': Form.field1.$dirty && Form.field1.$invalid}">
...
0
votes
2answers
8 views
data binding - ui grid
I am trying to implement ui-grid into my app. Everything works fine when I assign static data to gridOptions.data; however, when I assign the data to gridOptions.data dynamically after loading the ...
0
votes
0answers
15 views
CORS and login with facebook (Angular 2 & Spring)
I'm trying to create "login with facebook" on my portal, and I have a problem with CORS.
So, how my portal works:
Frontend (Angular 2) on port 3000,
Backend (Spring) on port 8080
Facebook login (...
0
votes
1answer
15 views
angular js dependency module config works one time
I have a module composition like this:
angular.module('mainModule',["cityModule", "countryModule"]);
angular.module('mapModule',[]);
angular.module('cityModule',["mapModule"]);
angular.module('...
0
votes
0answers
8 views
Materializecss datepicker Date display issue
I am using Materializecss' datepicker function as part of a form. When the user clicks the input and inputs a chosen date, the input is correctly formatted as shown:
I created this format with ...
0
votes
1answer
17 views
Updating ng-repeat with $http without refreshing browser
I'm going to try to make this short and sweet I will preface this with the typical "I'm new to AngularJS"
I'm loading data into my AngularJS application through the $http service. I have an update ...
0
votes
0answers
10 views
Ngdescribe test angular directive's scope not working
I am attemping to test the scope of an Angular 1.6 directive using ngDescribe. Here is the test I have written:
ngDescribe({
name: 'My Directive.',
modules: 'example',
element: '<div directive-...
3
votes
0answers
28 views
Web Crawler problems in Python
I've been working on creating a single-threaded Web Crawler in Python that will group the assets of each page and output a JSON array of the form:
[
{
url: 'http://url.com/',
assets: [
...
1
vote
1answer
15 views
Protractor: How to test an element built with ngTagsInput?
I currently has a simple form that I am trying to test with Protractor. While it seems to work fine with basic input types, it does not seem to work with ngTagsInput the way I have it set up. I was ...
0
votes
2answers
49 views
AngularJS - Function Not Defined
With the below code, I'm trying to show a toast with AngularJS inside a Firebase function. The function is showToast() but I'm getting a function not defined error. Any help would be appreciated, ...
-1
votes
1answer
21 views
Wierd option value when using ng-repeat
I have the following ng-repeat:
<select ng-model="item_value">
<option value="" disabled>Choose an Step</option>
<option ng-repeat="step in steps | orderBy:'+step_number'"...
0
votes
0answers
25 views
AngularJS directive input fields are read only
So I am trying to write an AngularJS (version 1.4.8) directive which outputs the value of an attribute in an input box. The directive looks like this:
(function () {
angular.module("myApp")....
0
votes
0answers
11 views
Infdig in Angular when trying to calculate timestamp from date for $scope
I get a date value in my controller and I want to have the timestamp value in a $scope variable.
I do $scope.timestamp = new Date(workspace.date).getTime();
But I get error messages in console:
...
0
votes
0answers
14 views
I am populating a number of Selects in an Angular app, one of them is showing two elements in each dropdown item
Note the image, it's not duplicate elements in the list, but for each row in the dropdown, two of the same value. It's working fine, only returning one value, but it's annoying. There are 10 other ...
1
vote
1answer
25 views
Using ng-option with sorting and custom text
I have the following ng-repeat:
<select class="action-dropdown fade" ng-model="item_value">
<option value="" disabled>Choose an Step</option>
<option ng-repeat="step in ...
0
votes
2answers
12 views
angularJS multiple Master pages based on Role
The requirement of the application is to show different options based on the Role of the user. Like
If role is Admin , the after logging in , the user needs to be shown a master page which has link ...
0
votes
0answers
17 views
AngularJS, share data service triggered multiple times
I faced with problem of multiple triggering share data service in my app and now I will try to explain it.
On the home page with controller 'home' user can select one of three menu items, after user ...
0
votes
1answer
22 views
Display pdf files with ng-repeat
I am trying to display PDF files with ng-repeat and I am getting the following error:
HTTP Error 404.0
If I display a single pdf everything works fine. {{pdfFile.url}} is printing -
~/Content/...
0
votes
2answers
27 views
when to use $q.defer() in Angularjs
I am new to Angularjs and I m following this tutorial :http://mherman.org/blog/2015/07/02/handling-user-authentication-with-the-mean-stack/#.WE70iubhCM8 . However i dont understand when to use $q....
0
votes
2answers
35 views
How to determine what triggered a blur
I have a button on an AngularJS page that has numerous directives, and when tabbing to the button after a second or so it blurs. I can stop the blur event itself by adding an ng-blur and issuing a ...
0
votes
1answer
13 views
Angular2 - Symfony3 app how to send session between client and server?
I'm building a web app using Angular2 for the client side and Symfony3 for the server like as a kind of REST API.
But I don't find how I could share the user's session ID between Angular and Symfony.
...
0
votes
0answers
8 views
Lib clipboard doesnot work inside of Promise
I'm working with Angular 1 and clipboard.js in order to copy some data after a rest call.
My code looks like this:
clipboard.copy("Some random text"); //works!
service.getEmails(payload).then(...
1
vote
3answers
19 views
mongoose saves an empty object
I have a promblem with saving data to db, mongoose saves empty object without value. Using mean stack.
controller:
for example i send some "hello message"
$http({
method: 'POST',
...
0
votes
3answers
33 views
Constant prefix for url
I am trying to add a constant prefix for an url, so I did:
import angular from 'angular';
import Home from './home/home';
import Login from './login/login';
let componentModule = angular.module('app....
0
votes
2answers
26 views
AngularJS: display an OS “file save” dialog but not actually save
All I need to do, on an ng-click open a file "save" dialog from the browser, cross-platform. I am not trying to actually save anything; this is a demo/prototype only and I want to show the flow to ...
0
votes
0answers
10 views
Scrollspy and active class when using angular custom-directive
following my previous question here Bootstrap scrollspy along with angular custom-directive, after applying the link function to my custom directive, everything is working fine, except the active ...
0
votes
1answer
12 views
math function from 2 or more $scope like sum, multiple, ect on from firebase
I have this database on firebase
and I wonder how do I suppose to get the summary from two $scope
sample case:
I tried to get the sum from answer 1 and answer 3 with this Controller
$scope.answer=$...
0
votes
1answer
65 views
Slice array not working
I get a list in json and put it in an array.
{"event_date": "2016-12-07 01:39:41","created_at": "15/11/2016 às 06:10"}
In this list I have a "_date" attribute: "2016-12-07 01:39:41".
I'm trying to ...
0
votes
2answers
16 views
showing content in the same time in AngularJS
Despite the fact I am total beginner in Angular I don't have a clue how to solve this issue the best.
Imagine I have two users, who owe money to each other, user: 'A' and 'B'.
'A' have 5 ...
0
votes
1answer
15 views
Is this approach acceptable instead of $watch when passing service variables to controller?
I am trying to do angular the right way and see people wanting to avoid using $watch. I've been using this method but haven't seen anyone do it recommended in my searches.
angular
.module
.service('...
2
votes
3answers
35 views
AngularJS: weird behavior with the 2-way binding (ng-repeat)
I'm using AngularJS in a Firebase app and I have a function where I do some inner join to get some data. More details here. After getting the response from the firebase api I create an object and push ...
0
votes
2answers
16 views
how i can run function in 2 Seprated controllers in angularjs
i have 2 seprate angularjs controller
that named HomeController And SearchController
i have a function that named "Search()" in HomeController
how can i run search function from searchController ?
0
votes
2answers
31 views
Angularjs have a button that adds text to an input textfield already in use?
I have a form that has a textfield where you can write a message, but I want to give the user a set of tokens to ease the typing of those tokens.
For this I want to have a set of buttons that when ...
0
votes
2answers
20 views
Get current state in ionic app
Newbie to the whole ionic and angular scene.
I used the ionic creator to generate the view files.
My goal is to check if the user is logged in before proceeding in to a tab.
However, before getting to ...
0
votes
1answer
30 views
Angular 2 - Using 'this' inside setTimeout [duplicate]
I have a function like so in my class
showMessageSuccess(){
var that = this;
this.messageSuccess = true;
setTimeout(function(){
that.messageSuccess = false;
},3000);
}
...
2
votes
1answer
17 views
Security handshake failed when trying to send response in express route
I'm building a twitter sentiment reader and I am running into issues when I try and send a response back to angular. Everything worked fine before I added res.send() and it logged the sentiment.
Now ...
0
votes
0answers
12 views
Symfony + Angular: redirect to login page
So, I'm using angular 1.5.9 and Symfony 2.8 in my project. Also FOSUserBundle is in use, but I'm not sure if it's matters.
Currently I need to logout user after 10 minutes inactivity. So, I want to ...