Tagged Questions
Use for questions about AngularJS, the open-source JavaScript framework. Do NOT use this tag for Angular 2 or later versions; instead, use the "angular" tag.
0
votes
0answers
3 views
clear text input on another controller
is it possible to clear all fields in one controller by clicking on a button from the previous controller? i'm trying to do so by setting cache:false in routes.js in the controller that needs to be ...
0
votes
0answers
8 views
Set Timer For HTTP request
Is there a possible way for me to set a timer for the client side to periodically make a request to the server automatically?
For example
Polling(){
this.http.makeRequestEvery1min(){
subscribe(...
0
votes
0answers
6 views
Dynamic ng-model generation for multiple drop downs
I have a requirement to generate multiple drop downs dynamically depending on the data present in the collection from mongodb.
{
"_id" : ObjectId("58f4fdd4c9fc145b279a1cc9"),
"_class" : "com.zwayam....
0
votes
1answer
11 views
How to change value based on options selected?
I am building a Ionic app and I am having trouble with the "cart" page of my app.
I try to display dynamically the price of the item when the options are selected :
<form id="itemOrder-form2" ...
0
votes
0answers
8 views
Unable to load transpiler
I have an Angular application running on Node that I recently just started having issues with. I am having an error with the transpiler: Please see image.
Chrome Developer Image
So the app was ...
0
votes
2answers
15 views
disable the last item in the link
I'm using angular1.6. I'm trying to disable the last link in the sidenav. But somehow the first item is disabled Here is the code and plunkr
<li ng-repeat="item in nav.sideNavListOne" ui-sref-...
1
vote
1answer
15 views
AngularJS errorcallBack
I'm having some difficulty with AngularJS. Any constructive help is greatly appreciated.
This is the Angular code I'm working with
app.controller('customersCtrl', function($scope, $http) {
$...
-2
votes
0answers
9 views
looking to push data into json object with angularjs
I need help trying to add form data into the json object using angular but nothing is working for me. What im looking for is the data added in the form to get added to the end of the table can anyone ...
0
votes
1answer
12 views
Displaying a tooltip when hovering over a tab with uib-tab?
I'm having an HTML/Bootstrap issue. I have a group of tabs that I display using the uib-tabset directive on Angular Bootstrap (UI Bootstrap). I want to display a tooltip that displays when hovering ...
0
votes
1answer
12 views
Changes to a property in a service not triggering a change
I have the following UserService where I'm simply having a property within the instance that determines whether the user isAuthenticated. For some reason, even though the value is being changes by ...
0
votes
2answers
21 views
AngularJS using ng-repeat. Binding Expression not working
I am not getting the expected output, I am getting the binding expressions as it is instead of the names, AS shown Below
EXPECTED OUTPUT:
UK
London
Manchestor
Bringham
US
Dallas
Austin
San ...
0
votes
0answers
9 views
angular-chart.js provider and injectors not working
I've been trying to test out angular-chart.js for my current project, but I haven't even been able to get past the installation phase. Following the directions outlined on the angular-chart.js site (...
0
votes
1answer
13 views
Convert and map/add Entity Framework Data to user defined class
I have a stored procedure which is returning some records set which I am accessing through entity framework. but the return type is system.data.entity.core.objects.objectresult and I want to map/add ...
0
votes
2answers
15 views
How to add $watch to track a value in $cookies inside Angular directive
I'm having difficulty getting a directive to update dynamically when a value in $cookies changes. Basically, it is a login/logout system where a custom directive should be displayed or hidden ...
1
vote
1answer
9 views
make text on x-axis as bold in google column charts
I am working on angularjs google column charts. I want to display the text on the horizontal axis as bold.I went through the API and they suggest to use bold:<boolean> which is not working in my ...
-2
votes
0answers
23 views
I have following JSON [on hold]
$scope.records = {
"grid": [{
"rows": [{
"firstName" : "aa",
"lastName" : "bb"
}]
}]
}
I want to print "fullname" as "aabb" like ...
0
votes
1answer
14 views
How To Update Page After Calling $http.put service in Directive Using AngularJS/Web API
We are new to AngularJS but are working on an AngularJS/Web API application that updates a data model from an AngularJS Bootstrap popover/directive.
We've successfully updated the database from the ...
0
votes
1answer
24 views
How pass select data from View to JS with Angular
I´m working in Angular and I have fields to fill like
I fill my select list as:
function cargarCatalogo() {
apiService.get("../../api/Catalogos/",
null,
...
-2
votes
0answers
8 views
Angular and ionic not defined
At the index.html i've got:
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
Still, i get angular is not defined, and ionic is not defined at ...
0
votes
1answer
12 views
CouchBase + AngularJs
1. I have a directive where i am making a call to couch base and
getting the obj, Initially i am getting the object with "-custom"
id.So i am trying to use a watch and updating the model....
0
votes
1answer
32 views
Ng-repeat and ng-if usage for html td
I receive a Json that looks like this (I dont have access to change it)
{
"name": "mike"
"days": [
{
"timeperiods": [
{
"time": "08:00 - 12:00",
"hours": 4,
...
0
votes
0answers
31 views
Need clarification angularJs's forEach method
I am new to angular js, and I was trying to get unique values using ng-repeat. I went through many sites for the example , one of them is enter link description here
which I got from stackoverflow ...
0
votes
1answer
14 views
Custom validation via child control
So I'm working inside a directive that contains it's own form element and buttons, however all the controls must be transcluded through. The model for this particular view contains a property for ...
1
vote
1answer
28 views
Catching all clickable elements in Angular2?
I want to add a cursor:pointer css style to all elements that have (click) handler defined (or have binding to click events).
I believe that on AngularJS it was possible to define a css using [ng-...
0
votes
1answer
12 views
Using multiple limitTo filters in one ng-repeat directive in AngularJS1
My data is fetched from JSON file, by PHP, from MySQL database (XAMPP - virtual server, REST API) to AngularJS1.
Let's say that now I have a JSON with numbers, from 1 to 31 and that I want to display,...
0
votes
2answers
28 views
$stateParams are undefined after passing to controller
I am using ui-router to pass an object to another state and controller using
$state.go()
But the console.log for the $stateParams object is showing up as undefined. The object is made up x and y ...
0
votes
2answers
27 views
ng-click triggering all the elements in ng-repeat
when I try to click a link in one of the elements in ng-repeat,all the links in the ng-repeat are getting triggered.checked relevant questions but couldnt get much help.
PFB the plunker.
https://...
0
votes
0answers
16 views
ng-model from Angular bootstrap is undefined in controller
//Here is my methods from controller
$scope.buttonClick = function (index) {
if (index == "Topics") {
$scope.update_cloud($scope.all_cloud_elements[0]);
console.log(...
-1
votes
0answers
13 views
How to load data on startup in AngularJS
I am new to AngularJS and writing a small application which loads data from some file in JSON format through a service and then we can add data to it through a controller and accordingly show the ...
0
votes
0answers
8 views
Why doesn't $validators update $errors value on ngMessages?
The validator is being called, and returning true/false as expected. However, even when the validator returns false, the html still shows the class "ng-valid" instead of "ng-invalid" as expected, for ...
0
votes
1answer
23 views
Visual Studio 2013 - unable to build TypeScript code
I have an MVC-WebAPI-AngularJS-TypeScript project in Visual Studio 2013.
(NOT Visual Studio Code, common things used by VS code, including npm-installed tsc are not applicable here !!)
I have ...
0
votes
1answer
21 views
How to bootstrap component based angular 1 application?
Using angular 1.6, here are the components I need to have:
+-------------------+
|side| |
|bar | |
|... | view |
|... | |
|... | |
+------...
1
vote
0answers
27 views
Creating custom ng-repeat to avoid $watch in angularjs
I am using a custom directive for ng-repeat to avoid $watch.I have tried to modify the directive in every possible to skip $watchCollection(). But without this i am not able to access data in ...
0
votes
0answers
17 views
Find event after Angular binds/populates dropdown using ng-options
I am working with the bootstrap-multiselect control. I need to execute multiselect() on a select element once all of the options have been populated by Angular.
Here is the select box, bound to a $...
0
votes
0answers
13 views
using $scope in agular.js to change value at index.html in routing
Iam making a single page app in angular.js using firebase and using the side nav bar on index.html
and after login i want the user name should be on the side nav bar but the $scope is working for the ...
0
votes
0answers
18 views
angular JS http post data sending
I have 6 forms and among those following form alone is not submitting params.
$scope.submit_s = function(isValid) {
if (isValid) {
console.log($scope.school_); //value is printing here
...
-1
votes
0answers
34 views
What is the reason a React component can generate and show a random number while Angular cannot?
Let's say if the render function is:
render: function() {
return (
<ul>
<li> Hello {this.props.name}</li>
<li>{ Math.floor(Math.random() * 1000000)...
0
votes
0answers
9 views
State params not appending while change of the state
I have a scenario when I click on the item the state should change and I am passing params when the state changes.
Controller:
_goToDetails occur when click on item .
function _goToDetails(itemId, ...
0
votes
1answer
18 views
Need suggestion for sqlite
As I'm very very new to sqlite, I need to understand something. How can I store my table name in a variable and use in sqlite query? I'm currently using the existing code but I tried to modifiy the ...
-1
votes
0answers
10 views
ngCordova-nfc (by using phonegap-nfc) example for angularjs project
Please help me about ngCordova-nfc (by using phonegap-nfc).
I have a cordova project (no ionic/phonegap). I want to read NFC tag id by using this code. But I can't. Can you help me?
angular.module('...
0
votes
0answers
8 views
UI Grid AngularJS: Cell Filter realigns the table data
I want the table content to be right aligned in the cell. I am exporting the data using pdfmake within AngularJS.
When I apply this filter to the table data it left aligns the table data.
Here is ...
0
votes
0answers
15 views
How to add 'show more' button to add more stuff at the bottom of a sails.js page?
js/node.js experts!
I have a relatively simple sails.js page that shows results (a number of X = 5 *.png images) to a user. The page is an EJS view and just loops through a number of image URLs it ...
0
votes
0answers
28 views
Redirect to another controller, if and only if, a condition is met. Angular.js
I have a code that is activated every time I navigate from one view to another in my application.
app.run(function($rootScope, auth,$state)
{
$rootScope.$on('$stateChangeStart', function(event,url)...
0
votes
1answer
18 views
Form validation clears all fields if false
I have a simple form validation function for my form which consists of two text fields and two dropdown fields. It will alert me if I do not fill out a field, but it deletes the information from all ...
0
votes
2answers
26 views
Angular JS and AJAX posting data doesn't work first click
I focus on Angular JS and I try to posting data with AJAX in ANGULARJS it's working but not first time.
In my html button has ng-click="check()"
This is my app.js code.
var app=angular.module("...
0
votes
0answers
8 views
Map a JSON API object returned from a Http request in JavaScript/Angular
I am working for the first time with JSON API returned from a Http Request. I usually use JSON but instead of having ID references they usually had all the information needed in the same node.
These ...
0
votes
0answers
7 views
Best practice Angular 1.x for login and SPA (Single Page Application)
I want to know the best way to integrate standard authentication (a simple login) and Angular SPA.
My login just have 2 fields: login, password and a submit.
My SPA have a header, a sidenav (a menu ...
0
votes
1answer
11 views
How to test $resource calls if it contains specific headers on making http request?
I have this following factory.
services.factory('Api', ['$resource', function ($resource) {
return $resource(urlPath, {
'action': 'get',
'entity': 'Entity'
}, ...
0
votes
0answers
10 views
Display shapeFile on leaflet map using an uploaded file.zip
I'm trying to display a shape file from Brazil on my leaflet map, this shape file is inside a .zip that contains: .dbf, .prj, .sbn, .sbx, .shp and .shx files. To do that, I'm using: https://github.com/...
0
votes
1answer
17 views
(ionic) Issue : $state.go doesn't display the template
I have an issue with this chunk of code, when I click on the button, nothing happened...
Normally, the template inside "news.html" should display.
I've checked on internet but nothing for help me... ...