Posts

Showing posts with the label angularjs

How to call method from one controller to other controller in AngularJs 1.7.x, to refresh the UI data

How to call method from one controller to other controller in AngularJs 1.7.x, to refresh the UI data <style> .sidebar .logo img { display: none; } .sidebar.active .logo img { display: inline-block; } .sidebar.active .logo .first-letter { display: none !important; } .sidebar .logo .first-letter { display: block; } .first-letter { margin: 0; font-size: 30px; color: red; } .logo { height: 90px; display: flex; align-items: center; justify-content: center; } </style> <div class="logo text-center"> <img src="assets/img/VfinanceSLogo.png" width="150"> <h1 class="first-letter">V</h1> </div> <div class="sidebar-wrapper" data-ng-if="user.userType == Constant.UserType.BORROWER.id"> <ul class="nav"> <li data-ui-sref-active="active"><a href="javascript:void(0)" data-ui...

Update Data from Calculator - NodeJS + AngularJS

Image
Update Data from Calculator - NodeJS + AngularJS I am new to JS development. I found a nodejs calculator project on github that I've been manipulating. My Problem: In my calculator, I'm trying to combine all of my results together. However, the data of my old entries are still present, I would like to remove these old entries and have it update instead with the most up-to-date entry. I know it has something to do with data-ng-repeat (shown in my index code below), but I've tried other directives and they haven't worked. Is there something I need to change in my code to use a different directive? data-ng-repeat Here's what I am working with, everything works well until the last screenshot: Widget calculator https://imgur.com/a/2ebpyym Specific Widget Selection https://imgur.com/a/STYeLcF Entering QTY of Widgets https://imgur.com/a/B5ii32J Calculation Result #1 (1 Sheet is worth 8 Widgets) https://imgur.com/a/CUouHAt Problem: Calculation Result #2 https://imgur.co...

Angular.js route is not working

Angular.js route is not working friends, I am new in angular js and I was trying to work with angular Route, but when I click on #/home it gives me some strange URL http://127.0.0.1:3000/#!/home#%2Fhome But By default, the otherwise condition is working fine http://127.0.0.1:3000/#!/home app.config(['$routeProvider', function($routeProvider){ $routeProvider .when('/home', { templateUrl: 'views/home.html' }) .when('/list', { templateUrl: 'Views/listing.html', controller: 'mycontroller' }).otherwise({ redirectTo: '/home' }) }]); for /home, you can simply give '/' instead of '/home' and please share your html as well for home – Naga Sai A Jun 30 at 18:54 Possible duplicate of AngularJS All ...

`<input type=“email”` ng-change is only working for backspace and first entry

`<input type=“email”` ng-change is only working for backspace and first entry <input type="email" ng-keypress="testFunc()" ng-model="text" id="femail" class="form-control margin" name="femail" placeholder="Email*"/> <p style="color: red;">The input field has changed {{count}} times.</p> JS $scope.count = 0; $scope.testFunc = function() { $scope.count++; }; HTML <input type="email" ng-change="testFunc()" ng-model="text" id="femail" class="form-control margin" name="femail" placeholder="Email*"/> <p style="color: red;">The input field has changed {{count}} times.</p> JS $scope.count = 0; $scope.testFunc = function() { $scope.count++; }; If I input : "abc". Result should be : 3 but I'm getting : 0 if i delete using backspack I'm getting: 1 I shou...