Tagged Questions
AngularJS 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 apps are also frequently known as Single-Page Applications.
0
votes
6answers
11 views
Angularjs select does not mark matching model as selected
I have a problem with my ngModel in select not showing as selected. Both id and name are matching but its not working, see selectedState. Pointing model to the actual object within options array ...
0
votes
1answer
7 views
dynamic name attributes for forms that are created with ng-repeat
Im using ng-repeat to get data. From that data i make select boxes like this:
<div ng-show="catAddons">
<div ng-repeat="group in catAddons">
<h4 ...
0
votes
1answer
10 views
Binding array to Options in angular doesn't work
I have a controller defined as
var searchController = function ($scope, $http) {
$scope.modSelectedState = null;
$scope.states = [];
$http.get('./data/states.js')
...
0
votes
1answer
19 views
Contact form doesn't transfer data from AngularJS to PHP
I am trying to retrieve data from AngularJS file to PHP file, but I get the error that it's empty.
I can't find any good examples that are dealing with posting data from angularJS to php file and so I ...
0
votes
0answers
16 views
Angular PUT not allowed with Web API 2
I have this exact same pattern set up in this application for other controllers / factories to do a PUT for an update to the database and it works fine but with this code I get a "The requested ...
-1
votes
1answer
8 views
Select box wil not select value, it will show the options but can not select
I populate a select using ng-options. In the value it gives a addon_id (from json data) and the name is addon_name. but I also have a variable called addon_priceoption (wich can be 'free' or 'paid') ...
0
votes
0answers
12 views
Responsive item grid
I am working on an app that uses AngularJS. My app has an array of JSON objects. Each of these objects has a picture (thumbnail), name, and description. I want to display each of these objects as a ...
0
votes
0answers
10 views
How create an directive for validate form?
How create an directive for validate form with AngularJS?
Please see my code:
cshtml file :
<div class="error"
ng-show="{{ngNameForm}}.{{ngNameFieldEn}}.$dirty && ...
-1
votes
0answers
13 views
AngularJS to NodeJS File Upload
I am developing an app using MEAN.js. I am trying to use Flow.js to upload a file to Node. What I want to do is have a user select a file (using Flow), fill in some parameters, then click Submit. ...
1
vote
1answer
36 views
orderBy not working as expected
I am trying to iterate over a JSON response and sort by another key-value pair in the object (the order object value, but looks like that is now working out for me.
Can I reformat the object in ...
0
votes
0answers
4 views
Namespacing a Rails route breaks Angular resource save
Here is the Angular JS resource
.factory('Share', function($resource) {
var service = $resource('http://localhost/api/shares/:id.json',
{ id: '@id' }
);
This Rails route works.
post ...
0
votes
1answer
14 views
Setup error: Uncaught Error: [$injector:modulerr]
I'm getting that Uncaught Error: [$injector:modulerr] error related to 1.2 and needing ngRoute installed. I read about that here and found this stack answer here.
However I followed all the steps, ...
2
votes
1answer
23 views
Which forms of JavaScript for intermediate-level Rails developer, only dev on team?
I am acting as web developer for a small startup, taking over as the only in-house developer to maintain and adapt the application that was initially put together by a team of contractors. I would ...
0
votes
1answer
14 views
Intercept calls to controllers
Can I intercept the calls to my controllers methods?
I searching for something like Castle Windsor Proxy objects interceptos, for implementing something like AOP.
For example:
<button ...
1
vote
1answer
20 views
Uncaught Error [$injector:modulerr] error
I am new to Angular and I keep getting thrown the following error.
Uncaught Error: [$injector:modulerr] ...
0
votes
1answer
15 views
How do I sequentially chain promises with angularjs $q?
In the promise library Q, you can do the following to sequentially chain promises:
var items = ['one', 'two', 'three'];
var chain = Q();
items.forEach(function (el) {
chain = chain.then(foo(el));
...
0
votes
0answers
3 views
Reloading one ngtable on click of row in another ngtable - Ajax successful but data not refresing
I want to reload an ngtable on click of a row on another ngtable.
A $watch is in place to check one of the property. If the value on the property changes, the ngtable should refresh.
Please note that ...
-4
votes
1answer
30 views
Data binding in directive isolated scope
I want to create a directive with isolated scope, but I'm not able to get it working.
jsFiddle
I want to isolate age model in a directive scope. I want to perform some business logic on that model ...
0
votes
1answer
7 views
Error: [$parse:ueoe] Unexpected end of expression:
How can I solve this error?
<td sorter-column ng-header="Id-St" ng-sort="Id">
</td>
my directive :
.directive('sorterColumn', function () {
return {
...
0
votes
1answer
32 views
$scope object to URL?
In my Angular application I want the user to be able to bookmark a particular URL, modeled with an object such as this one:
$scope.state = {
selected : ["a", "b", "c"],
yearOptions : [{ year: ...
0
votes
0answers
12 views
Create directive that wraps each list element inside a bootstrap panel with controls to delete, reorder, …
I have an angularjs application that produces forms for lists of complex objects of the same structure. I wrote directives to create the html needed for editing them.
So its basically just a
<div ...
0
votes
0answers
23 views
Is it smart to create Objects for directives in services/factories
Every of my directives has a constructor,
Something.prototype = {};
return { create: function (props) { return new Somenthing(props); }}
and directives mostly have this in their scope
directive {
...
0
votes
1answer
30 views
Custom directive validation
I have a drop down as a custom directive. I need form validation on it so i used this code:
autoQuoteApp.directive('dropdown', function () {
return {
restrict: 'E',
scope: {
...
0
votes
0answers
11 views
$setViewValue with object copy performance
I have a directive for a toggle button derived from the btnRadio of Angular UI. Instead of just using a simple model with toggled values I have modified it to accept a model which is a "global" object ...
-1
votes
1answer
19 views
Can't animate opacity
Does anyone know why in this example left animates ok but opacity does not?
A very simple example that works great with the "left" property but not with "opacity".
...
-3
votes
0answers
31 views
Angular VS Ruby on Rails framework, which is better when a database is not necessarily needed? [on hold]
I am new to building applications and have tested both Rails and Angular. I wanted to build a simple application using ebay's API. My goal is to let the user find items by popularity and how much they ...
0
votes
1answer
14 views
Restangular - Not able to get started
I am learning Angularjs and Restangular. I am following this page http://www.ng-newsletter.com/posts/restangular.html
== app.js==
angular.module('app', ['restangular']);
angular.module('app')
...
0
votes
1answer
17 views
Error: [$compile:ctreq] Controller required by directive
I started receiving this error randomly today:
Error: [$compile:ctreq] Controller uiLayout, required by directive uiSplitbar, can't be found!
For the life of me, I can't figure out why this ...
0
votes
0answers
10 views
Why does safari horizontally spill text on certain elements?
In Safari 7 on iOS and OSX I have certain elements in which the text is overflowing horizontally. These elements have their text populated by Angular Translate asynchronously. It looks as if Safari ...
0
votes
2answers
14 views
enabling cors in codeigniter ( restserver by @chriskacerguis )
http.get request in agularJs controller works fine when my client app and api are in localhost.
when api is moved to server., issue arised.
client side using angularJs
...
-1
votes
1answer
23 views
js countdown break my angularjs code
I'm little disapointed about my countdown function :
/* countDowner */
var countDown = 5;
function countDowner() {
if (countDown < 0) {
$("#warning").fadeOut(2000);
var ...
0
votes
2answers
29 views
HTML styling while Angular JS is loading
I have html block and I want to control it's visibility by Angular variable
<div class={{visibilityCss}}>
Show/Hide Area
</div>
In angular I have $scope.visibilityCss = 'hide' or ...
0
votes
2answers
26 views
Proper way to reference js property from another property
I am working on an angular project and I have a factory providing some global database methods. I tested this in a jsfiddle and it works, but I want to know if it is the right way to do it.
So ...
0
votes
0answers
6 views
Select text when editing
I'm editing some users with Angularjs xeditable. I want the text to be selected when I click on an editable element.
I think I know how to write the directive:
...
0
votes
1answer
15 views
How to select the new element just added dynamically in a select directive
I am building a directive with a select list in order to add dynamically elements.
The following doesn't work : I'm adding an element to the array model used in the ng-model-options binding of my ...
-1
votes
0answers
19 views
SailsJS vs LoopBack
I'm rewriting a project in NodeJS (actually with Sails) and AngularJS on the front, and two days ago, I attended a presentation of StrongLoop CEO, where he presented his product : Loopback.
So, as ...
1
vote
1answer
12 views
d3-driven directive transition doesn't work inside ng-repeat
I am trying to include my d3 code inside a directive.
However, when my directive is inside a ng-repeat, the transitions won't take place.
Here's a JSFiddle of the issue: ...
1
vote
2answers
27 views
How to detect when content has loaded?
I'm creating a print page for my site: http://vivule.ee/0/print
I want to initiate window.print() when the page has loaded. I have tried different approaches, but have been unsuccessful. I know it's ...
0
votes
2answers
41 views
Get count of unique values of properties from JSON API response
I have a JSON API served by a Ruby on Rails backend. One of the endpoints returns an array of objects structured like this
{
"title_slug": "16-gaijin-games-bittrip-beat-linux-tar-gz",
...
0
votes
0answers
15 views
How do multiple directives, transclusion, priority, and compile/link functions interact?
I can't make sense of what is going on in this plunk.
A few weird behaviors:
Since addLetter2 has a priority of 50, fakeRepeat2 should compile first, but the console shows the opposite.
Also, I'm ...
0
votes
0answers
15 views
Assigning function with AJAX call to variable return “undefined”? [duplicate]
I have a function that does AJAX request and I have $scope and a variable that call that function with their inputs.
function sortCars (index){
getAllCars.get().success(function(data){
...
-1
votes
1answer
20 views
ng-model inside angular directive
I want to have a two way binding inside angular directive
This is what I am doing
angular.module('myapp',[]),directive('mydirective', function() {
var directive = {};
directive.restrict = ...
0
votes
1answer
18 views
Developing game app using Phaser.js and Ionic (slow/shaky rendering)
Just to let you know (in case someone wants to develop).
I developed a game app using Phaser.js. I sort of put the code into Ionic blank starter app. So basically the view is rendered using Ionic app ...
0
votes
0answers
13 views
How to serve frontend and backoffice with a NodeJS application on Heroku?
I am using Nodejs with AngularJS for my backoffice application.
It stays on
http://localhost:3000/#!/
But what I need is, this url points to my frontend, and a subdomain like
...
1
vote
1answer
42 views
Using a value instead of variable in the html for a directive attribute
I want to use a directive that have an attribute. I want this attribute to always be true, so I do not need a scope variable for this. But I am pretty sure that the following is wrong, it is probably ...
0
votes
0answers
8 views
ngInfiniteScroll not firing - Load event never called
I am currently building my first application with AngularJS and I need an infinite scroll functionality. for which I found ngInfiniteScroll quite good. To check if the thing runs I just copied the ...
0
votes
1answer
23 views
AngularJS and Codeigniter - Combination & Data Transfer
I've recently started learning AngularJS and I was thinking about creating an application using codeigniter as the backend (as an API to insert, update and delete data to a MySQL database) and ...
0
votes
0answers
23 views
Checking a JSON attribute's value then passing only certain objects into $scope?
I have a /xyz/:id route and controller in Angular, which is set up to work with a $resource serving up JSON.
angular.module('MyApp')
.controller('DetailCtrl', ['$scope', '$routeParams','Results',
...
0
votes
3answers
18 views
How can i get this ng-option to init with selected object value?
I´m trying to start this select with a predefined option selected. But i need to use as value an object like you can see in my code. I need to get an id in data.selected.
index.html
<div ...
0
votes
0answers
17 views
Angular UI Select2 - Selection bound to ng-model is always within quotes
I'm playing around with Angular UI implementation of Select2 jQuery plugin because I need it's built-in ajax and infinite loading features, and I've come across some unwanted behavior.
Every value ...