[AngularJS] Re: Reusable Angular components which can be used any platform or technology

2017-06-08 Thread Sander Elias
Hi Naga,

I think in your case, the custom elements, in combination with template 
strings (or even template files you ajax in) are the way to go. You can set 
up your CE's so they work well in combination with Angular. Make sure you 
use getters/setters for proerties, to make sure they work well with 
angular. If you want, you can even let them mimic @input/@output behaviour.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Reusable Angular components which can be used any platform or technology

2017-06-08 Thread Sander Elias
The current problem with custom elements is browser support (Chrome only, 
rest needs polyfills) Web components isn't really a thing. And yes, you 
sample shows a custom element. 
Template strings may come in handy if you go for using CE. 
If you find a better solution, please share it with us.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: How to use data from controller in directive

2017-06-08 Thread Tito
wow! Thank you so much Sander!

This helped out big time. I had totally forgotten this gem of info for 
directives and much more!

On Wednesday, June 7, 2017 at 9:47:38 PM UTC-7, Sander Elias wrote:
>
> Hi Tito,
>
> 1. don't use replace unless you really have no other option. This has been 
> deprecated for ages!
> 2. try to avoid $scope as much as possible, read the styleguide 
> !
> 3. if you use the controlleAs property on your directive, you can grab 
> this from its parent.
> 4. switch to .components This makes your life a lot easier.
>
> Regards
> Sander
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Reusable Angular components which can be used any platform or technology

2017-06-08 Thread Naga Sai A
Thanks Sander for the help

Yes, I am facing integration issues with polymer webcomponent with Angular2.

Custom elements that you are referring, is it native javascript web 
componets as below

class HelloElement extends HTMLElement {
  // Monitor the 'name' attribute for changes.
  static get observedAttributes() {return ['name']; }

  // Respond to attribute changes.
  attributeChangedCallback(attr, oldValue, newValue) {
if (attr == 'name') {
  this.textContent = `Hello, ${newValue}`;
}
  }}
// Define the new element
customElements.define('hello-element', HelloElement);





Currently trying with native HTML, javascript, CSS, as I gave up using 
polymer with Angular 2 for now.

And also exploring other options for webcomponents just to create reusable 
HTML templates



On Thursday, June 8, 2017 at 1:46:25 AM UTC-5, Sander Elias wrote:
>
> Hi,
>
> For now, I would use Custom Elements, with a couple of polyfills. I would 
> not use polymer. While I like polymer on its own, it has its own set of 
> issues. In most cases Polymer and Angular work quite well along with each 
> other, but there are more edge-cases as you might expect. Solving those 
> turns out to be not as easy. 
>
> Be aware, that there are known flaws in those polyfills. Not big one's but 
> in highly specialised cases those might bite.
>
> Regards
> Sander
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Angular 2 : Unit testing

2017-06-08 Thread Tarik en nakdi


**HELLO EVERYONE; I am trying to use unit test locally for my project and I 
am kind of stuck and I need some examples or any good tutorials if that 
will help. I am using angular 2 with *sequelizeJS* and an sql database and 
for testing enviroment i am using *GULP *as a test runner and *JASMINE* as 
a test framework ** Endpoint.ts file

if someone can show me how to test this sample of the code it will help me 
a lot to understand how to write unit tests


[[country(request: any, response: any, next: any) {
let query: any = url.parse(request.url, true).query;
let region = decodeURI(query.region);

let carDataType = decodeURI(query.carDataType);
let aggregatedResult = null;
if (carDataType.toLowerCase().indexOf('sales') >= 0) {
aggregatedResult = Sales.aggregate('country', 'DISTINCT', {plain: 
false, where: {region: region}});
} else {
aggregatedResult = Production.aggregate('country', 'DISTINCT', {plain: 
false, where: {region: region}});
}

aggregatedResult.map(res => {
return res['DISTINCT']
}).then((suggestion: any) => {
console.log(suggestion);
response.send(suggestion);
}).catch(error => {
response.status(500).send(error);
next(error);
});}]]

Any one that can help me?

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Is angular js service creates multiple instances...as its a constructor function ?

2017-06-08 Thread Sander Elias
Hi B,

I don't think so, but it's possible to make it that way. Depends on your 
code. If you provide some content and context, I can give you a more 
helpful answer.

Regards
Sander


-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: AngularJs Iframe Issue

2017-06-08 Thread Sander Elias
Hi Ranjith,

You are the first to report this! Can you provide a sample, then we can 
make an issue!

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: ngRoute in AngularJs cache Template. No reaction on changes

2017-06-08 Thread Sander Elias
Hi Andy,

Have a look at $templateCache 
. Also, the most 
builds will have something that bundles the templates into the JS.  When 
that is done, you still see the HTTP-call, but it's actually not fetched 
from the server but from JS. Don't ask me how that works, I never looked 
into it. This http-call might even happen if you use $templateCache. 

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angularjs support !

2017-06-08 Thread Sander Elias
Hi Sansa,

What kind of support are you looking for? There will be support from Google 
as long as it's still in active use by Google itself. When that ends, there 
will be enterprises that take over, for the same reason. It's all OSS, so 
even if there is no enterprise support, the AngularJS repo will be taken 
care for a long time to come. Also, AngularJS is a stable project, and its 
development is done. There is not much you can still add and most bugs are 
fixed already, so the need for support on angular itself will slowly 
cease(this is already happening!) to well, not nothing, but there will be 
little resources needed to keep it up.
There are still some future plans there, I suspect we will still see a 1.7, 
and probably even a 1.8 Most of what those versions will bring is more 
stability, and aid migration/extendability  to/for Angular, for those who 
want/need that.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


Re: [AngularJS] Re: Best AngularJS Training at Mindmajix

2017-06-08 Thread John Maxwell
On 06/08/2017 02:27:10 AM, Sander Elias wrote:
> I'm inclined to mark this as spam, unless you can convince me it's
> not?
> 

+1 for spam marking.

--
John Maxwell  KB3VLL  j...@jmaxhome.com

Nihilism is best done by professionals.
-Iggy Pop

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Reusable Angular components which can be used any platform or technology

2017-06-08 Thread Sander Elias
Hi,

For now, I would use Custom Elements, with a couple of polyfills. I would 
not use polymer. While I like polymer on its own, it has its own set of 
issues. In most cases Polymer and Angular work quite well along with each 
other, but there are more edge-cases as you might expect. Solving those 
turns out to be not as easy. 

Be aware, that there are known flaws in those polyfills. Not big one's but 
in highly specialised cases those might bite.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Best AngularJS Training at Mindmajix

2017-06-08 Thread Sander Elias
I'm inclined to mark this as spam, unless you can convince me it's not?

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Best AngularJS Training at Mindmajix

2017-06-08 Thread Aarusha
AngularJS Training is formulated to make the trainees understand the 
structure of journey for building an application by designing the UI, 
through writing the business logic, and to testing. AngularJS consist of a 
toolset for building the framework for application development, such as 
directives, expressions, filters, modules, and controllers.

AngularJS is an open-source web application framework maintained by Google 
and by a community of individual developers and corporations to address 
many of the challenges encountered in developing single-page applications. 
It aims to simplify both the development and the testing of such 
applications by providing a framework for client-side model–view–controller 
(MVC) and model-view-viewmodel (MVVM) architectures, along with components 
commonly used in rich Internet applications. 

AngularJS is built on the belief that declarative programming should be 
used to create user interfaces and connect software components, while 
imperative programming is better suited to define an application’s business 
logic. The framework adapts and extends traditional HTML to present dynamic 
content through two-way data-binding that allows the automatic 
synchronization of models and views.

Attend free demo here! https://mindmajix.com/angularjs-training

*Contact Info:*

USA : +1 201 378 0518 

INDIA: +91 92463 33245 

E-mail: i...@mindmajix.com


-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.