I want to know if there is how to print a div
with text instead of a popup
from AngularJS to the HTML view.
So that you can understand me better this is my code:
ServCompEdu.servicioCompEdu($scope.cedula).success(function(data){
$scope.datosComp=data;
})
.error(function(data){
// Enves de este popup quiero imprimir algo como esto <p>Error al obtener los componentes educativos<p>
var alertPopup = $ionicPopup.alert({
title: 'Error al obtener los componentes educativos'
});
})
This is my HTML view:
<link href="css/style.css" rel="stylesheet">
<ion-view view-title="Componentes">
<ion-content>
<div class="list card">
<div class="item item-input-inset">
<label class="item-input-wrapper">
<h4>
PERÍODO ACADÉMICO: Oct/2015 - Feb/2016
</h4>
</label>
</div>
</div>
<div class="list card">
<ion-list>
<div class="row" ng-repeat="i in datosComp">
<div class="col col-20" >
<div ng-repeat="x in i.paralelos">
<a ng-click="info(i.nom_coe,x.paralelo,i.creditos,x.dia,x.hora_inicio,x.hora_fin)"
class="circulo">
{{ i.nom_coe | limitTo:1 }}
</a>
</div>
</div>
<div class="col col-80">
<ion-item type="item-text-wrap" href="#/Gtuto/componentes/{{i.nom_coe}}">
<h3>{{i.nom_coe}}</h3>
<h5 ng-repeat="x in i.paralelos">PARALELO: <strong>{{x.paralelo}}</strong></h5>
</ion-item>
<ion-item>//Aqui deseo imprimir el error(etiqueta P)</ion-item>
</div>
</div>
</ion-list>
</div>
</ion-content>
</ion-view>
What I really want is to print the error of my AngularJS in this view.