2
I’m trying to link. I’m working with Angularjs and did the route setup part. I have a views folder with html files.
Follows the codes:
<html ng-app="fluxo">
<head>
<title>Fluxojoin</title>
<meta charset="utf8">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
<script type="text/javascript" src="js/angular-route.js"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/fj.css">
<script>
angular.module("fluxo", ["ngRoute"]);
angular.module("fluxo").controller("fluxoCtrl", function ($scope, $http) {
angular.module("fluxo").config(function ($routeProvider) {
$routeProvider.when("/entradas", {
templateUrl: "views/entradas.html"
});
});
});
</script>
</head>
<body ng-controller="fluxoCtrl">
<div ng-include="'views/links.html'"></div>
<div ng-view></div>
</body>
</html>
File entries.html
<link rel="stylesheet" type="text/css" href="css/fj.css">
<div class="jumbotron" align="center">
<form name="contaEntradasForm">
<input class="form-control" type="text" ng-model="" placeholder="Nome">
<input class="form-control" type="text" ng-model="" placeholder="Email">
<input class="form-control" type="text" ng-model="" placeholder="Senha">
</form>
</div>
That’s right @Eduardomartins! It worked. I have to put the route part before and outside the controller part. Thanks.
– GustavoSevero