Tagged Questions
0
votes
3answers
25 views
Angular 2 ng-class depending on function
Im trying to change the class of some elements based on an array.
I have declared a function to return a boolean and say if the string(state/class) is contained in the array.
I have call it isState(...
0
votes
0answers
16 views
Sort and Filters Do not Work - Ngtable
I have had some difficulty getting started with ngtables. Right now, pagination is correct, but I can not do sorting and filtering. Neither the initial sort order that is defined works Any suggestion?...
0
votes
3answers
36 views
Pass data from one Angular component to another
Yes, this has been asked a couple of times - feel free merging the question - but I'm probably a lamer. I have two components in a page which go like this:
<post-list></post-list>
<...
0
votes
0answers
14 views
getting 404 error for bower components while the path is all set
I am trying to run my application using gulp task runner and i have installed few bower components and angular is one of them
When i try to run the application I am getting errors
In index.html:
&...
1
vote
1answer
23 views
AngularJs ngRoutes not working
I add this link tag <a href="#/pendingJobs"> And in Js wrote this type of when function
.when("/pendingJobs", {
templateUrl : 'jobsPending.php',
controller : 'appCtrl'
})
But when i ...
2
votes
1answer
27 views
AngularJS directive not recognised when starting with data-*
I'm new to AngularJS. Need some help with the directive I created.
This is My HTML:
<data-table template-url="dataTable.html" info="someData"></data-table>
I get "someData" from server ...
0
votes
0answers
19 views
track nested ng-repeats with duplicate values by custom property
I am trying to pass duplicate values(names) with nested ng-repeat but can not make it work by adding custom tracking propery. the reason I want this is to take only some values not all of them, hence ...
0
votes
1answer
30 views
two way data binding not working as expected in angular
I'm trying to achieve two way data binding by taking the data from the input and show it in the comment box in realtime.
Here is my HTML Code.
<body>
<div ...
1
vote
0answers
22 views
creating login application in angularjs
i am very new in angularjs and trying to create a login application in angularjs in which flow should be like as follows:
1.when user enter userneme and password and pressing enter button, it should ...
0
votes
0answers
23 views
How do I do an action on a button back in the browser? [duplicate]
I use angularJS to create a single-page web application. I want that by clicking on the "back" button in the browser some code will executed.
For example. I click "back button" and some text is ...
0
votes
1answer
23 views
$watch on directive with isolated scope for nested object as property from crossfilter
I have created a directive with isolated scope, element, and am using those values passed in to build d3/dc charts. So I have some data that is put through crossfilter on the $scope, so that the ...
-3
votes
0answers
11 views
How toastr library is using $animate without dependency specified
I am able to use to angular-toastr without including angular-animate.js. However, I find folowing in angular-toastr library to use $animate service
angular.module('toastr', [])
.factory('toastr', ...
0
votes
0answers
38 views
Update multiple views
I am trying to update views on multiple components. For that reason I am using broadcast. If I use my code without the $apply() the views are not updating. If I use apply on multiple views I am ...
0
votes
2answers
18 views
Error: [$injector:unpr] Unknown provider: productResourceProvider <- productResource <- ProductListCtrl
I don't know what the error is as I am pretty new to angularjs. I am trying to consume webapi service using the following code.
The app.js file:
(function () {
"use strict";
var app = ...
-2
votes
2answers
37 views
how to get binded value key on click in angularjs?
Iam having a md-select dropdown list with binded data by using ng-repeat,when on button click I need to get key value of that selectd value(json key of that value).
Here is my js:
$scope.checklist=...
0
votes
0answers
13 views
Can't convert dynamic routes from AngularJS 1.2 to 1.6
In AngularJS 1.2 I have some code to dynamically load routes and controllers, which works just fine. I want to upgrade to AngularJS 1.6 and now my dynamics doesn't work anymore.
This is my old code ...
1
vote
1answer
18 views
gulp-angular-templatecache Module is not available
I am using gulp-angular-templacache.
I have that task that should create a module named templates and I added it as a dependency to my app module:
Configurations:
templateCache: {
file: '...
1
vote
4answers
20 views
Reset of radio buttons not working in AngularJS
I am working on a quiz. However, the reset button does not work in my Quiz. Can someone help me out?
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11....
-2
votes
2answers
36 views
AngularJS : Function is not defined error
I have following code in which I have to call RemoveItem() function on button click , But RemoveItem() function not defined error is occurred
JavaScript Code
$scope.AddShoppingItems = function() {...
-1
votes
1answer
21 views
dynamic change url in $http.get
I need to dynamic change url in $http.get with datas from other $http.get
JSON "datas":
[{ "name" : "John" }, {"name" : "Anna"}]
JS file:
var app = angular.module('app', []);
app.service('...
0
votes
0answers
13 views
Ionic routing and navigation issues
Firstly I'll try to explain my case. Following is my routes code
$stateProvider
.state('root', {
url: '/',
templateUrl: 'templates/home.html',
controller: 'HomeCtrl'
})
...
-2
votes
2answers
43 views
Ng-repeat and buttons
I have a problem, I want to add to glyphicon icon into a button, but this button is inside a ng-repeat, how can I get the specific button and change the class, Basically button is more over similar to ...
0
votes
0answers
34 views
How can i disable the checkbox when the scope value comes from the local storage?
Here i used the check box with angularjs. It can be trigger if the state is true;
That is $scope.seededDataAdhoc==1. if $scope.seededDataAdhoc==0 it should be disabled. It disabled when loads first ...
0
votes
0answers
12 views
ng-route conflict with django URL
I am trying to use ng-route to load templates.
Here is the codes.
app.js
var app = angular.module('app', [
'ngResource',
'ngRoute',
// 'ui.bootstrap',
// 'ngResource',
'student',
...
0
votes
1answer
21 views
Filter grouped and nested ng-repeats with dropdown in angular
I've got the following:
vm.years = [{
year: number,
proevents: [{year: number, division: string, level: string, place: string, names: string}],
nonproevents: [{year: number, division: string,...
1
vote
1answer
24 views
Splice is not working for the object(indexOf is not a function)
I have an object like
Object {val1: "Hello", val2: "", dt1: "pilo1", dt2: "pilo2", lo1: "log1"}
Now i want to remove those keys that have empty values ("").
I tried the code:
angular.forEach($...
0
votes
3answers
38 views
How to store data in angularjs application?
Hi I am developing my first Angularjs application. I want to save data in Angularjs application for later use(I have used localstorage in jquery before).
For example, I will make ajax call and i will ...
0
votes
1answer
17 views
ng-options slow data render or on click data render in dropdown with less amount data
in my view(Handler bar templete is used) on page load function get call and fetch the value from server and load the value for both dropdown via ng-options, but data comes in both dropdown after click ...
-2
votes
1answer
22 views
How to use constants in Angularjs?
Hi I am developing my first angularjs application. I want to define urls in file and make use of those urls throughout the application. I tried as below.
Constants.js
angular.module('RoslpApp')....
0
votes
1answer
18 views
Cannot find name +'Input'. any Angular 2
I am trying to get @Input to work with Typescript in Angular 2. I am getting the following error and I don't understand why.
[ts] Cannot find name 'Input'. any
Below is the code from that ...
-1
votes
1answer
23 views
Use a scope variable to look up object field in angular view
I am trying to use one scope variable as the field name to another object inside the angular view.
Example:
I have a variable called monthYear that is changed in a select box.
Based on that selection ...
-2
votes
0answers
6 views
Angular background system tab switch does not refresh
I would like to ask a technical problem, angular in the background management system how to do tab switching, similar to the tab switch, the switch between the page does not refresh(请问一个技术问题,...
0
votes
0answers
18 views
how to send unchanged base64 string as response in $http in angularjs
I am trying to send an image as base64 string in response in angularjs but I am getting it in changed form.
The original base64 string returned by showimage() function in HomeController.cs in mvc is ...
0
votes
2answers
20 views
Why doesn't my component callback work as expected?
I'm trying to follow http://www.codelord.net/2016/05/13/understanding-angulars-and-binding/ to implement a callback on an AngularJS component. At https://plnkr.co/edit/dxyI0p0pZFZdMalLfvXO?p=preview ...
0
votes
3answers
37 views
AngularJS: Unable to Send $Http JSON Response to View
Trying to get JSON data from an API and show the result in a view using AngularJS. I'm able to get the data correctly but unable to show it in the view.
When i try to access the object's data the ...
0
votes
0answers
12 views
how to send push notifications to ionic 2 apps from Wordpress?
I have ionic 2 app ios and android. i want the new post from the wordpress coming as notification on the apps . iam using ionic cloud for pushing the notifications .
0
votes
1answer
28 views
How to programmatically get network errors in AngularJS
I have the following code in say abcd.js:
$http({url: 'some url' , method: 'POST', data: , headers: {}
}).then(function(response)) {
.............
}, function error(response) {
..............
})
In ...
0
votes
3answers
28 views
Access Nested JSON objects and their attributes Angularjs
I am a new bie to angular and trying to learn it.
I am trying to display user data from a webservice that I received as response.
here's the response
{
"Users": {
"SearchTerm": "...
0
votes
0answers
24 views
angularjs error in state function used in edit module
method passing in this result
$scope.editdst = function(editdstId) {
http.get("index.php/Welcome/district_edit?id=" + editdstId)
.then(function(response,result){
alert(response);
...
0
votes
1answer
19 views
binding ng-model value into http parameter
I am trying to show the weather of any location based on user input. For that I have created an input field which takes any location as an input. For that I have used
ng-model
directive to bind ...
0
votes
0answers
15 views
Web application works on all browsers (including Microsoft Edge) but displays a blank page on IE 11
I have a web application - AngularJS frontend and Ruby on Rails backend REST API. The app opens on Chrome, Safari and Firefox and Microsoft's Edge browser, but shows up as a blank page on IE 11 (I'm ...
1
vote
1answer
27 views
How to pass data from parrent constructor to child component in angular 2
I have a angular 2 page where i need to show 2 different components using same array of data from external API. Parent is regular component, and child is shared among several other components using ...
0
votes
2answers
31 views
Onclick function inside a-href tag in angular controller calling method in same controller
I am loading data from the controller and displaying in view as a list of clickable items in HTML. When selected i want to call a method in the controller to perform some logic.
items.push("<li&...
0
votes
1answer
32 views
AngularJS function not called in the controller
it's an hour I'm trying to understand why a function I defined inside a controller of an AngularJS project is not being called.
app.js
angular.module('SupplierPortal', ['ngRoute', 'ngResource']);
...
0
votes
1answer
20 views
mongoose syntax with user.id connecting to a form
Hi I am new to mongoose and with angular through ionic. I am trying to build an app and having problem with it. I have no Idea if this syntax mongoose is right because it still is not working in my ...
-3
votes
0answers
43 views
Beginner Angular, introducing html into js
I'm needing some very basic advice please.
I am currently completing a diploma in full stack developing and have to do a project for the end of front end development. However I am a little stuck, I ...
0
votes
0answers
16 views
auth0 router doesn't trigger navigation
I'm using Auth0 with Angular 2. I have the following login code that don't go to the home page after authentication.
To my understanding, the auth0 will not do the redirection. It sends off ...
1
vote
1answer
36 views
Confirm-Button event fires twice
So I have a confirm button:
<confirm-button class-name="btn-primary"
text="Save"
body="A customer with the same Last Name is already associated with this Company. ...
0
votes
0answers
8 views
Shape object is undefined for ng-map
I'm currently trying to get a simple app up and running that uses NgMap to overlay custom polygons on a map of the United States. I have been following this example NgMap Simple Polygon. The largest ...
0
votes
1answer
27 views
changing ranking number to starts
I need to change my ranking number to a star
I used this following code:
http://jsfiddle.net/AhakQ/13/
but when ranking is zero - I see no stars at all
in this example when
$scope.ratings = [{
...