i actually work on a mean Stack project using angularJs and nodejs but i'm stuck on the use of ng-show , ng-hide and ng-hide
so here is my index.html:
<body ng-app="app">
<div ng-controller="loginController" ng-init="logged='false'" >
<div class ="login" ng-hide="logged">
<h3>Connexion </h3>
<form action="" method="get">
<label for="pseudo">Pseudo</label>
<input type="text" name="pseudo">
<label for="pwd">Mot de passe</label>
<input type="password" name="pwd">
<input type="submit" ng-click="auth()" value="Connexion">
</form>
</div>
</div>
<div class="kuiz" ng-show="logged">
{{ name }}
</div>
</body>
app.js
/// reference path = "angular.min.js" />
var myApp = angular.module('app', []);
myApp.controller('logincontroller',
function($scope,$http){
$scope.auth = function(data){
$scope.logged = true;
$scope.name= "lyes";
}
});
as you can see i'm trying to do authentication but actually i just want show authentication form and hide it after authentication.
ps:i included all necessary files.
i'm getting these errors in my browser inspector
Refused to apply style from 'http://localhost:3116/main.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Failed to load resource: the server responded with a status of 404 (Not Found)