[AngularJS] Re: set focus on a specific dynamically input on keydown

2017-01-11 Thread Sander Elias
Hi Esa,

Usually, messing with the focus order in this way is frowned upon. It's 
better to let the browser handle that. There is a whole slew of 
usability issues concerned with this.

Have a look at the solution I created here 
 for you. It's entirely in 
ES6, if you need to support old browsers, you can compile it down using 
babel or typescript.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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] Construct a full URL for a route, with params, for use in launching a new browser tab

2017-01-11 Thread Brian Kotek
I've got a project where users need to be able to load an app, then open 
new browser tabs to different routes in the same app (to allow placement of 
different tabs on multiple monitors).

Obviously, triggering a route change in the same browser tab is easy. But 
I've looked through the Router and Location classes and can't find 
something that would allow me to specify a route and any URL params and get 
back a full URL that I can use to open a new tab.

At first, I thought perhaps Location's prepareExternalUrl() method might do 
this, but it doesn't. Does anyone know if there's something buried in the 
API that will build a full URL string (including origin, port, etc.) for a 
given route and params? If not, I can probably build something to do this 
myself. I was just hoping there might be something built-in that I'm not 
seeing.

Thanks,

Brian

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: ngb-tabset with events(click) in angular2

2017-01-11 Thread Sander Elias
Hi Anil,


Did you define "callMyFunction" on the ngb-tab-title components controller? 
If not, the click is probably handled by the ngb tabs system.
you can add your own clickhandler inside a ngbTabTitle template like this:


 Profile
 


As documented in the excellent ngBootstrap documentation! 

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: Continue learn AngularJS 1, or Angular2 or even Angular4

2017-01-11 Thread Sander Elias
Hi Jake,

Angular 1 will be supported for a while longer. How long? Well, the core 
team promised at least as long as usage of 1.x is bigger as 2.x. And 
probably quite some time after that. I suspect at least 1.7 and perhaps 
even a 1.8. Those versions will be mostly geared towards aligning with 
Angular. (perhaps I have to do some explaining on that. Angular is the 
official name for everything after 2.x, Angularjs, or angular 1.x are used 
to point out the 1.x branch.)

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: upload video file using angular http (no plugin)

2017-01-11 Thread Sander Elias
Hi Jake,

This question is answered in the history of this group. Uploading a video 
is no different from uploading any other file. As videos are usually a tad 
larger as most uploads, you might consider a 3rth party, that supports 
splitting and resuming.  Although those are actually not that hard to write 
by yourself either.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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] ngb-tabset with events(click) in angular2

2017-01-11 Thread Anil Mathew
I am using "ngb-tabset" to display tabs in the angular2. I am trying to add 
an event to a tab like below:

 

 

 

I can't figure out why the above click function is not calling my function. 
Can someone please help?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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: Continue learn AngularJS 1, or Angular2 or even Angular4

2017-01-11 Thread Jake K.
Hello,

thanks for your answer.

I've been playing around with angular 1.6 for a bit. Will support for 
angular 1 still exist? (e.g. will there be any versions higher than 1.6 in 
the future?)

Thanks

On Tuesday, January 10, 2017 at 4:30:44 AM UTC-8, Sander Elias wrote:
>
> Hi,
>
> Just learn Angular. From version 2 on, there will no big changes. Some 
> stuff will get added, but no large shifts anymore. If you need to support 
> older products (read IE, or projects already build with Angular 1.x) it 
> might be worth investing some time on Angular 1.x. 
> Normally You just would learn the last version. If you are starting right 
> now, you can start at 4, there is no big change between that version and 
> the current 2.x, (or the future 5.0 version.
>
> Regards
> Sander 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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] upload video file using angular http (no plugin)

2017-01-11 Thread Jake K.
Hello,

I would like to know if there is a way to upload a video file (.mp4, or any 
other format)
using angular's $http, without using any third-party plugins.

We can assume that *url* is given and the browser supports the FormData 
object


Thanks!!




-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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] set focus on a specific dynamically input on keydown

2017-01-11 Thread Esa Yletyinen
I need to create a directive which sets focus on a specific (here, the 
next) dynamically input when a specific key (e.g. enter) is pressed. E.g.



I found this directive in the code created by the previous programmer 
working on my project, but it doesn't work with dynamically created inputs:

app.directive('enternextfocus', function() {
return {
restrict: 'A',
link: function(scope, elem, attr) {
elem.bind('keydown', function(event) {
var idx = scope.$eval(attr.enternextfocus);
var code = event.keyCode || event.which;
if (code === 13) {
var nextelem = 
document.querySelector('[enternextfocus="' + (idx + 1) + '"]');
if(nextelem !== null && nextelem !== undefined) {
event.preventDefault();
nextelem.focus();
}
}
});
}
};
});

Thank you!



-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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.