angularjs - UI-router redirect to different url? -
angularjs - UI-router redirect to different url? -
this might not possible, i'm going seek anyway. in website have couple of states defined ui-router
. 1 of these states should link domain. possible?
$stateprovider .state('index', { url: "/index", templateurl: "views/home.html", controller: "maincontroller", ncybreadcrumb: { label: 'home' } }) .state('about', { url: "/about", templateurl: "views/about.html", controller: "aboutcontroller", ncybreadcrumb: { label: 'about', parent: 'index' } }) .state('us', { url: "/us", parent: "about", views : { '@': { templateurl: 'views/us.html', }, } }) .when('contact', 'http://www.example.com')
ui router handling internal application url's. anyway can accomplish using script redirection.
$stateprovider.state('contact', { url: '/', template: 'redirecting...<script>window.location="http://www.example.com"</script>' });
angularjs angular-ui-router
Comments
Post a Comment