Short url

42 views
Skip to first unread message

Andrey Stegno

unread,
May 24, 2014, 1:35:00 PM5/24/14
to ang...@googlegroups.com
Hi all

Have task to apply short url to my current application for sharing

By default I have working version http://verylongname.com/cars/1232

But I want to create something like http://short.com/2Adsd4 and loads content from http://verylongname.com/cars/1232

I use route params everywhere which referencies to url state. So short url forces me to change all my $routeParams referencies.

And I know how but my solution is complex and ugly. 

Do you have well designed solution for that?




Adolfo Vazquez

unread,
Oct 8, 2014, 12:47:04 PM10/8/14
to ang...@googlegroups.com
Hey Andrey, did you find a solution for this?
 
Thanks! 

Alexander Karelas

unread,
Oct 8, 2014, 1:53:07 PM10/8/14
to ang...@googlegroups.com
Why not create a server-side script that will redirect the browser from http://short.com/2Adsd4 to
http://verylongname.com/cars/1232 ?

- Alex


--
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.

ASP.NET MVC Developer

unread,
Oct 8, 2014, 5:17:31 PM10/8/14
to ang...@googlegroups.com
Yes. Of course. I found

Easy answer is to:

Add routing with mask "/C" + ":car"

First char "C" is just example. You can use "U" for users, "C" for cars 

Then easy 

if ($routeParams.car) {
  //Logic
}


On Wed, Oct 8, 2014 at 7:47 PM, Adolfo Vazquez <adolfo....@gmail.com> wrote:
Hey Andrey, did you find a solution for this?
 
Thanks! 

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/_qvs7qrfFJY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

ASP.NET MVC Developer

unread,
Oct 8, 2014, 5:21:08 PM10/8/14
to ang...@googlegroups.com
I have server side script as well for first loading


--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/_qvs7qrfFJY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages