AngularJS is not working

1

Why sometimes, when we call the angular, it does not work? See my HTML

<!DOCTYPE html>
<html ng-app='weset'>
<head>
<title>WESET</title>
<meta charset="utf-8">

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.2/angular.min.js"></script><linkrel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

</head>
<body>
    <div class="container">
        <div class="row login">
            <div class="col-md-4"></div>
            <div class="col-md-4">{{3+4}}
            <form name="formLogin">
                <label>Email</label>
                <input class="form-control" type="text" name="email" ng-mmodel="usuario.email">
                <label>Senha</label>
                <input class="form-control" type="password" name="senha" ng-mmodel="usuario.senha">
                <a class="btn btn-primary" ng-disabled="formLogin.$invalid" ng-click="logar(usuario)">Logar</a>
            </form>
            </div>
            <div class="col-md-4"></div>
        </div>
    </div>

    <script src="js/jquery-3.1.1.min.js"></script>
</body>
</html>

That {{3 + 4}} should appear as 7 when I scroll the page, but that does not happen, so I know the angle is not working.

    
asked by anonymous 23.02.2017 / 13:23

1 answer

7

Every Angle app needs the ng-app directive to work, in it you reference the module you created to represent the application.

Since AngularJS does not define a method for the start of the application. It is the creation of the module that defines how your application will be initialized, what dependencies it is, etc.

I also do not see any controllers in the example given.

Here is an example of your functional code.

angular.module('myApp', []);

angular.module('myApp').controller('mainController', mainControllerFn);

function mainControllerFn(){

}
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script><divclass="container" ng-app="myApp">
  <div class="row login" ng-controller="mainController">
      <div class="col-md-4"></div>
      <div class="col-md-4">{{3+4}}
      <form name="formLogin">
          <label>Email</label>
          <input class="form-control" type="text" name="email" ng-mmodel="usuario.email">
          <label>Senha</label>
          <input class="form-control" type="password" name="senha" ng-mmodel="usuario.senha">
          <a class="btn btn-primary" ng-disabled="formLogin.$invalid" ng-click="logar(usuario)">Logar</a>
      </form>
      </div>
      <div class="col-md-4"></div>
  </div>
</div>
    
23.02.2017 / 13:29
PHP - How to make a GET pull an include? ___ ___ verify erkimt registered user PHP Mysqli ______ qstntxt ___

Hello, I do not understand almost anything about Php and mysqli. I am trying to implement the system of users for the site, the registry is already working but I can register with the same email as many times as I want. How do I check if email already exists in BD?

So far I only have this, "index.php" form,

config.php (connects to the database);

controlindex.php (sending the values to the DB table)

%pre%     
______ azszpr166619 ___
%pre%     
______ azszpr166456 ___

Just check if a user already exists with the last email

%pre%

You should prevent SQL injection in your code, the way it is written SQL can be easily injected, has an explanation of how to prevent.

    

___