Category : angularjs

So i have a textArea, and i can’t let the user type ‘%’ on it; to handle this problem i did the following: html: <div class="col-12 col-xs-12 col-sm-12 col-md-6"> <div class="col-md-12 label-base"> <label for="exampleFormControlTextarea1">Justificativa</label> <textarea style="resize: none" ng-disabled="negociacaoEspecCtrl.proposta.flagDesabilitaEdicaoProposta" class="form-control observacoes" id="exampleFormControlTextarea1" rows="3" ng-model="negociacaoEspecCtrl.proposta.dadosCadastro.negociacaoEspecial.justificativaNegociacaoEspecial" onkeypress="test()"> </textarea> </div> </div> The function inside my controller: $scope.test = function ..

Read more

I’m working with Angularjs with Nodejs on a project. I’m using UI-router in my project for routing. Here are configurations of the states in my app module file: app.config(function ($stateProvider, $urlRouterProvider) { $stateProvider.state(‘booking’, { url: ‘/user/booking’, templateUrl: ‘/user/booking.html’, resolve: { delay: function ($q, $timeout) { var delay = $q.defer(); $timeout(delay.resolve, 300); return delay.promise; } } ..

Read more

I want to convert a string to and Object and below is my code $scope.myString = "{‘profit’: 2.276273727416992}"; $scope.result = angular.toJson($scope.myString); console.log(‘is object = ‘ + angular.isObject($scope.result)); // false I’m using angular.toJson() for conversion to but its not working out. Please let me know what is wrong here and how can I convert Source: AngularJS ..

Read more