Buenos días este es mi index htmlindex.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>
este es mi config.js
var CRUDBasico = angular.module('crudBasicApp', ['ngRoute']); //var CRUDBasico = angular.module('crudBasicApp', []);
CRUDBasico.config(function ($routeProvider) {
$routeProviderconfig.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'
});
});
});
y este mi indexController
CRUDBasico.controller('IndexController', function ($rootScope, $scope, $http) {indexController
CRUDBasico.controller('IndexController', function ($rootScope, $scope, $http) {
$rootScope.TitleApp = 'Angular Basic CRUD';
$rootScope.pageIncludeTitle = 'Esta página esta incluida';
$scope.Click = function () {
};
});
});
lo extraño del caso es que quieroquiere funcionar con single page pero cuando doy clic paracambiarpara cambiar la pagina se queda en esta URL http://localhost:52252/#!/#home perohttp://localhost:52252/#!/#home
, no cambia y la consola no saca ninguningún error por favor ayuda!.