[AngularJS] Re: problem compile templete in ie11.

2014-10-30 Thread DErek DErekZ
Sorry, true link
http://об3.онлайнбилет.рф/search/#searchID=0bcd4397-27a3-43d0-bdae-96bf7e8f66d4

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Not getting scope variable while service unit test

2014-10-30 Thread akshath
Hi,

I am trying to write a test case for service using $httpBackend() but the 
problem is that i am initializing one scope variable by the respond 
data($scope.ExMenuList) but i cant access this scope variable to check the 
data. Could any one help me to sort out this issue.


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: problem compile templete in ie11.

2014-10-30 Thread DErek DErekZ
 Yes,


http://об3.онлайнбилет.рф/search/#searchID=0bcd4397-27a3-43d0-bdae-96bf7e8f66d4

ie11 console no  error messages

пятница, 31 октября 2014 г., 6:48:29 UTC+2 пользователь Sander Elias 
написал:
>
> Hi DErek,
>
> You can't share your application running on localhost with others on the 
> internet!
> Did you check the developers console in IE11? My bet, there is some error 
> in there, that might help you along!
>
> Regards
> Sander
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: problem compile templete in ie11.

2014-10-30 Thread DErek DErekZ
Yes,
http://об3.онлайнбилет.рф/search/#searchID=0bcd4397-27a3-43d0-bdae-96bf7e8f66d4 


ie11 console no  error messages


пятница, 31 октября 2014 г., 6:48:29 UTC+2 пользователь Sander Elias 
написал:
>
> Hi DErek,
>
> You can't share your application running on localhost with others on the 
> internet!
> Did you check the developers console in IE11? My bet, there is some error 
> in there, that might help you along!
>
> Regards
> Sander
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: No environments match URL Warning Messages- Need these to stop!

2014-10-30 Thread Sander Elias


Hi Darin,

I just checked, but the string No environments match URL does not exists in 
angular nor in angualr-router or in ui-router. Did you check your browser’s 
plugins?

Regards
Sander
​

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: problem compile templete in ie11.

2014-10-30 Thread Sander Elias
Hi DErek,

You can't share your application running on localhost with others on the 
internet!
Did you check the developers console in IE11? My bet, there is some error 
in there, that might help you along!

Regards
Sander

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] No environments match URL Warning Messages- Need these to stop!

2014-10-30 Thread Darin Hensley
In Angular.js, I am getting a ton of these warnings in my console log...

No environments match URL: http://10.14.23.61:9000/search

These are just warnings in the console, not breakage. The app is working 
fine. These warnings are crowding my console.log and makes development 
hard. How can I get Angular.js to stop with these? They are driving me 
crazy.


Code block from anguilar.js line 10062:



  // Note: reading logFn.apply throws an error in IE11 in IE8 document 
mode.
  // The reason behind this is that console.log has type "object" in 
IE8...
  try {
hasApply = !!logFn.apply;
  } catch (e) {}


  if (hasApply) {
return function() {
  var args = [];
  forEach(arguments, function(arg) {
args.push(formatError(arg));
  });
  return logFn.apply(console, args);

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Refused to execute script from '*' because its MIME type ('application/json') is not executable

2014-10-30 Thread Adrian Lynch
What do you get is you go to
http://localhost:3000/users?callback=JSON_CALLBACK in your browser?

Adrian

On 30 October 2014 21:09, Adham El-Deeb  wrote:

> I'm using **ruby on rails** for api and **angularjs** for client side.
> I generated the **angular** app using **yeoman**
> I'm trying to GET user data from the api using this code:
>
> angular.module('clientApp')
>   .controller('UserCtrl', function ($scope, $http) {
>   $http.jsonp('
> http://localhost:3000/users?callback=JSON_CALLBACK').success(function
> (data) {
>   console.log(data);
>   })
>   });
>
> and i have this error on my **browser console**
>
> Refused to execute script from '
> http://localhost:3000/users?callback=angular.callbacks._0' because its
> MIME type ('application/json') is not executable, and strict MIME type
> checking is enabled.
>
> and this is the api side code for GET this data:
>
>   def index
> if params[:callback]
>   render json: {data: {:users => User.all.to_json}, :callback =>
> params[:callback] }
>   # format.js { render :json => {:users => Users.all.to_json},
> :callback => params[:callback] }
> else
>   render json: User.all
> end
> # render json: User.all.paginate(:page => params[:p], :limit =>
> params[:per])
>   end
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Activating a particular tab using query string parameter

2014-10-30 Thread AwesomeANgular
Hi
I am trying to devolp  tabs  and my requirment is need to activate a 
particular tab  passed on  query string parameter,  how do i approach this 
problem ?? 

 Also can i change the views without changing the urls  ?? 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Refused to execute script from '*' because its MIME type ('application/json') is not executable

2014-10-30 Thread Adham El-Deeb
I'm using **ruby on rails** for api and **angularjs** for client side.
I generated the **angular** app using **yeoman**
I'm trying to GET user data from the api using this code:

angular.module('clientApp')
  .controller('UserCtrl', function ($scope, $http) {
  
$http.jsonp('http://localhost:3000/users?callback=JSON_CALLBACK').success(function
 
(data) {
  console.log(data);
  })
  });

and i have this error on my **browser console** 

Refused to execute script from 
'http://localhost:3000/users?callback=angular.callbacks._0' because its 
MIME type ('application/json') is not executable, and strict MIME type 
checking is enabled.

and this is the api side code for GET this data:

  def index
if params[:callback]
  render json: {data: {:users => User.all.to_json}, :callback => 
params[:callback] }
  # format.js { render :json => {:users => Users.all.to_json}, 
:callback => params[:callback] }
else
  render json: User.all
end
# render json: User.all.paginate(:page => params[:p], :limit => 
params[:per])
  end

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] problem compile templete in ie11.

2014-10-30 Thread DErek DErekZ
We have done the search results on angularjs 

http://об3.онлайнбилет.рф/search/#searchID=0bcd4397-27a3-43d0-bdae-96bf7e8f66d4 


If the load page for the first time no problem. 
but if it is to reboot the whole template will be filled with variables 
in brackets {{}} (screen http://joxi.ru/gV2VneN9TRNB2v ). 
If you close the browser and reopen the same link all appear normal. Well, 
after 
rebooting again will parentheses. 
and one more thing if output via ng-bind it corrects the situation, but would 
not want to rewrite the entire pattern on ng-bind. 
This problem only occurs in ie11. 
Please who can, any tips and suggestions. 
Thank you.

ps: Sorry for my english, google translate

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Is $scope.$watch too inefficient for this use case?

2014-10-30 Thread keybored
Hi I'm fairly new to to Angular development and I wanted to know if 
something I'm going is the the most efficient and not likely to cause any 
trouble down the road. If this is the wrong place for this kind of question 
I apologize and if you could point me to the right place I'd appreciate it.

The site uses Angular's client-side routing. A requirement of the project 
is that all the body text for the site be served from a flat json file. For 
most of the site this is not a problem. The main index file hits the 
IndexController and fetches the file in the following way:

TextFactory.get.query(function (response) {
$scope.textDump= response;
});

This gets the site's text on initial page load and then as the browser gets 
routed around the site it doesn't have to make the $request call ever again 
to continue using the text. On one of the pages (privacy policy) there is 
an expectation to be able to insert html formatting directly in the json 
file. To support this I'm doing the following the terms of service 
controller:

app.controller('TermsOfServiceController', ['$scope', '$sce', function 
($scope, $sce) {
$scope.$watch("textDump.tos", function (new_val, old_val) {
   if (angular.isDefined(new_val)) {
  $scope.pageContent = $sce.trustAsHtml($scope.textDump.tos);
   }
});
}]);

I had to do this because there was a race condition where textDump.tos had 
not yet received the json file from the CDN by the time the 
TermsOfServiceController tried to use it. Are there any caveats to this 
approach that I should be aware of? Is there a better way to achieve the 
same result? 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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Way to remove $promise and $resolved properties from all resource responses?

2014-10-30 Thread 'Michael Bielski' via AngularJS
Hmm... you do make a valid point. The only argument that I could even try 
to put up would be readability, and even that is a weak one. I'll have to 
look at doing it that way and see where else we can make improvements. 
Thanks Kyle.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: AtScript and generators

2014-10-30 Thread Sander Elias
Hi Kyle,

I get your sentiment. It is indeed sad that none of those languages added 
support for annotations and/or introspections. 
Types are more or less solved in a couple of them.
However, I'm glad they decided to go this direction. It will not force any 
of us to use an language you do not want.
I do like the stuff that will be available in AtScript, and I would be more 
then happy to use it. Well, once the run-time
library for tracuer is less demanding/not needed anymore.

Regards
Sander

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Way to remove $promise and $resolved properties from all resource responses?

2014-10-30 Thread Kyle Cordes
On Thu, Oct 30, 2014 at 9:44 AM, 'Michael Bielski' via AngularJS <
angular@googlegroups.com> wrote:

> Yes, we are aware of that. We did it this way so that we could do any
> other processing that we needed to the data before it is sent back. I
> should have explained that, sorry.
>
>
It certainly works to make the new promise as you did in your example. I
believe the more idiomatic way to post processed the data using promises is
to chain it more like this though.

function doSomething() {
  return myResource.query().$promise.then(data) {
return someProcessingOf(data);  // gets wrapped for you.
  };
}

I don't mean to sound like I'm saying how the code has to be written. It is
an API, it can be used in 1000 different ways. I've just made it my
personal mission to notice when people are needlessly writing extra lines
of code around promises, and to point out how changing works so that they
can use it if they like :-)


-- 
Kyle Cordes
http://kylecordes.com

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: AtScript and generators

2014-10-30 Thread Kyle Cordes
On Thu, Oct 30, 2014 at 9:35 AM, Richard Seldon  wrote:

> Hi Kyle,
>
> AtScript is NOT about building a new language.
>
> Miško Hevery does address this concern right away in his Keynote on
> AtScript at ng-europe 2014:
>
> https://www.youtube.com/watch?v=lGdnh8QSPPk&feature=youtu.be
>
> It is more an attempt to predict and create the future direction for JS
> (using "proven concepts and syntax" from Dart, TypeScript, and ES6).
>
> The goal is extend existing JS so we can build even better apps, but also
> support current eco-systems.
>
>
It is yet another new extension/variation of JavaScript. Perhaps with ideas
that might end up in a future ESn. See below about the human language we
used to talk about computer languages.



On Thu, Oct 30, 2014 at 9:40 AM, Sander Elias  wrote:

> Hi Kyle,
>
> Don't be sad.
> The main reason they did not pick any of those, is that they all stray
> (more or less) away from JavaScript.
> As Misko said it, they are NOT making a new language. They are just adding
> a few extension to JS. And probably
> those extensions will probably end up in the language anyway.
>
>
I am not sad; and I have looked at numerous built-over-JS languages. Many
are wildly different than JS (like one I use, ClojureScript). Many, many
others are extensions/supersets of JS. I am not picky about the language
used to described these maybe-languages; but this is "not a new language"
in the same sense that 100 others on that list are not a new language. I've
been describing both types as "new language".

I like these extensions, I am just disappointed that none of the highly
numerous other extensions was good enough to adopt.


-- 
Kyle Cordes
http://kylecordes.com

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angularjs issue - $http.get not working and changed into OPTIONS - Cross domain

2014-10-30 Thread amadese
 
 
For persons who encounter the same problem, I found a solution by using the 
XDomain  third-party library. You have 
to implement a proxy.html file on the remote server where the service is 
located, and call the file in a script tag in the main application.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: [angular.js] AngularJS as Meteor Package?

2014-10-30 Thread Uri Goldshtein
Here is the updated angular-meteor package: 
https://github.com/Urigo/angular-meteor

We also released a tutorial: http://angularjs.meteor.com/tutorial


On Saturday, September 1, 2012 5:08:33 AM UTC+3, Adam Webber wrote:
>
> Hi,
>
> I took some time to have a play with this - this is really great stuff!
>
> The leaderboard example worked with only a minor modification (added body 
> tag to angular.html, I'm using Windows not *nix/OSX so that may be 
> relevant).
>
> Folks might like to compare the Leaderboard example done in 
> Meteor+AngularJS vs vanilla AngularJS
> Meteor+AngularJS 
>
> https://github.com/lvbreda/Meteor_angularjs/tree/master/examples/leaderboard
>  
>
> Vanilla meteor:
> https://github.com/meteor/meteor/tree/master/examples/leaderboard 
>
> On Wednesday, 15 August 2012 11:14:29 UTC+10, Lander van Breda wrote:
>>
>> Hi,
>>
>> This is a gravedig at its best. But I started writing an implementation 
>> for Angularjs to Meteor.
>> At the moment it works... Tweaks will come soon.
>>
>> https://github.com/lvbreda/Meteor_angularjs
>> Lander Van Breda
>>
>> On Wednesday, April 11, 2012 8:25:23 PM UTC+2, Igor Minar wrote:
>>>
>>> I just finished watching the screencast. It looks very interesting.
>>>
>>> Does someone from the community have a bandwidth to look into this?
>>>
>>> /i
>>>
>>> On Wed, Apr 11, 2012 at 11:17 AM, Darius Riggins  
>>> wrote:
>>>
 I was watching the screencast for Meteor, and noticed they have a 
 package for Backbone, and checked and didn't see one for Angular. It seems 
 like it would be a great selling point to add it early for people adopting 
 it, seems like there are a lot of similar use cases and the integration 
 might be awesome. Do you have any thoughts on if this is something the 
 project might be interested in doing? 

 -- 
 You received this message because you are subscribed to the Google 
 Groups "AngularJS" group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/angular/-/ccrEyt7EmoQJ.
 To post to this group, send email to ang...@googlegroups.com.
 To unsubscribe from this group, send email to 
 angular+u...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/angular?hl=en.

>>>
>>>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Angular vs Meteor

2014-10-30 Thread Uri Goldshtein
I don't see it as Meteor vs Angular but more of a complementary solutions.

Our team wrote a repo (with the help of many others) to help support 
working with both of them together: https://github.com/Urigo/angular-meteor

We also released a tutorial: http://angularjs.meteor.com/tutorial

Would love to hear your thoughts on that approach

On Tuesday, October 21, 2014 5:41:45 PM UTC+3, Chris Rhoden wrote:
>
> If you want a framework with persistence built in, use meteor.
>
> Angular is for building rich client applications, and has literally 
> nothing to say about the server.
>
> On Tue, Oct 21, 2014 at 9:37 AM, António Ramos  > wrote:
>
>> Hello i read some pro/cons about these 2 but i´m choosing meteor because 
>> it has persistence included.
>> With angular i´m lost and found only a simple persistence api (
>> www.deployd.com) 
>> but deployd is somewhat DEAD!
>>
>> and meteor has all of that included. I dont need to learn new stuff
>>
>>
>> I need some advice because i really like angular but dont want to waste 
>> too much time learning how to store data in the server.
>> And firebase is not an alternative in my case.
>>
>> Regards
>> António
>>
>> -- 
>> 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+u...@googlegroups.com .
>> To post to this group, send email to ang...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> chrisrhoden 
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Way to remove $promise and $resolved properties from all resource responses?

2014-10-30 Thread 'Michael Bielski' via AngularJS
Yes, we are aware of that. We did it this way so that we could do any other 
processing that we needed to the data before it is sent back. I should have 
explained that, sorry.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: AtScript and generators

2014-10-30 Thread Sander Elias
Hi Kyle,

Don't be sad.
The main reason they did not pick any of those, is that they all stray 
(more or less) away from JavaScript.
As Misko said it, they are NOT making a new language. They are just adding 
a few extension to JS. And probably 
those extensions will probably end up in the language anyway.

Regards
Sander

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: AtScript and generators

2014-10-30 Thread Richard Seldon
Hi Kyle,

AtScript is NOT about building a new language. 

Miško Hevery does address this concern right away in his Keynote on AtScript at 
ng-europe 2014:

https://www.youtube.com/watch?v=lGdnh8QSPPk&feature=youtu.be

It is more an attempt to predict and create the future direction for JS (using 
"proven concepts and syntax" from Dart, TypeScript, and ES6).

The goal is extend existing JS so we can build even better apps, but also 
support current eco-systems. 

The type system argument is mostly around scalability…  yeah, not my favourite 
aspect of what is being proposed but reluctantly do see the benefits 
(especially around tooling and reading others code).

Best regards,

Richard.



On 30 Oct 2014, at 23:20, Kyle Cordes  wrote:

> On Wed, Oct 29, 2014 at 1:42 AM, Sander Elias  wrote:
> Oran,
> 
> Oh, BTW, the list of languages that compile to JS is quite a bit longer then 
> just those few ;)
> https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js
> 
> 
> It saddens me a bit, that as long as this list is, apparently none of them 
> were sufficient for Angular 2.0's needs.
> 
> 
> -- 
> Kyle Cordes
> http://kylecordes.com
> 
> 
> -- 
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: AtScript and generators

2014-10-30 Thread Kyle Cordes
On Wed, Oct 29, 2014 at 1:42 AM, Sander Elias  wrote:

> Oran,
>
> Oh, BTW, the list of languages that compile to JS is quite a bit longer
> then just those few ;)
>
> https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js
>
>
It saddens me a bit, that as long as this list is, apparently none of them
were sufficient for Angular 2.0's needs.


-- 
Kyle Cordes
http://kylecordes.com

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Way to remove $promise and $resolved properties from all resource responses?

2014-10-30 Thread Kyle Cordes
On Tue, Oct 28, 2014 at 9:23 AM, 'Michael Bielski' via AngularJS <
angular@googlegroups.com> wrote:

> I can't speak for the OP, but we abstracted the inner workings of the
> $resource away by putting them into a service and wrapping every resource
> call in $q. Something like this:
>
> function doSomething(){
>  var defObj = $q.defer();
>
>  var Promise = myResource.query();
>  Promise.$promise.then(function(data){
>  defObj.resolve(data);
>  });
>
>  return defObj.promise;
> }
>
>
In this code, Promise.$promise is already a promise that resolves to the
right thing. What you are getting by creating a new promise around it? You
could replace the above with:

function doSomething() {
  return myResource.query().$promise;
}

This also solves the original problem, of wanting to return a promise
instead of an object with $promise in it.


-- 
Kyle Cordes
http://kylecordes.com

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Replace \n with newLine

2014-10-30 Thread Carlos Mantilla
You can use RegExp.

On Thu, Oct 30, 2014 at 1:34 PM, Sasikumar Veeraiah  wrote:

> Is there any simple method to replace more than one characters in the same
> string ?
>
> Thanks & Regards,
> Sasikumar.V
>
> On Wed, Oct 29, 2014 at 12:39 PM, Sander Elias 
> wrote:
>
>>
>> https://www.google.nl/search?q=Replace+%5Cn+with+newLine&oq=Replace+%5Cn+with+newLine&aqs=chrome..69i57&sourceid=chrome&es_sm=93&ie=UTF-8#safe=off&q=Replace+%5Cn+with+newLine+javascript
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to angular@googlegroups.com.
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Replace \n with newLine

2014-10-30 Thread Sasikumar Veeraiah
Is there any simple method to replace more than one characters in the same
string ?

Thanks & Regards,
Sasikumar.V

On Wed, Oct 29, 2014 at 12:39 PM, Sander Elias 
wrote:

>
> https://www.google.nl/search?q=Replace+%5Cn+with+newLine&oq=Replace+%5Cn+with+newLine&aqs=chrome..69i57&sourceid=chrome&es_sm=93&ie=UTF-8#safe=off&q=Replace+%5Cn+with+newLine+javascript
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angular scope (and performance)

2014-10-30 Thread Sander Elias
Hi John,

First of all, perhaps it's a good idea to debounce 
the user input. 
this will reduce the number of times a digest cycle will kick in.
If you have thos other controllers active, and if you have watched in 
there, there isn't much that can be done about that.
However, I suspect that most of the watches you are talking about are in 
the template.
Am I right if you use ng-Show to show/hide parts of your apps interface? 
Replace those with ngIf if possible, and
the parts that are not shown, will be taken out of the DOM. at witch point 
they will stop watching your model.

Does this help a bit?

Regards
Sander

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Is it a bad style to use controllers' 'prototype' inheritance (please add this info to docs)

2014-10-30 Thread Maryan Bahnyuk
Thank you for suggestion, Jens

As I understand:
1) each service should extend $scope of controller by adding the 
appropriate methods - there is no need to use JavaScript prototypes at all 
- all methods should be added to $scope
2) it is a 'good style' if one service adds several methods to $scope (I 
mean that there is no need to create a separate service for each similar 
method)

Please correct me if I'm wrong.

On Wednesday, October 1, 2014 5:46:51 PM UTC+3, Jens Melgaard wrote:
>
> Use Composite Reuse Principle instead: Create a Service that does the 
> work, share that service. 
>
> On Wednesday, October 1, 2014 12:07:27 PM UTC+2, Maryan Bahnyuk wrote:
>>
>> Dear Witold
>>
>> On Wednesday, October 1, 2014 10:40:55 AM UTC+3, Witold Szczerba wrote:
>>
>>> From OO perspective, it is a bad idea to use inheritance for code reuse 
>>>
>> IMHO it's much better then just copying the same code from one controller 
>> to another. And inheritance in this case allows not to duplicate code in 
>> two controllers (moreover in 2+ controllers).
>>
>>
>> On Wednesday, October 1, 2014 10:40:55 AM UTC+3, Witold Szczerba wrote:
>>
>>> Also, it is a static linking, so you cannot mock/replace those methods 
>>> in a straightforward way if you need it.
>>>
>> Sorry for possible misunderstanding but I can mock/replace those methods 
>> by changing them on-fly or by making 'hooks'... From another point of view 
>> I do not need this and it's a subject of another discussion :)
>>
>>
>> On Wednesday, October 1, 2014 10:40:55 AM UTC+3, Witold Szczerba wrote:
>>
>>> Sometimes it might be pragmatic to use inheritance, so there is no clear 
>>> "STOP" sign. 
>>>
>> IMHO it's the best way to fix my 'issue' of duplicating code. The main 
>> question is "Does AngularJS have any restrictions regarding such usage or 
>> not?".
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Angular scope (and performance)

2014-10-30 Thread John Eakin
Hello,
I have a single page MVC web application that contains multiple panels.
Each panel has its own controller and scope.

If we have a textbox bound to a model in a single panel, I don't want each 
key press to be "watched" by other panel controllers.
Is it possible to configure this so that any text entered into the textbox 
will just affect the controller it is contained within, and watchers from 
other controllers won't check this? (therefore improving performance)

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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] How to Work with promise return values

2014-10-30 Thread OmPrakash P
Hi,

I am using bellow code to return value.

var flag = true;
var data = function(dataFlag) {
return dataFlag.then(function(text) {
if (text == true) {
return true;
} else {
console.log(text);
return false;
}
});
};

if (data(data1) == false) { // Here data(data1) getting as object
flag = false;
}
if (data(data2) == false) {
flag = false;
}
if (data(data3) == false) {
flag = false;
}

return flag;


How to handle this code ?

Regards,
Om Prakash

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] es6 type hinting?

2014-10-30 Thread Tony pee
looks like this is finally answered with the release of information about
atScript ;P

On 25 April 2014 03:52, Mark Volkmann  wrote:

> I don't believe Traceur supports that.
>
> You'd have better luck getting a response to ES6/Traceur questions here:
> es-disc...@mozilla.org.
>
>
> On Fri, Apr 25, 2014 at 3:21 AM, Tony pee  wrote:
>
>> this mailing list is bawwls. everytime i post.. crickets..
>>
>>
>> On 23 April 2014 11:14, Tony pee  wrote:
>>
>>> So currently is this a feature of traceur? cant seem to find how this
>>> code works
>>>
>>>
>>> On 23 April 2014 01:44, KamBha  wrote:
>>>
 I don't know how if it will make it in es 6, but es.next does have a
 proposal that matches that syntax:
 http://wiki.ecmascript.org/doku.php?id=strawman:guards

 I have not seen anything about how one defines a guard. I assume it is
 whatever matches the instanceof for that class.

 The real question is will there ever be a version of JS with
 annotations? I don't see any proposal on the ecmascript wiki about
 annotations (which is a little surprising as annotations would solve a lot
 of problems in angular and other applications).

 Kamal.

 --
 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+unsubscr...@googlegroups.com.
 To post to this group, send email to angular@googlegroups.com.
 Visit this group at http://groups.google.com/group/angular.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> --
>>> Tony Polinelli
>>>
>>>
>>
>>
>> --
>> Tony Polinelli
>>
>>  --
>> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to angular@googlegroups.com.
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> R. Mark Volkmann
> Object Computing, Inc.
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Tony Polinelli

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.