All Questions
20 questions
0
votes
0
answers
533
views
AngularJS unable to perform file upload [duplicate]
I am doing a file upload in angularjs. I am unable to get the file object content before sending to my back-end.
XHR, headers:
XHR-Header
I have no idea why because I can get the content in my logs.
...
-1
votes
1
answer
230
views
AngularJS Unable to display upload file logs [duplicate]
I am trying to create a file upload function using angularjs which will just accept the file and send it to the server side (Django). To ensure the file upload function is working fine, I've placed ...
0
votes
2
answers
811
views
AngularJS file upload Error: $injector:unpr Unknown Provider
I am trying to do a file upload using angularjs. But I am getting this error for the past few days and I am unable to resolve:
angular.js:13920 Error: [$injector:unpr] http://errors.angularjs.org/1....
1
vote
1
answer
1k
views
Can one inject a directive $compiler into a service?
I'm trying to output a directive as a javascript string so that I can place the html in a code display window. I'm interested in the actual code rather than the browser rendered version because I'm ...
1
vote
1
answer
450
views
ngMap directive not displaying the location coordinates taken from service file
I am trying to call location coordinates from service file and display in google map view. But for some reason the data binding is not working, and there are no errors and the controller is calling ...
-1
votes
2
answers
45
views
Error: [ng:areq] Argument 'ext-modules/fleet/jsFleetController.js' is not a function, got undefined
am getting "Error: [ng:areq] Argument 'ext-modules/fleet/jsFleetController.js' is not a function, got undefined" this error message when ever I load the template file.
The following are the code, ...
0
votes
2
answers
170
views
AngularJS: What's the correct syntax to share a factory service among custom directives with controllers?
I've 2 custom directives and a controller that all need to share some data. The following doesn't compile. What's the correct syntax to do this?
flight-service.js (shared):
(function() {
var app = ...
0
votes
1
answer
2k
views
How to use variable from a Controller in a Directive link function?
I want to be able to use the variable "videoUrlId" from the controller 'useSpreadsheetData' below in my directive 'meetings'. How can I do this? I have looked at require but could not get it to work.
...
1
vote
1
answer
87
views
AngularJS - use a service and controller in a directive
I am trying to use a service and controller in a directive. I have a button directive, on click of the button, i want to call a controller method() and call a service inside that method().
...
0
votes
1
answer
559
views
AngularJS - Not able to access service in a controller method
I am not able to access a service inside my controller method.
AppController.$inject = ['$scope', 'appService'];
function AppController($scope, appService) {
$scope.name = "World";
$scope....
3
votes
2
answers
478
views
Why does this AngularJs Service with variable object name return an undefined object?
Scenario:
I'd like to use this service to share some properties inside my webApp.
This service should have some object inside and the controllers should be able to get and set those objects.
JS:
...
1
vote
3
answers
45
views
Issue with $scopeProvider
I am having a js file like below.
(function(){
angular.module("MyModule",[])
.service('testService',testService)
.directive("testDirective",testDirective);;
function testDirective(...
1
vote
2
answers
395
views
Controllers and directives, precedence
I've been with Angularjs a few days and I'm struggling with a few aspects of it. I'll do my best to try and explain what the issue is, and I'd really appreciate any help anyone can give me about it.
...
0
votes
1
answer
256
views
How to dynamically choose a repository/service to be used in a directive/controller?
I have a directive that gets data from the database but I want it to use different repositories (with the same API) in different places in the project. The incoming data has similar fields so that is ...
1
vote
3
answers
1k
views
How to access an object attribute inside a service in AngularJS?
I have a service with a local variable object with events names:
myApp.service('appService', ['$rootScope', function ($rootScope) {
var events = {
firstEvent: "MyFirstEvent",
...