Search Posts

Category: html5

high light latest file while uploading document and scroll bar should be move as per document

i am trying to achieve the functionality of move scroll bar as per new upload, when i am uploading any document at that time i am high lighting that document,suppose i have 20 document in my list then i am uploading 21th document that time scroll bar should move to that document means it should move as per new document,currently i am showing latest document through high lighting but scroll bar is not moving,if somebody […]

conditional font size in list element

I am rendering a list in html and i have to display bigger font size based on attributes. for example- <li ng-repeat=”i in items | filter:searchString”> <p>{{}}</p> <p>population : {{i.population}}</p> </li> if name = state1 , population =1000 // bigger font name = state2 , population =2000 // smaller font then state1 name = state3 , population = 1500 // bigger font then state1 and smaller then state2 how to acieve that? Source: AngularJS

Dynamically check checkboxes for ng-show

I know how to do this with ng-repeat. But I can’t find a solution for this way. I have 6 checkboxes, and when I check any of them they show (ng-show) one of 6 charts. The problem is my backend sends me array for pre-checked checkboxes in this way with API. graphs_config:”[“graph.batteryVoltage”,”graph.internetUserCount”,”graph.usbAndWirelessCharging”]” I get this with $promise and check if there is data for pre-checked charts $scope.charts= userChartsFactory.get({ user: user_id }); $scope.charts.$promise.then(function(data) { if (data.graphs_config.indexOf(“graph.batteryVoltage”) […]

script src not loading javascript for angular

HTML <!DOCTYPE html> <html ng-app=”dropApp”> <head> <meta charset=”utf-8″ /> <title>DropBox</title> <link rel=”stylesheet” href=”//” /> </head> <body ng-controller=”mainctrl”> <script src=””></script> <script src=””></script> <div class=”jumbotron”> <div class=”container”> <div class=”col-sm-8 col-sm-offset-2″> <a id=”btn-login” ng-click=”login()” ng-model=”logbut” ng-show=”logbut” class=”btn btn-success”>Login </a> <div ng-include=”template”></div> </div> </div> </div> <div class=”credits text-center”> <p> Amey Totawar </p> </div> <script src=”angularsrc.js”></script> </body> </html> Javascript File var dropApp = angular.module(“dropApp”,[]); var path = require(‘path’); dropApp.controller(“mainctrl”, function($scope) { $scope.logbut = true; $scope.login = function() { $scope.logbut = […]

Routing, Views, AngularJs problems ?

i ma having a little problem with my the routing technique in AngularJs, i followed a tutorial and i believe i did not make a mistake, so I am hoping you will prove me wrong and show me the mistake. here is my routing file : app.config([“$routeProvider”, function ($routeProvider) { $routeProvider .when(“/story-1”,{ templateUrl: “views/view.html” }) .when(“/story-2”,{ templateUrl: “views/view.html” }) .when(“/story-3”,{ templateUrl: “views/view.html” }) .when(“/story-4”,{ templateUrl: “views/view.html” }) .when(“/story-5”,{ templateUrl: “views/view.html” }) }]) My app declaration […]

Change in one row of drop-down list reflects all rows

I am new to front end programming so hoping to get some guidance. I am developing an application using HTML AngularJs which uses ng-repeat and ng-model and populates multiple rows based on the data in the database for a user. Each row has static data coming from DB (returned as object via restAPI) and dynamic select option for user selection. Select option is hardcoded in app.js and linked to model on HTML for DB update […]

RequireJS can not find a JavaScript module

I have an index.html file which specifies the location of a main.js to RequireJS. I have a pure client side site and I am trying to require other RequireJS modules from the server. The code worked last week, all of sudden I started getting this error without changing the code. Here’s the HTML code. In the tag, I am specifying the path to find the main.js to RequireJS: <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”utf-8″> […]

Next Page »