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
Link two json objects in angular
I've got 2 data sets
posts
[
{
"postId": 1,
"postContent": "Lorem Ipsum",
"user": 1
},
{
"postId": 2,
"postContent": "Lorem Ipsum",
"user": 2
},
]
and users
[
{
"user": 1,
"...
0
votes
0answers
8 views
How to specify base href for scripts and styles in Angular 2?
I'm currently digging into Angular 2 and I'm having a problem with how styles and scripts are injected into index.html by the angular CLI build command (by that I mean scripts and styles defined ...
-1
votes
0answers
14 views
Input type number does not work on IE11 with angular
I've tried every polyfill I can find, including Jon Stipe's https://github.com/jonstipe/number-polyfill
angular is supposed to have one built in as well that's also not working. IE recognizes it as a ...
0
votes
0answers
6 views
Angularjs - Reload scope with new data from database
I am building a search page using Angularjs. Everything works fine but my concern is, what if a user adds a new entry into the database after the search page is already loaded? The new entry does not ...
0
votes
0answers
14 views
AngularJS and PHP json_encode empty array as result [duplicate]
I have this AngularJS App under construction. When I hardcode the data into the Service everything is ok, if I load them via JSON and PHP I get an empty response.
Controller:
.controller('ShoesCtrl',...
0
votes
0answers
17 views
How to stop timeout when coming back to a controller?
I need to start time after leaving a controller and if come back in 5 seconds then cancel it. the destroy works and timer starts. But if I come back the timer will still be running and will print its ...
0
votes
1answer
18 views
Dynamic CSS selector in Angular.js app
I am working on an Angular.js app with a plane view that contains objects.
Each time when the user drags an item from the left menu bar on to the middle of the screen, a new object is initiated.
...
0
votes
0answers
4 views
save html page in pdf format in angularJS
I want to have a save page button on my site to allow users to just download the page that they are on.
is there like an ng-save that i can use or something?
-1
votes
3answers
31 views
How to convert a string in a html element?
I have a column in a DB which has the value:
<p>Something</p>
When i receive it, how do i transform it in a html paragraph?
Thanks!
0
votes
0answers
6 views
AngularUI-Bootstrap Typeahead: Grouping titles by type
I am implementing typeahead using AngularUI-Bootstrap. I need to show the results grouped based on some values coming from the database. Here's a example of result
[{
"id": 1,
"label": "...
0
votes
1answer
17 views
AngularJS: read JSON array from file into a Factory for use in ng-repeat
I would like to read an array in from a JSON file and place it into a Factory so it can be used as a service, then use the service to populate an ng-repeat. This would all happen when the page loaded.
...
-1
votes
1answer
12 views
How to use angular-ui-bootstrap inside my angular app?
I'm making an angular app where I want to add an accordion from angular-ui-bootstrap.
I downloaded the files but dont know the logic that I need to include them..
will it be a separate module with it'...
0
votes
2answers
28 views
Increment sms counter after 160 characters using javascript
I have 2 counters, one to show remaining characters out of 160 per message and another to show total number of sms if characters are more than 160, both working fine untill 160 characters, but after ...
0
votes
2answers
26 views
How to use on-change event for textfield to make it empty if min-date condition fails
I had an input field with type="datetime" where it has min-date condition as todays date.The flow is, if the date is valid,then submit button is enabled or else it will be in disabled state.Its ...
-1
votes
1answer
22 views
Error on calling stackoverflow api [duplicate]
I am trying to get all of the questions with the tag ipv4 in stackoverflow using the api of stackoverflow. But i have the following error No 'Access-Control-Allow-Origin' header is present on the ...
0
votes
2answers
28 views
How to window.onload in angular js controller?
How to use window.onload function inside a controller.
window.onload= function() {
console.log("Hi Page loaded")
};
The controller is not applicable for the full page.
I want to execute a ...
3
votes
2answers
69 views
Focus on html element after it is enabled
I've got the following problem: I would like to focus on an input. But I have a spinner that is fired on page load and is hidden only when certain http requests are done. Also all inputs are disabled ...
0
votes
1answer
43 views
How can assign multiple selected values to the text field using angularjs
I have a dynamic text field value from angularjs post request. Based on the response text field will increase or decrease. I want to edit that value from multiple selected options field.
Html code ...
0
votes
1answer
13 views
JSON output to AngularJS parsejson
I cannot seem to put these into a scope.. And not sure if im doing something wrong...
HTML:
<div class="col-md-10 pull-md-left" style=" width:102%;">
<div class="...
0
votes
1answer
51 views
Inline style within HTML textarea gets ignored
I recently started my first project with JHipster and created two entities.
One of the entitys resembles a blog. That blog has an content attribute which works with a textarea. at my blogs.htmlfile I ...
0
votes
2answers
53 views
array of actions [“delete”, “cancel”] and rights determined by string “01”
The back end responds an array of actions ["delete", "cancel", "edit", "clickbutton"] etc.
Another string is returned which contains for example "1001". It represents the rights to do the actions.
So ...
-1
votes
1answer
15 views
Angularjs ng-repeat index 3
i have a code
$scope.filteredItems = [];
$scope.itemsPerPage = 10;
$scope.itemdata = [];
$scope.currentPage = 1;
$scope.max = 5;
$scope.data_berita = function () {
$http.get('...
2
votes
1answer
19 views
Dynamically loaded AngularJs code via ASP MVC are not bound
I'm loading a Partial view which contains AngularJS code, using the code below:
http.post("/Admin/AddSlide", { hero: self.Hero,
model: self.Type })
.then(function (res) {
...
2
votes
1answer
24 views
Is it possible to return data from webage to main server
This may be a (and probably is) dumb question but I have been trying to set up a server that will work with http and websockets. I would like the result of a button press to change a value within the ...
1
vote
1answer
22 views
How to update ng-style in ng-repeat
I have a ng-style inside of ng-repeat. The problem is the ng-style value is updated after a change but the actual style does not change.
<tr class="row" ng-repeat="(hourIndex, hour) in day track ...
-5
votes
1answer
29 views
How to upload image using AngularJS
I am uploading image my code working fine when I use below HTML
<html>
<head></head>
<body>
<form action="http://www.example.com/customers/5832e319f1f1e5cc296e8802" method=...
0
votes
0answers
24 views
AngularJS component being jumped over
I have the following code.
"use strict";
angular.module("homePage")
.component("homePage",
{
template: "home.html",
controller: function($scope)
{
...
1
vote
1answer
34 views
how to add dyanamic form fields with unique name in angular js
i have a form in that I added fields dynamically , but when i try to get the unique name it's not working, anyone can help me thanks in advance. Find the below my code.
<!DOCTYPE html PUBLIC "-//...
0
votes
0answers
8 views
Ng-cordova calendar issue
I am working on Ionic calendar "http://ngcordova.com/docs/plugins/calendar/" . I am able to add event to my device calendar and google calendar from Rest API by using ajax call. I want to synchronise ...
1
vote
2answers
29 views
AngularJS ng-minlength ng-required not working
I am new in AngularJS. I want to set Validation for input like minimum length is 5 and maximum length is 6.
I have to set 5 to 6 Digits only into my textbox.
For this I am using below code but it is ...
-1
votes
1answer
13 views
How we can create treeView using Angular JS from Single table in Database in MVC
This is my table structure:
I want create TREEVIEW Format of State---> district --> city --> village in MVC
This is my query:
CREATE TABLE [dbo].[countrylist]
(
[countrylistid] [INT] ...
0
votes
0answers
20 views
Ionic Page hide text behind navigation
I have home page for example home.html and I have navigation.html(where is my content of navigation). I trid to do in home.html ng-include="navigation.html" and it works but text on my home.html goes ...
-2
votes
0answers
18 views
Pass int value in form action javascript function [on hold]
I want to pass integer value in the saveUser() function. but i'm not getting any value incase the saveUser.id is 0.
<script>
function saveUser(id)
{
.......
}
</script>
<div ng-init="...
0
votes
2answers
19 views
Angular js ng-bind-html not giving any output on input `{_}`
I have an input data such like that:
<p>His dream is to study medicine, {_}?</p>
The character {_} make the output for ng-bind-html not give any output at all.
How to solve ...
0
votes
0answers
7 views
onsenui tabbar angular2 template functionality not working
I have a little onsenui tabbar app with angular 2 and everything works fine it's just when inside a tabpage angular 2 template functions don't seem to function.
<ons-splitter>
<ons-...
0
votes
1answer
26 views
How to use variable from controller inside html
I had a variable in my controller as
let today= new Date().toISOString().split('T')[0];
variable today gives the current date,which I want to set for the min-date attribute in html.
below is my ...
0
votes
0answers
7 views
Ionic Sqlite DB Read
Noob in the whole ionic + angular scenario and trying to learn some db reading.
I am trying to get a result in to a variable and alert it. But seems like I have missed something. The expected output ...
0
votes
0answers
8 views
Angularjs - Tab key not working on redirections
Tabbing between inputs is not working when the page wsa redirected using
$state.go('page.login');
or
ng-href
If I reload the page with F5 in some pages it works and in other pages is not ...
2
votes
1answer
54 views
Hide image on 404 code, still shows broken image for few ms
This is my code:
<img ng-show="json.user.picture" ng-src="{{json.user.picture}}" ng-error="json.user.picture = false">
When the you dont have the permission to use the image from an external ...
0
votes
0answers
21 views
Show alert only when AngularJS ready
One of my biggest issues with AngularJs, showing multiple alerts..sigh.
This code checks if password has been set and then shows an alert
if ($localStorage.password === '' || $localStorage.password =...
1
vote
1answer
33 views
Elem match is returning all the data whereas I need only the selected data
db.mdb.collection('product_master').find({'project_code':'usha-fos', 'product_details' : {$elemMatch:{'Division':'Electric Fans'}}})
.limit(1000,function(err,results){
...
0
votes
0answers
15 views
Clone angular binded div without bindings
I'm trying to make a clone of div without saving binding (want to make disappear animation).
<div ng-bind="current.content"></div>
The idea is to make absolute positioned copy of div and ...
0
votes
1answer
18 views
$scope.chart undefined in angular-chart
I need to make chart that have onClick event and get label that was clicked. I found and adapt solution. This is my code:
$scope.chart;
$scope.onClick = function (points, evt) {
console.log(...
0
votes
0answers
15 views
Angular filter range with grater than values
I want to create filter range based on Angular. This is my html input:
<input type="range" min="100" max="2000"step="100"
data-ng-model="value" >
When I use it, it filters some values and ...
0
votes
0answers
6 views
Root state with resolve before header/footer view is loaded
I'm trying to implement a root state with a resolve, which is using a Websocket connection to initialize some variables. This must be done before any other Angular controllers are called. There are ...
2
votes
2answers
20 views
Angular 2:Error - Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays
I've created an angular 2 app which calls a restful api and
When I use the below http get call in a service I am getting an error saying "NgFor only supports binding to Iterables such as Arrays."
...
0
votes
2answers
21 views
Not able to change path using $location service even after using $scope.apply
I am wondering why I am not able to change my view using location service even after I use -
$scope.$appy() or $scope.apply;
I did research before posting my question. I got results of similar ...
0
votes
0answers
28 views
How to traverse the data in angularjs?
I want to access the name having the value correspond and abc through angularjs.
How to access name field inside Data>Tag1>firebase_Key1>name.
My data is in below format.
"Data":
{
"Tag1":
...
0
votes
1answer
10 views
Failed to load resource: the server responded with a status of 500
Here i;m using angular with mvc when i;m trying to sending data i'm getting error as above and also i'm getting some scripting errr
$scope.DeleteCustomer = function(list) {
var ...
0
votes
0answers
5 views
ng-model value to mdp-time picker
Hi i am having date time object i am able to convert date and display in mdp datepicker but not able to convert time and show in time picker.
My date object is
$scope.editEvent.eventStartDate= 12-...