I have created this html element using php :
echo
"<button
type ='button' class='login-btn login'
onclick = 'location.href='#!login';'>
Login
</button>";
and when I click on it I want to get redirected to a login page using angularJS . If it is a regular html element it works succesfully but since I modify the '' , " " to create it with php my link does not work .
I get the error :Uncaught SyntaxError: Unexpected end of input for location.href
This is my angularJS file for a more detailed view :
angModule.js
const app = angular.module("myApp" , ["ngRoute"]);
app.config(($routeProvider)=>{
$routeProvider
.when("/" , {templateUrl:"main.php"})
.when("/login" , {templateUrl : "login.php"})
.when("/register" , {templateUrl : "register.php"});
});
I would appreciate your help .