TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Junaid Syed
NA
485
130.6k
How can i redirect to other page using angularjs
Nov 2 2017 2:48 AM
Hi iam using angularjs1 when im trying to redirect my page to another page using "ng-click"
its not getting redirected.My code is some thing like this.
<input type=
"submit"
ng-click=
"clicked()"
value=
"Addstudent"
/>
SCRIPT:
$scope.clicked =
function
() {
$location.path(
"/AngularProject/Addstudent"
);
}
when i click Addstudent button my url is changing to some thing like this.
http:
//localhost:56120/#!/AngularProject/Addstudent
iam getting extra signs "#!" in my url.if i remove that sign from url its' getting redirect to destination page.
which is the better way to reditect the page $location.path or $windows.location.
please help me out...Thank you.
Reply
Answers (
2
)
Angular2 of custom directive
Angular 4- Adding Custom Bootstrap CSS