Tagged Questions
AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Controller (MVC) capability, reduce the amount of JavaScript needed to make web applications functional. These type of apps are also known as Single-Page Applications.
0
votes
0answers
6 views
preventDefault() not working on production environment
I want to prevent default click action on submit button:
I have a haml form with this button:
= f.submit 'Publish', "ng-click" => "submit($event)"
a controller:
$scope.submit = function(event) ...
1
vote
0answers
10 views
angularjs unsafe ng-href using javascript: void(0);
I have a similar question to this post: unsafe link in angular
But adding "javascript" what was proposed in the answer didn't resolve my problem:
...
0
votes
0answers
13 views
Trying to convert jquery plugin to Angular Directive
Within a loop, I have:
<div class="barcode" class="thumbnail">
<canvas class="ean" barcode-generator barcode-value="9002236311036"> </canvas>
</div>
Which loops out a ...
0
votes
1answer
7 views
How do you link to a specific part of the page in Angular?
To make a typical "Go back to top" link usually you would put, say
<a id="top"></a>
[...]
<a href="#top">Top</a>
In AngularJS this link tries to go to example.com/#top ...
0
votes
0answers
6 views
AngularJS ng-Grid starts minimized?
I'm using ng-Grid v2.0.7, and the problem is that the first time that ng-grid shows, it is minimized. Here is a picture of what I mean:
Only after clicking on the minimized table (the top picture), ...
0
votes
3answers
20 views
Access another controller in Angular.js
My basic code so far:
function UsersCtrl($scope) {
$scope.users = [
{
"id": 1,
"usersName": "Matt Dance",
"favorites": {
"id":1,
...
1
vote
1answer
22 views
“Angularjs Way” of finding by id
Here's the gist of what I'm doing
<!-- if user liked post -->
Show "Unlike" button
<!-- else -->
Show "Like" button
<!-- end -->
In Rails, I would do something like this:
...
0
votes
3answers
15 views
Ng-src doesn't update in AngularJS view
I'm using the following code in my Angular app to display an image:
<img ng-src="{{planet.image_url}}" class="planet-img"/>
And I'm using $watch to change the image_url attribute when other ...
0
votes
1answer
12 views
AngularJS: How to access child scope object from parent scope?
function ParentCtrl($scope) {
//some function check whether data object in child scope is still null
}
function ChildCtrl($scope) {
$scope.data={};
$scope.func = function(){
$scope.data.x = 1;
...
1
vote
2answers
19 views
AngularJS nested ng-repeats with a single index?
Using Angular 1.0.7, how can I specify a single index for nested ng-repeats, so that each item on the inner arrays get's a consecutive index value? (i.e. 0, 1, 2, 3 and so on for all elements in all ...
1
vote
0answers
17 views
Angular Momentum Conservation in Gravitational Interaction
thanks for any help.
I'm trying to show that in a 2body problem, angular momentum is conserved given that $\dfrac{dp}{dt}=\dfrac{-GMm(rv)}{r³}$, where p is momentum, t time, G gravitational constant, ...
1
vote
1answer
17 views
$setValidity not updating $valid flag in real-time
I'm using a custom form input validator implemented using a directive. In the directive, the validation event is bound to the input's blur event. So on blur, it sets the validity of the model using ...
0
votes
0answers
15 views
AngularJS binding to MVC4 HTML.ListBoxFor
I'm trying to bind some text input to a MVC4 HTML.ListBoxFor object. I have it mostly working however I am not able to get the items added to the list box to be selected on entry. Any help would be ...
0
votes
0answers
20 views
How to create reset() method in Service that return promise?
I've got a service called MyArticles. Using $http GET, collects all articles for a given Category. The MyArticles Service is injected in ControllerA, ControllerB, ControllerC, that should run some ...
0
votes
2answers
25 views
Is it possible to update angularjs expressions inside of an iframe?
So...for example, I am trying to pull in an email "template" into an iframe as a "preview" for the user inside of an angularjs app. The iframe lives inside of the controller area (let's call it ...