[AngularJS] Custom directives interaction - controller issue.

2014-09-12 Thread Ketan Mehta
Hi All, I have found and modified following code for custom directives: Apple directive dose not have it's own controller. *directive.js* var app = angular.module(MyApp, []); app.controller('mainApp', ['$scope', function ($scope) { $scope.counter = 0; $scope.*counterUp* = function

[AngularJS] shared resources amongst mulitples of same controller type

2014-09-12 Thread Jonathan Price
I have a page that has multiple instances of a given controller, all of which need similar data. Their instantiation looks sort of like this: div ng-repeat=noteType in noteTypes ng-controller=NoteController ng-init=init('note.noteTypeID') blah blah blah /div Initially, I had them all calling

[AngularJS] Re: ng-href doesn't support 'SHIFT+Click' to open in a new window

2014-09-12 Thread Daniel Sinclair
Ah, it's not ng-href of course, I can see the issue in the $LocationProvider; Shouldn't this line in $rootElement.on('click',...); if (event.ctrlKey || event.metaKey || event.which == 2) return; actually be; if (event.shiftKey || event.ctrlKey || event.metaKey || event.which ==

[AngularJS] Sent the files using Angularjs

2014-09-12 Thread Adam Bąk
Hello I have problem with send file to imgur.com I am a beginner angularjs and I have problems. I doing: input type=file onchange=angular.element(this).scope().onFileSelect(this) in template. and in js: $scope.onFileSelect = function(element) { $.ajax({

[AngularJS] Re: Custom directives interaction - controller issue.

2014-09-12 Thread dinesh kumar
hi ketan, scope argument in the link function does everything.you declare the function in the controller scope and you access it in the directive. Regards Dinesh kumar.L -- You received this message because you are subscribed to the Google Groups AngularJS group. To unsubscribe from this

[AngularJS] Use angularjs ng-repeat directive with $scope.$broadcast()/$scope.$on()

2014-09-12 Thread Andriy Lakhno
*I have following problem. There is a service which is responsible to store some selected object id. And when a object is selected, $rootScope broadcasts event to notify involved controller.* var SelectedObjectFactory = function (objectsFactory, $rootScope) { var

[AngularJS] How to Integrate a React js + angular js for router

2014-09-12 Thread Anil Kumar Alluri
Hi, In my project requirement are follow? 1) How to integrate a angular js and react js ? 2)How to use angular routers in react js + rails Application? 3)Is it right way to develop angular js routing in rails but veiw only used by react js? I have a lot of the trembles in by projects

Re: [AngularJS] Re: Communication between controller and directive

2014-09-12 Thread mark goldin
Where do I add it? On Fri, Sep 12, 2014 at 9:38 AM, dinesh kumar dinesh.lo...@gmail.com wrote: add this code in controller and check. $timeout(function(){ $scope.$apply(); }) Thanks Dinesh kumar.L -- You received this message because you are subscribed to a topic in the Google

Re: [AngularJS] Service runs twice

2014-09-12 Thread Eric Eslinger
Is one of the two hits an OPTIONS request? If so, that's the CORS preflight. e On Fri, Sep 12, 2014 at 7:16 AM, mark goldin markzolo...@gmail.com wrote: Service: var myModule = angular.module('motoAdsApp', []); myModule.factory(AirportService, function ($http, $q) { return {

[AngularJS] How to get the total quantity and price

2014-09-12 Thread ravi kumar
Hi, I havea scenario like if a customer added multiple products say product1-$20 ,product2-$30 product3-$40 having prices say $20,$30,$40 how to display total price based on selected products. Thanks, Ravi -- You received this message because you are subscribed to the Google Groups

Re: [AngularJS] Service runs twice

2014-09-12 Thread Eric Eslinger
I had problems like that when I attached the same controller to multiple viewports on the same page (using ui-router), so I'm not sure if that's the thing. Where'd you put the console.log command to output that info? Have you confirmed on the server side, or in the network tab of the debug tools

[AngularJS] Angulars + a + _blank + Iexplorer 11 = not run?

2014-09-12 Thread Horacio Labory
Hello: I have a problem with a to href external domain with target='_blank' in Iexplorer 11 with a Angulars program. Example: http://jsbin.com/AXanuFEN/2/edit If I use _self it's run, but not with _blank -- You received this message because you are subscribed to the Google Groups AngularJS

Re: [AngularJS] Re: Defining a resource URL globally.

2014-09-12 Thread Luke Kende
Great! Glad that got you going. Timing is one of the bigger challenges with angular I have found. For example, I have my app set up such that initial data is loaded in app.run and once all xhr calls are complete, it then sets a ready variable on $rootScope. Each controller $watches this

Re: [AngularJS] Service runs twice

2014-09-12 Thread mark goldin
The server gets hit twice. On Friday, September 12, 2014 10:34:43 AM UTC-5, Eric Eslinger wrote: I had problems like that when I attached the same controller to multiple viewports on the same page (using ui-router), so I'm not sure if that's the thing. Where'd you put the console.log

Re: [AngularJS] Service runs twice

2014-09-12 Thread Michael Hopper
Try adding some $log.info() or console.log() statements in various places to see what is going on. Add log statements to the beginning of the controller to see if the controller gets created twice. Also add log statements to AirportService (above the return) and insideAirportReturn.getData

Re: [AngularJS] Service runs twice

2014-09-12 Thread mark goldin
I think I found the problem. I had ng-controller specified multiple times in the same page as it was suggested. Moved it to the top, no more multiple hits. On Fri, Sep 12, 2014 at 12:11 PM, Michael Hopper drmi...@gmail.com wrote: Try adding some $log.info() or console.log() statements in

[AngularJS] ng-model with json

2014-09-12 Thread Xavier Artot
Bonjour, My ng-model doesn't change the $scope, I have always the same city, when I change my ng-model ? template: div class=loader ng-show=loader /div

[AngularJS] Modules with controllers and templates

2014-09-12 Thread Partap Davis
I'm attempting to modularize my app... I'm already using requirejs, but I'm trying to get the hang of the angular modules now... I figured I'd start by placing my new admin section into a module. It's just a simple controller with a template: admin/ admin.module.js admin.ctrl.js

[AngularJS] Re: shared resources amongst mulitples of same controller type

2014-09-12 Thread Jonathan Price
I'm having trouble making the connection from that article. Previously, I had: .factory('Utility', function($http) { return { getList: function() { return $http.get('getList.html'); } } I've just switched to this to prevent