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
11 views
How to refer a function definition from other module
How can I define a function in angular service, and then use the function definition in a function in another service.
I implement as below but it doesn't work. I don't want to return a ParentService ...
1
vote
2answers
21 views
angularjs find properties of div in directive
new to angular, new to stackoverflow. been trying to solve this for days. here is my problem:
I want to center a group of boxes.
Is there a way to get access to properties of div's (with id or class ...
0
votes
1answer
17 views
Angularjs resource factory transformResponse is not called
Below is my code
MY_MODULE.factory("SOME_API", ['$resource', '$http', '$rootScope', function($resource, $http, $rootScope){
return $resource("/appi/get/", {responseFormat: 'json', ...
0
votes
1answer
14 views
Conditionally apply classes depending on route location in Angular JS
My goal is to add a class to body depending on the route that AngularJS is serving on.
For example, I'd like to do this (in HAML):
%body#body{:class => "{{$route.current.templateUrl}}"}
$route ...
1
vote
1answer
43 views
AngularJS: scope.$watch in a directive isn't being called after AJAX request
I have the following directive:
MyApp.directive('myFilter', ['$filter','$rootScope',
function($filter, $rootScope)
{
var dir = {};
dir.restrict = 'E';
dir.templateUrl = ...
0
votes
1answer
16 views
angular ng-animate directive with ng-show directive
I cant get ng-animate to work with the ng-show directive. Here is a JSBin simplified example:
http://jsbin.com/uquzal/1/edit
For some reason my CSS classes .show-animation-setup and ...
0
votes
1answer
13 views
Mouseover/mouseout directive with ng-repeat in AngularJS
I'm trying to show/hide different pieces of data using Angular based on when a user hovers over an HTML table row.
I have the following code in my template view:
<tr ng-repeat="fruit in ...
0
votes
2answers
22 views
AngularJS service storing $http results to prevent requerying — is there a better way to do this?
The Setting: I want to have a service that multiple controllers can query for data pulled using $http. The initial solution was to use promises as suggested here.
The Problem: Each time a controller ...
0
votes
1answer
39 views
Unable to determine why form won't submit
I've created a basic angular form and can't determine why it's not submitting.
http://contact-info.checkoutbiblebowl.com/
The form validation is valid and it still won't submit. I feel like I've ...
-2
votes
0answers
17 views
Angular: Confusion about select, validation, model
http://plnkr.co/edit/guhpukWsdZ6QHsKzlynZ
look to console
console.log($scope.myForm.foo) in $error.required = false
console.log($scope.myForm.foo.$error) = true
Some explain?
Thx
2
votes
1answer
15 views
add a custom function on angular $resource
I have an angular resource that goes something like this
app.factory('User', function ($resource) {
return $resource(
'/api/user/:listCtrl:id/:docCtrl/', {
id: '@id',
...
4
votes
0answers
71 views
How to eliminate minification errors when using $controller in AngularJS
angular.module('mainApp').
controller('dynamicRouteController', ['$scope', '$controller', '$routeParams', function($scope, $controller, $routeParams) {
if(/^\d+$/.test($routeParams.pageOrName)) ...
1
vote
2answers
24 views
Why can't I get a $location injected into in my config()?
Why does this give me an error:
angular.module('app').config(function($routeProvider, $locationProvider, $httpProvider, $location) {
Uncaught Error: Unknown provider: $location from app
But ...
0
votes
0answers
10 views
AngularJS override resource dependency of service to be unit tested with jasmine
I have created a custom ngResource which prepends the API_END_POINT to the url. This works fine so far. But for the unit tests I would like to override the customResource with the standard ngResource. ...
0
votes
1answer
15 views
Hierarchical Angularjs directives not retrieving scope variables
I'm building an AngularJS application. I use three directives to build the menu. The titles are inside a i18n file, so most of the attributes are angularjs expressions. Here is a snippet of how the ...