Good morning this is my index.html
<!DOCTYPE html>
<html ng-app="crudBasicApp">
<head>
<title>CRUD Angular!</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="Content/bootstrap.css" />
</head>
<body ng-controller="IndexController">
<h1 class="text-center">{{TitleApp}}</h1>
<div>
<button ng-click="Click()" class="btn btn-danger">Dar clic please</button>
</div>
<a href="#about">About</a>
<a href="#home">Home</a>
<div ng-view></div>
<script type="text/javascript" src="Scripts/angular.min.js"></script>
<script type="text/javascript" src="js/Config.js"></script>
<script type="text/javascript" src="Scripts/angular-route.min.js"></script>
<script type="text/javascript" src="js/app/IndexController.js"></script>
this is my config.js
var CRUDBasico = angular.module('crudBasicApp', ['ngRoute']);
//var CRUDBasico = angular.module('crudBasicApp', []);
CRUDBasico.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'Views/About.html'
})
// route for the home page
//.when('/home', {
// templateUrl: 'Home.htm'
//})
// route for the about page
.when("/home", {
templateUrl: 'Views/Home.html'
});
});
and this my indexController
CRUDBasico.controller('IndexController', function ($rootScope, $scope, $http) {
$rootScope.TitleApp = 'Angular Basic CRUD';
$rootScope.pageIncludeTitle = 'Esta página esta incluida';
$scope.Click = function () {
};
});
The strange thing is that it wants to work with single page but when I click to change the page it stays in this URL http://localhost:52252/#!/#home
, it does not change and the console does not get any error.