angularjs - angular custom input number doesn't work -


I really can not understand what the problem is in this code:

  App.directive ('counter', function () {return: 'a', scope: {}, template: '
Span class = "glyphicon glyphicon-chevron-up" data-ng-click = "increment ()">

You do not have any closed tags for increments The period was due to this, when the decreasing code was being executed, the increment code was also occurring, it was terminating the deficit.

  Template: '& lt; Div class = "item-counter" & gt; & Lt; Input type = "text" data-ng-model = "qnt" & gt; & Lt; Span class = "glyphicon glyphicon-chevron-up" data-ng-click = "increment (")> & Lt; / Span & gt; & Lt; Span Class = "glyphicon glyphicon-chevron-down" data-ng-click = "decrease ()" & gt; & Lt; / Span & gt; & Lt; Button Type = "Button" class = "BTN BTN-Success" & gt; Aggiungi & lt; / Button & gt; & Lt; / Div & gt; ',  

updated plunk


Comments