Bagavath PA | 11 Sep 06:22 2014
Picon

why the controller breaks down when some changes performed in controller

sometimes the controller is not accepted the changes and it is not 
reflected in the jsp page.

mahesh gupta | 11 Sep 04:07 2014
Picon

Angular js isolate scope issue while using ng-repeat and custom directive.(jquery sorttable+draggable)

I have a draggable item and two sortable lists.This draggable item can be dragged into any of the sortable list. To implement this functionality i have used jquery + angular.

Sortable list is create via ng-repeat.

The problem is when i drag the draggable item into sortable list, the other sortable list which is unrelated is also getting updated.

So the dragged item is getting added into 2 sortable lists

if i do it with only jquery it works fine, I have a larger functionality depending on this.

pls help me solve this.

Observation:

When the item "Drag me down " is dragged into first set and debugged the el item children it shows the items of second list.

live example http://jsbin.com/gonev/3/edit





--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
mark goldin | 11 Sep 02:12 2014
Picon

"Refreshable" services

I am trying to create a solution that would have services that can be refreshed at a user will. For example on a button click.
Here is my controller:
motoAdsApp.controller('AirportControllers', function($scope, $http, AirportService) {
    var now = new Date();
    var date = new Date(now.setDate(now.getDate()-2));
    $scope.eventDetailReportDateFrom = getFormattedDate(date);
var now = new Date();
    $scope.eventDetailReportDateTo = getFormattedDate(now);
   AirportService.getData($scope.eventDetailReportDateFrom, $scope.eventDetailReportDateTo).then(function(data) {
var json = $.xml2json(data);
  $scope.airports = json.airportsSummary;
    });  
    }   
});

and Service
var myModule = angular.module('motoAdsApp', ["wijmo"]);
myModule.factory("AirportService", function ($http, $q) {
    return {
        getData : function(dateFrom, dateTo){
            var deferred = $q.defer();

            var response = $http.get("http://localhost:7070/AlarmSummaryArchive?parameters=dateFrom + "|" + dateTo);
            response.success(function (data) {
                deferred.resolve(data);
            });
            response.error(function (data) {
                alert('Error');
            });
            // Return the promise to the controller
            return deferred.promise;
        }
    }
});

A user can select dates and refresh data. How can I make my solution accomplishing that?

Thanks 

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Zlatko Josic | 11 Sep 00:43 2014
Picon

Get POST parameter from url

Hi,

Is it possible to get POST parameters in angular application from URL. I have two applications A and B where B is an angular application.
A application does redirection to B application with POST parameters. Is it possible to extract those parameters in B application?

Thanks

Zlaja

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
red rob | 11 Sep 00:11 2014
Picon

When should you use ngInclude versus creating your own directive?

I am considering porting our app(s) to use Angular JS and in order to separate disparate sections in the view, I want to break them up into several partial templates.  When is best to use ngInclude and when is it best to write your own directives to handle something like this?

Thanks,
Rob

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Stacey Lynn | 10 Sep 23:35 2014
Picon

Isolate Scope vs Inherited Scope Performance

I am new to Angular, and am trying to do some evaluation for how I should proceed with a few issues. The big one I am needing to discern is performance. This is made worse by the fact that I have zero real world knowledge of how to measure performance, or how to write performance benchmarks.

But to boil it down, I have a situation where I am presently using an isolate scope on a directive. I thought at first that an isolate scope was very desired because it was a slimmer object, and therefore faster performance. However, when I tried it in practice, I saw that the scope generated this way is just as large as the normal controller scope.

So my question is basically ... is there any performance reason to use an isolate scope? It actually looks as it though it should make things slower. Example code below;


angular.module('app', [])
.controller('HomeController', ['$scope','$parse', function($scope, $parse){
   $scope.Model = {}; $scope.Mode = { Editing: false };
   console.log('controller scope: ', $scope);
}]).directive('editModeOptions', [ '$parse', function($parse) {
   return {
      restrict: 'A',
      scope: {
         kEditMode: '=',
         kOptions: '='
      },
      link: function(scope, element, attributes) {
         var values = scope.$eval(scope.GridColumns),
             options = scope.kOptions,
             mode = scope.kEditMode;

         // do stuff with the various parameters
         console.log('isolate scope: ', scope);
      }
   }
}]);

And then attach them very simply.

<div ng-app="app" ng-controller="HomeController">
<div k-edit-mode="Mode.Editing" k-options="options.grid" grid-columns="['Id','Name','Abbreviation','Group']"></div>
<h1>{{ Mode.Editing }}</h1>
</div>

And this outputs two rather sizable scope objects.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Danniel Rolfe | 10 Sep 22:29 2014
Picon

AngularJS - Sharing PDF's via a Extranet

I'm new to AngularJS and I just watched a crash course on Lynda.com. I have an idea for a project that would improve the workflow of the company I work for. I was hoping I could get some advice on the technology I should use and how to go about this project.

I would like to build a Web Application (Extranet) that pulls PDF's from a secure folder in a Windows based server.

Currently, we share our products' documentation via an Extranet.
The Extranet was built before I started working here.  It's a poorly designed HTML site that links to 350+ different pdf's.

In order to update the Extranet, I must:
  • upload the pdf's to server
  • Add to the preexisting table (please refer to the attached image extranet.tiff)
  • Link the anchor text to the PDF's in the server

All said and done this is a half to a full day process that happens every week. 

I would like to build a MVP web application that has a search query and a dropdown menu. When the customer selects the product, I would like the Web Application to load the pdf's to a single page. Ideally, I would like to build or use AngularJS to load the pdf's to a single HTML site. I would also like to build a JS code that allows me to load the pdf's to folder and it takes care of the loading to the website.




--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Christian Nwamba | 10 Sep 21:49 2014
Picon

Use a $http.get $scope outside the $http.get function

Hi
If i have
$http.get('/url').success(function(data){
        $scope.result = data;
        console.log($scope.result) //log 1
})
        console.log($scope.result) //log 2
I can comfortable console.log log1 but log 2 returns undefined.
How do manipulate the $scope.result so it can be available to all controller in my module.

Thanks


--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
marcos rebelo | 10 Sep 19:13 2014
Picon

WebSockets and angular aren't working for me.


I'm +- new in Frontend work and I'm willing to learn.

I'm trying to use WebSockects to change my page and getting crazy on the process. Consider the class MyWS a working WS.


<html ng-app="todoApp">
   
<head>
       
<script src="/assets/js/angular.min.js"></script>
       
<script src="/assets/js/underscore.js"></script>
       
<script src="/assets/js/MyWS.js"></script>
       
<script>
            angular
.module('todoApp', [])
               
.controller('WebsocketController', ['$scope', function($scope) {
                    $scope
.users = [{"firstName" : "firstName", "lastName" : "lastName"}];
                    $scope
.message = "crazy";
                   
var counter = 0;
                   
var ws = MyWS("ws://localhost:9000/websocket", function(ws) {
                        $scope
.message = "Socket has been opened!";
                        ws
.send("RelevantUsers", {"userId":"Hello World"}, function(message) {
                            $scope
.message = message.data;
                           
var userIds = _.map(message.data.results, function(elem) { return elem.userId });

                            ws
.send("LoadUsers", {"userIds": userIds}, function(message) {
                                _
.each(message.data.users, function(elem) {
                                    $scope
.users.push(elem);
                               
});
                                console
.log($scope.users);
                           
});
                       
});
                   
});
               
}]);
       
</script>
   
</head>
   
<body>
        Hello World
       
<p></p>
       
<div ng-controller="WebsocketController">
           
<div>{{ message }}</div>
           
<div ng-repeat="user in users" style="width:500px; float:left; border:solid 2px #aaa; padding: 5px; margin: 5px">
               
<div>{{user.firstName}} {{user.lastName}}</div>
           
</div>
       
</div>
   
</body>
</html>

I get the {{ message }} set to "crazy" at the beggining and never changed, actually the console.log($scope.users) works and I have 10 elements on the array visible on the console after all this messages changed with the server.

My question is. Since all the steps seem to pass, why dont I have an updated page at the end?

Thanks for any help

Best
MArcos


--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Madhav Patel | 10 Sep 18:12 2014
Picon

Re: back button : keeping filter value

<at> Dinesh: Will it redirect me to the previous page with search result on the page or will it be the fresh page from the server? 
Can you give some piece of code?
Thanks.

On Thursday, 2 February 2012 03:53:36 UTC-8, Thierry Chatel wrote:
I have a list and a filter input field, just as in the documentation :  http://docs-next.angularjs.org/api/angular.module.ng.$filter.filter
I enter some text to filter the list items, then click on one of the items to view details page. When I go back from the details page to the list, using the browser back button, I would like to retrieve my list page with the same filter value.

The browser keeps the values of the html page fields, but Angular bindings overwrites them at loading from the controller values.
Is there an easy way to keep the value in the html input field and update the controller property from it, rather than overwrite the html input field by the controller property value ? 

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
James Cicenia | 10 Sep 17:25 2014

How do I render a templateURL to a string?

This escapes me as I am new.

Anyone have a code snippet to render my templateURL?

I am trying to create a string to send it to the function to use as the body of an email.
So, I was trying to create a function in my controller for ng-click

hg-click="openEmail(title,templateURL)

Thanks

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.