Tagged Questions
0
votes
0answers
9 views
Basic UI-Routing Example but an error occurs
I try to learn AngularJS. At the moment I focus on ui-Routing.
My Code is very simple, but it doenst work and I don't know why.
Description of my problem:
The browser shows:
"Hello World ui-Routing!" ...
0
votes
0answers
12 views
AngularJs directive - how to save '&' scope property in the link function
I'm trying to implement a simple button directive with this properties:
scope: {
text: '@',
enable: '@',
click: '&'
},
The click function will ...
0
votes
0answers
9 views
Angularjs Retrieve file from mysql data type MEDIUMBLOB (PHP as backend)
I am new to Angularjs.
I am building a function to retrieve a file and display on the web page from Mysql database.
My controller:
$http.post("ajax/getSales.php", {'id': $scope.salesid ...
0
votes
0answers
24 views
How to pass directives to an element in the directives template in AngularJS?
I have a directive called step-field, in the template of the directive i have input or select elements that should sometimes have max-length or ng-required or some custom directive like ...
-1
votes
2answers
21 views
AngularJS Map one object to another
I want to map a $scope.filters object to a var criteria on the condition if the original fields are null or not.
So lets say I have:
$scope.filters = {
name: 'myName'
lastName: null,
...
0
votes
1answer
25 views
Controller defined in a module referenced inside a directive in another module
I have an index.html (main entry point) and I have a main.js file, say:
(function() {
var pop = angular.module('mainApp', []);
pop.directive = ('directive1', function() {
return {
...
0
votes
1answer
30 views
AngularJS Error: error:unpr Unknown Provider?
I am trying to add ngAnimate to my angular app dependencies. Here is my angular app file:
var carApp = angular.module("carApp", ["ngAnimate"]);
Here is my TableBodyCtrl controller:
...
-1
votes
1answer
24 views
Reload ng-repeat, with new data
I have a service, where I just return a list with all the available videos, which is then injected in a controller, so I can do a ng-repeat to list those videos. Just like so
...
0
votes
1answer
21 views
date fiilter and display in angular.js
I want to filter date and display only the dates that are current dates and hide future dates. Here is my html code:
<div ng-controller="date">
<div ng-repeat="d in dates">
...
0
votes
0answers
14 views
Jasmine - AngularJS $https inside a service
I am newbie in Jasmine. I have angular service like below,
app.factory('helper', ['$http', function($http){
var helper = {};
helper.http = function(setting){
if(typeof ...
0
votes
3answers
27 views
C# DateTime to java Date & angular JS
I have
public IEnumerable<object> GetStudentDate(string firstname)
{
var query = from usr in context.Student
where (usr.hasDateTime == true && ...
0
votes
0answers
19 views
Model vs event to communicate between directive for an angularjs app
I have an angularjs app with one ctrl and several directives.
To make directives reusable, there is no adherence with ctrl (isolate scope and mapping).
In this case, what is the best solution to ...
0
votes
1answer
30 views
Keep creating an extra empty page on “next”
I have a problem with a tool built in HTML and Angular.js.
Basically the site is built the way that it should store 15 entries on a page, then you press "Next" and the next 15 entries should be ...
0
votes
3answers
28 views
AngularJS automatically updating controller data by service
I'm having some basic problems with angular at the moment. I just wrote a service that reads the temperature of an external device in an interval of five seconds. The service saves the new temperature ...
-3
votes
2answers
20 views
angular string changes not detected
The changes of a variable string not working
var angulargap = angular.module("angulargap", []);
angulargap.factory('cartService', function($rootScope,$http){
var fac ={
...
1
vote
2answers
30 views
Sorting with ng-repeat Angularjs
I have an array
$scope.answers=["","","",""]
means Array have multiple empty elements .
<li ng-repeat="item in answers "><input type="text" ng-model="item"/></li>
it throws ...
0
votes
1answer
28 views
Display data in JSON URL using AngularJS
I'm new to ionic/angularjs and I need to know how to display data to a HTML view from a Json url.
So, data in my Json URL looks like this:
{
News: [
{
id: "1",
title: " ...
0
votes
1answer
24 views
Routing causing 'w is not afunction'
I get: Error: w is not a function
scripts/app.js
var app = angular.module('app', [
'homepageControllers',
'ngRoute'
]);
app.config(['$routeProvider',
function ($routeProvider) {
...
0
votes
1answer
32 views
Scope object is undefined in Angular directive
I am trying to understand this behaviour, and have added simplified code of what I'm trying to do. In an HTML partial for a modal using a modal controller I have some code like this:
<form>
...
0
votes
3answers
52 views
Should a beginner start learning Angularjs now? [on hold]
I'm completely new to js frameworks. I've made some progress with pure javascript and now I wonder, does it make sense to start learning AngularJS or should I wait for Angular 2.0? Or do you recommend ...
1
vote
1answer
17 views
AngularJS - How to pass additional params in $http response
How to pass additional config to $http service response? Code as below:
var promises = [];
angular.forEach(rows, function(rowIterator) {
var additionalConfig = {
config1: ...
0
votes
1answer
10 views
Links work in broswer and provide JSON but not with Angular
I'm trying to use Angular to get two responses.
One, a response if the website uses green energy
Two, what are alternatives to this website.
...
0
votes
0answers
18 views
Libraries for plotting a graph of an exponential function in javascript [on hold]
I'm looking for a dead-simple library that lets me do something like
<script>
chart = plot(Math.exp(x), x);
chart.options = {width:foo, height: bar, xlabel: baz, ylabel:foobar};
...
0
votes
3answers
38 views
How to execute an angularJs function after DOM is ready?
I'm working with google map & angularJS, i want to excecute the distance between current location and another location in JSON file. But the distance only show when I have a button in view ...
0
votes
0answers
20 views
UI Router - Going to non angular app
I have a few routes in my Angular, and a few apps that exist outside the Angular world.
I'm using html5mode with locationProvider.
eg.
app.config(function($locationProvider) {
...
0
votes
1answer
24 views
Angular Service Factory with Parameter and a Success Callback
The syntax required to pass a parameter breaks the success callback. answer is the parameter. I can get the success callback to work when not using the extra block query: function(answer) {
...
-1
votes
2answers
23 views
AngularJs: Binding a property of a scope object to a directive
I'm somewhat new to AngularJs, so forgive me if this is a newb question, but I've looked around a bit and haven't been able to figure this out.
I'm trying to send an attribute of an object into a ...
0
votes
2answers
22 views
How to include global variables in angularjs app?
I have a global variable declared outside of angular context:
var globalv = "Hello";
This variable does not change. I have a directive that wants to use it...
$scope.somevar = globalv + "_";
What ...
0
votes
1answer
19 views
Angular Js with ImgLiquid
I'm working into an applications which needs to use Angular's repeat functionality to print few informations about a specific client.
That's pretty much the code that I have
<div ng-repeat="todo ...
0
votes
0answers
9 views
I'm trying to get form validations to work with an Angular Wizard
I am using an angular wizard for my app's registration process.
Angular Wizard -
https://github.com/mgonto/angular-wizard
However, no matter what I try, each step of the wizard is not allowing for ...
0
votes
0answers
7 views
ratchet with angular js implementation
I've been googling around and looking for examples on implementations with ratchet and angular js and php as my server. But no luck, I'm still not that advanced in angular, but I have a experience ...
-1
votes
0answers
24 views
TextBoxes won't take focus
I have this very strange problem that occurs in the Ripple Emulator where a textbox won't take focus...or at least it appears to not take focus (there is no cursor blinking in it once I click into ...
0
votes
1answer
16 views
Ionic Angular JS $routeProvider loading ion-list won't scroll
I have an ion-content tag with ng-view which is pulling in partials using a routeProvider. Each partial is loading a list from an XML APi and this is all working flawlessly, except the lists are ...
0
votes
0answers
23 views
Apply ngIf to another element
So I have two elements,
<div class="div1" toggle-div="true">Toggle Div 2</div>
<div class="div2">Div 2</div>
And a directive to apply ng-if
.directive('toggleDiv', ...
0
votes
1answer
20 views
Angular possible to set default option for object (not list of objects)?
I have a simple <select> dropdown that uses an object, and I would like to set the default option based on the model. For a list of objects I can just use track by, but is it possible to ...
0
votes
1answer
22 views
How to dynamically bind function to ng-click using the function expression from model
I have the following element in my Angular template to generate a button bar with Font Awesome icons:
<li
data-ng-repeat="btn in navigation.buttonBar"
data-ng-click="{{ btn[1] }}"
...
0
votes
0answers
17 views
Angular Js routeprovider throwing runtime error
Hi I am trying to learn angularjs and I am getting stuck on an error. I am using Microsoft Web Developer 2010 Express. I have an asp.net application in which I am trying to construct a spa. I have an ...
0
votes
1answer
33 views
Promise - TypeError: Cannot read property 'then' of undefined
I think I just need another pair of eyes on this, because I can't get what I'm missing here.
$scope.checkout = function (form) {
//some code here
function ...
0
votes
2answers
28 views
Two way binding with AngularJS select for a child object
I have an angular form with this select element:
<select ng-model="expense.category" ng-options="category.code for category in categories"></select>
where expense is my object to ...
1
vote
2answers
16 views
Angular: Differing HTML templates within an ng-repeat
I want to use a different template within a repeated block based on the type of data that I am repeating. In my example, the array could contain data or it could contain tweet objects from Twitter. ...
0
votes
2answers
28 views
AngularJS filter based on multi-dimensional JavaScript object
I have a table in which I am outputting many rows of data. In that table, I have a column status.
There are about 30 different status values. There is a dropdown for the column to filter by ...
1
vote
2answers
33 views
Angularjs : how to load data on a partial?
I am working with Angular and i am trying to update data of a ng-view when we click on the button but it's not working. Here my code snippet.
main page
<body ng-app="app">
<div ...
0
votes
1answer
24 views
How do I filter items in a list and not break my other filters?
I have a collection of events that I display using the following table
<table>
<tr><th>Title</th><th>Status</th><th><a href="" ng-click="sortField ...
0
votes
1answer
8 views
Angular form validation with UI Utils
I am looking to validate a form and disable the submit based on no form errors. I am leveraging UI Utils. The email validation, password matching and password message works, just not the submit.
...
0
votes
3answers
32 views
angularjs set and get a value from a service
Sorry about the noob question, I'm new to angularjs.
I have service and 2 controllers , one for my home page and the second for the page that I want to create dynamically.
I want to set a object from ...
0
votes
1answer
11 views
Filter ng-repeat items based on numeric conditional
Trying to use a select menu to filter items based on greater than/less than conditional.
HTML:
<select name="likes-filter" id="likes-filter" class="form-control" ...
0
votes
2answers
23 views
$http.success() or .error() not triggering ng-show upon completion
After posting a form to a web service, the below angular http post result should trigger one of two HTML elements to display the success or failure of the post. Though I'm getting a 200 ok reponse ...
0
votes
1answer
30 views
AngularJS (1.2.25) $rootScope.$broadcast('message',data) not being received by $scope.$on('message')
I'm having trouble getting a $scope variable to trigger the screen to rebind. Yes, I've tried calling $scope.$apply() after assigning $scope.value = value; Yes, I've tried calling $digest() manually ...
0
votes
0answers
33 views
Use factories to store data from a GET and send to a POST
I have an instance where I want to store a JSON object in a variable on .success after a GET. I want to take that object and send it as a POST to another URL.
My $http.get works fine but I want to ...
0
votes
1answer
22 views
How does one program PhantomJS to wait for AngularJS $resource to resolve before attempting test on returned data?
I have an AngularJS controller test script using PhantomJS. The test looks to see if the controller has loaded "users" data from a database via a RESTFul web service using AngularJS' $resource ...