javascript - Input value not showing up (AngularJS) -


i've got controller:

app.controller('controlformulario', function($scope) {   this.formulario = [];   this.formulario.fecha = new date(); }); 

...this directive:

app.directive('formulario', [function() {   return {     restrict: 'e', // c: class, e: element, m: comments, a: attributes     templateurl: 'modules/formulario.html'    }; 

... , view:

<div class="form-group">   <label for="fecha">fecha</label>   <input type="fecha" class="form-control" id="fecha" ng-model="fecha" value="{{formctrl.formulario.fecha | date}}"  disabled> </div> 

as may guess, attribute value has date, filtered , so. no problem here. actual problem comes when see website, , find out input doesn't show anything. "value" attribute assigned, it's not showing inside input box.

why? doing wrong? tried same ng-init, ng-value... i'm newbye on angularjs, ended basic tutorial , i'm trying practise , more knowledge, maybe i'm missing out something.

any help?

you need store data attribute $scope.

check out link: https://docs.angularjs.org/guide/scope


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -