0
I took a page for maintenance and noticed the following error:
I suspect that the angular directories must be incorrect, but even when changing them and putting the link caught on the internet (CDN) apparently did not work. These variables on the left should be filled in!
I downloaded the CDN files and put them on my server:
<script src="js/bower_components/angular/angular.min.js"></script>
<script src="js/bower_components/angular-input-masks/angular-input-masks-dependencies.js"></script>
<script src="js/bower_components/angular-input-masks/angular-input-masks.js"></script>
Does anyone know what can help me solve this?!
<html ng-app="myApp">
<head>
<title>Parcelamento boletos</title>
<!--Ajax Libs-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"></script>
<script src="https://code.angularjs.org/1.2.28/angular-route.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.6.6/angular-locale_pt-br.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>
<!--Bootstrap e estilo Libs-->
<script src="js/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="js/bower_components/bootstrap/dist/css/bootstrap.min.css">
<link href='http://fonts.googleapis.com/css?family=Open Sans|Ropa Sans|Source Sans Pro|Oxygen Mono|Inconsolata|Droid+Sans|Telex' rel='stylesheet' type='text/css'>
<script src="js/bower_components/br_format.js"></script>
<!--Angular Libs-->
<script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-2.5.0.js"></script>
<script src="js/bower_components/angular/angular.min.js"></script>
<script src="js/bower_components/angular-input-masks/angular-input-masks-dependencies.js"></script>
<script src="js/bower_components/angular-input-masks/angular-input-masks.js"></script>
<!--Scripts Personalizados-->
<script src="config/plugins/parcela_pagamento.js?random=<?php echo rand(); ?>"></script>
</head>
<script>
var contrato_id = <?= $_GET['id']; ?>;
</script>
<body ng-controller="parcelaCtrl">
<div class="container jumbotron" style="height: 1000px;">
<form name="parcelaBoleto">
<div class="row text-center">
Cliente {{contrato.nome}} Id({{contrato.id}})
</div>
<div class="text-center">
<div class="row">
<div class="col-xs-4" style="text-align: right;">
<label for="desconto">Valor</label>
<br> {{contrato.valor | currency}}
</div>
<div class="col-xs-2" style="text-align: left;">
<label for="desconto">Parcela/Desconto</label>
<div class="row">
<select name="desconto" id="desconto" class="form-control"
ng-options='o as (o.parcelas +"x / %"+ o.desconto) for o in tipo_desconto'
ng-model="descont_type" ng-change="simulate(descont_type)">
<option value="">Selecione o pagamento</option>
</select>
</div>
</div>
<div ng-if="false" class="col-xs-4 form-group" style="text-align: left;">
<label for="desconto_manual"> Desconto ou Acrescimo Manual</label>
<input type="number" id="desconto_manual" class="form-control"
ng-disabled="!descont_type" ng-model="desconto_manual" ng-change="simulate(descont_type)">
ACRESC MAX( {{ desconto_minimo| currency }}) DESC MAX({{desconto_maximo | currency }})
<p ng-show="parcelaBoleto.desconto_manual.$error.nginvalid"> Valor De desconto invalido.</p>
</div>
</div>
<div ng-if="!enableSumbmit">
<div class="alert-danger" style="margin-left: 40%; margin-right: 40%;">
Valor nao pode ser lancado. Provavel Desconto Invalido.
</div>
</div>
<div class="row" ng-if="enableSumbmit">
O valor original e de {{valor_total | currency}} <br>
Adicionado ao desconto concedido pelo adiantamento {{desconto_padrao | currency }}<br><br>
O cliente pagara um valor unico de {{valor_com_desconto | currency}} equivalente as {{parcelas}}
parcelas<br>
<br>
<br>
<a ng-click="confirm()" class="btn btn-success center-block" ng-disabled="check_confirm()" ng-if="hide_confirm"
style="margin-left: 30%; margin-right: 30%;">Confirmar Lancamento de boleto</a>
</div>
<div class="text-center" ng-if="msg_de_retorno.confirma" style="margin-right: 30%; margin-bottom: 10%; margin-left: 30%;">
<div class="row" ng-if="msg_de_retorno.success">
<div class="alert alert-success">
{{msg_de_retorno.msg}}
</div>
</div>
<div class="row" ng-if="!msg_de_retorno.success">
<div class="alert-danger">{{msg_de_retorno.msg}}</div>
</div>
</div>
</div>
</form>
</div>
</body>
</html>
difficult to help without seeing the code.. can be an error in the module, controller, reference, many things put your js/html code in question
– Ricardo Pontual
I inserted the html script that generates the print page! The js part has a lot of private information, but it was working properly before, I didn’t touch it... If you have any idea...
– Christian Jorge
using the browser tool can see if all the scripts have been loaded? I didn’t see in your html a reference to a file. js where you should have the controller "parcelCtrl"
– Ricardo Pontual
This controller is in the script
parcela_pagamento.js
– Christian Jorge
Uncaught ReferenceError: module is not defined
 at angular-input-masks.js:3
this is being shown in the browser, may be influencing?– Christian Jorge
might be, it might be stopping execution was recently included that module? added its reference in angular modules?
– Ricardo Pontual
I think I figured it out! I traded him for
angular-input-masks-standalone.min.js
as https://github.com/assisrafael/angular-input-masks. The error is gone and the page has empty data... Now I will check some examples to see if it is working properly!– Christian Jorge
cool good... sometimes an error while loading a script breaks everything
– Ricardo Pontual
It is that I am beginner in Angular, I took this to tidy up without ever having touched... I only use pure Jquery and Ajax. Thanks for the help!
– Christian Jorge