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
0answers
8 views
Style the root element of an AngularJS directive
I have an AngularJS directive which is used in "Element" mode i.e. it is used as a custom tag in HTML.
angular
.module('myModule')
.directive('myDirective', function() {
return {
...
1
vote
0answers
9 views
ng-repeat absolute $index when using filter
I'm trying to get the absolute $index of the ng-repeat when using the filter. For example I have an array like this:
$scope.notes = [
{
name: 'note 1',
value: '1'
},
{
...
0
votes
1answer
6 views
Angular.js: Store div content in scope variable
I have an editable div and I want to store the HTML content in scope variable scope.myText:
<div id="editor" contenteditable="true" ng-model="myText">
<p>HTML Text</p>
...
0
votes
0answers
8 views
Combining two ng-repeats in a table
I want do use two different ng-repeat loops in a table to kind of group different obejcts with each other but don't know really how to do it.
My code right now:
...
<tbody>
<tr ...
0
votes
0answers
8 views
ng-disabled not effective after content is loaded. the element is enabled again
I have a select dropdown element and its contents are loaded using init(). It has a ng-disabled assoictaed with it.
But, the ng-disabled is not working, or the lement is re-enabled due to the change ...
0
votes
3answers
15 views
AngularJs Injector Module Error
i'm new in AngularJs (started an couple hours ago) and i'm trying to complete the AngularJs in 60 minutes'ish tutorial. But i got stucked on the first controllers example.
This is my code:
...
0
votes
0answers
3 views
Cannot get http-server to run with nodejs command line from angular-seed github project
I am attempting to get a better understanding of nodejs so that I can get an IntelliJ plugin working.
I have installed NodeJS on my Windows 7 machine and verified that it works from the command line ...
0
votes
0answers
8 views
Passing parameters to nested routes
I am working on an angular app and I am trying to achieve the following routes:
/networks
/network/nameofnetwork
/network/nameofnetwork/shows
/network/nameofnetwork/show/nameofshow
my problem is ...
0
votes
0answers
15 views
uncaught Error: [$injector:modulerr]
Recently I've started with Angular JS and I've created some routes that worked for some time. I'm not sure if I have done something wrong or not, but I'm getting a strange error and I'm not really ...
0
votes
2answers
10 views
Error: [$injector:unpr] Unknown provider
I've set a service using Angular named uIdentity. But, when I try to call it this way:
app.controller('foo', function(uIdentity){});
I get this error message:
Error: [$injector:unpr] Unknown ...
0
votes
1answer
13 views
Directive at angularjs and custom method/html
I have this code:
<body ng-controller="testController">
<div test-directive transform="transform()">
</div>
<script type="text/ng-template" ...
0
votes
1answer
12 views
AngularJS ng-model for select is not setting the selected=“selected” attribute
I have an AngularJS page for editing surgeries, but I can't get any of the <select>'s to show the current value. All the other fields in the form show their current values so I'm not sure what ...
0
votes
3answers
23 views
why my ajax success data is not display in angular js
I am trying to call ajax and get my HTML contend .But I want to show that data on tooltip/or pop over .I am getting the data on console I don't know why it showing black data tooltip it is showing ...
0
votes
1answer
6 views
trigger $location.path from service
So I have an AngularJS service listening for some events. On the handling of these events I need to call different controllers and ultimately load a new view. In one event handler I am using ...
0
votes
1answer
16 views
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'localhost:8080' is therefore not allowed access
I have seen this issue multiple times been posted on forum, but working out with those solutions hasn't helped.
I am building MEAN stack app using PassportJS to allow login with Twitter.
...
0
votes
0answers
23 views
angularjs $resource $save not posting data
api/profile/:accountname/:profilename
I am trying to use my api in a restful way using $resource. My data model is: each account has a list of profiles, and those profiles should have GET, POST, PUT. ...
0
votes
0answers
4 views
Jasmine + Angular: How to make shared examples for controllers?
I have two controllers, one inherits from another. I want to have shared examples for these controllers.
I'm trying to extract my specs into a file but now they are breaking. I have a .js file with ...
0
votes
0answers
11 views
How to unit test spy on $emit in a directive?
How do I check if $emit has been called in an unit test of a directive?
My directive is fairly simple (for the purpose of illustration):
angular.module('plunker', [])
.directive('uiList', [function ...
0
votes
1answer
10 views
strange angular bug: angular.element('<option-anything>') fails
I just noticed that
angular.element('<option-anything>')
fails to compile. It returns an empty array. It seems to be related to the phrase "option-".
any insights?
0
votes
2answers
12 views
Phonegap Android Back Button w/ Ionic and Angular
I'm having issues disabling the back button for Android in a Phonegap project using Ionic Framework / Angular JS. I have tried many other proposed solutions to no avail. The problem is I have a ...
0
votes
0answers
9 views
onHighlight in in AngularJS Typeahead
Is it possible to fire a callback when a user highlights a choice in the typeahead?
something like
typeahead-on-highlight='callback(highlightedValue)'
1
vote
0answers
9 views
Using AngularJS 1.2, how to animate items inside partials (when using single ng-view in your index file)?
I had an app that I got 80% through building a few weeks back and it uses a lot of jQuery to do animations. I stopped working on that and started rebuilding it from scratch using AngularJS.
I'm now ...
0
votes
3answers
25 views
Remove click event on last item in ng-repeat
I have an ng-repeat which looks like the following:
<ol>
<li class="pointer node-name" ng-click="myClick(node)" ng-repeat="node in myArray">{{node.name}}</li>
</ol>
This ...
0
votes
0answers
5 views
nginx config - forward http to https, forward www.domain.tld to domain.tld and two subdomains
I'm trying to configure nginx to:
http://www.domain.tld --> https://domain.tld
http://domain.tld --> https://domain.tld
http://api.domain.tld --> https://api.domain.tld
The 'www'-webroot ...
0
votes
2answers
10 views
bind selector options to variable
I have some code that's a bool 'public'. I want to create a select that allows the user to change this. Here's how I've done it:
<select class="prompter-public-textfield" ...
0
votes
0answers
14 views
Updating JSON Mean stack Angular side
I have the create and delete working, as well as the server side API PUT call (I can make updates through POSTMAN by entering the key and value. I'm stuck on how to implement the update on the angular ...
-1
votes
0answers
13 views
Implement editor which doesn't escape string
I want to do the following:
Give a user the ability to write to an editor (maybe text area will be enough) so that what he will write will be rendered as is! In the html, i have angular in the front, ...
0
votes
0answers
12 views
Iframe with dynamic content
I need to build a page like this http://dojo.telerik.com/, everything works except the Javascript I give in the iframe. Basically I generate my complete page in HTML and give it to the iframe src ...
0
votes
0answers
22 views
angular dropdown select not bringing in the default value from the dropdown
I have an angular app which uses services.
The controller is as follows:
app.controller('mycontroller', function(CampusService, DyslexiaService, $scope, $modal, $log, $http, dateFilter) {
...
-2
votes
1answer
24 views
AngularJS ng-repeat for one-to-many relation
I am using AngularJS and ng-repeat.
I would like to show in html table 1:M(any) relation.
It is given what M(any) < 5 in my case.
The first column will show the the key (1), the second column will ...
1
vote
1answer
24 views
angularjs Prepopulate input text inside ng-repeat directive
We have input text to be shown with pre filled values. We are using list using ng-repeat directive
<ul ng-repeat="post in postList>
<input type="text" ng-model="postid" ...
0
votes
0answers
7 views
AngularJS unit testing $interval in controller
I am currently using AngularJS 1.2.4 and have trouble in writing unit tests for the code using $interval.
I am using Karma + Jasmine for writing tests.
My controller code:
...
0
votes
1answer
43 views
Angular.js only loading half the times
I am having an issue with an angular application. I am using bower. When I startup the server, I sometimes get this error:
Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp ...
0
votes
0answers
11 views
AngularJS with Devise - Unprocessable Entity
I'm trying to create a sign up process via AngularJs + Devise in Rails 4
I'm following this book-> Riding Rails With AngularJS
/users/registrations_controller.rb
class ...
0
votes
1answer
17 views
Auto-resize SVG inside AngularJS directive based on container element
I am placing an angular directive inside a dynamically-sized element. The directive itself consists of an SVG which is computed based on the element size. I am trying to make the SVG auto-resize and ...
0
votes
2answers
36 views
Shouldn't the scope be isolated?
I have two simple directives who generate similar elements in the DOM.
Both have an isolated scope
Both have an ng-click to a metod that displays a message.
One has the ng-click declared in the ...
0
votes
1answer
18 views
Watch element on directive
I have the next code:
angular.module("Test", [])
.directive("testDirective", function () {
return {
restrict: "A",
scope: {
model: "="
}
link: function(scope, element) {
...
1
vote
2answers
24 views
AngularJS integration with requirejs
I have a html page that needs to render dynamic content through AngularJS. I am loading the html page using requireJS. I have included angularJS in my script tag, but unable to create the controller. ...
0
votes
0answers
16 views
Writing a “wait for AJAX requests to finish” for AngularJS for Selenium tests?
We've been using jQuery but there's talk of transitioning to AngularJS. My main concern is that I may need to write a new "wait for AJAX" method for my Selenium automation. Here's the gist of what ...
0
votes
1answer
12 views
How do I set multiple unique charts in their own DIVs using an AngularJS directive and Highcharts
First, a HUGE thank you to anyone who can help me figure out how to get this working!
I am creating a dashboard which shows several main containers. Inside these containers are smaller ones with ...
0
votes
0answers
20 views
Angularjs Typeahead works in a separate page but not in a view(spa)
I am trying to utilize Angularjs's Typeahead and it works fine when it it is placed inside of stand alone page, but when I put exactly the same code inside a view that runs inside index.html, I have ...
0
votes
1answer
22 views
Modifying angular objects at runtime from dev console
I'm trying to change some of the variables inside my angular modules from the console and keep hitting roadblocks.
I have a particular property that will eventually be provided by the backend server. ...
0
votes
0answers
20 views
highchart with angular and ionic framework error
I want to make a graph on my web app.
I don't understand how angular with highcharts works.
I use this lib : github.com/pablojim/highcharts-ng
and this framework : ionicframework.com/
I think it ...
2
votes
1answer
39 views
Multiple ng-class attributes on a directive
Relevant plnkr.
In script.js I have a directive super. This directive has a template
template: '<div class="super" ng-class="{dirClass: foo}"></div>'
with an ng-class attribute.
Note ...
0
votes
0answers
12 views
Passing a promise to Lazy load Select in Angular JS
I found the jsfiddle below and I want to make the options load from a promise passed into the select tag attribute that I already have in the scope... i'm a bit of a noob when it comes to passing data ...
0
votes
0answers
25 views
Angular error object thrown upon $http.post request
I am setting up a new angular app and encountered a strange error anytime I tried to make am ajax request with $http.
I have the following code:
srnApp.controller('WallCtrl', [
'$scope', ...
1
vote
1answer
14 views
Is AngularJS a good option for building a catalog page of E-Commerce site based on CakePHP
I am considering to use AngularJS for building my catalog on my E-Commerce platform based on CakePHP. I plan to query database using Slim REST API in CakePHP. This is what the catalog would look like.
...
0
votes
1answer
16 views
Tell child directive to act after a parent directive has done DOM actions?
Let's say we have some nested directives:
<big-poppa>
<baby-bird></baby-bird>
</big-poppa>
And let's say that big-poppa wants to create a component that all of his ...
0
votes
0answers
13 views
Why Is the “library” line needed for Dart?
For a library file (say foo.dart), you starts it with a line like this:
library my_foo_lib;
Why is it needed? The import is based on file name (foo.dart), not library string (my_foo_lib):
import ...
0
votes
1answer
27 views
WebApi 'Multiple actions were found that match the request' error after making call in angular
I feel I have the routes, controller and the call correct, but still cannot figure out why I am getting the 'Multiple actions' error. The controller itself makes call to a service bus, but I cannot ...