Seting Bootstrap navbar “active” class in Angular 2/4/5

Specify the active class in routerLinkActive directive of anchor tag like below. <ul class=”nav navbar-nav”> <li [routerLinkActive]=”[‘active’]” [routerLinkActiveOptions]=”{exact:true}”> <a [routerLink]=”[‘/’]”>Home</a> </li> <li [routerLinkActive]=”[‘active’]” [routerLinkActiveOptions]=”{exact:true}”> <a [routerLink]=”[‘/about’]”>About</a> </li> <li [routerLinkActive]=”[‘active’]” [routerLinkActiveOptions]=”{exact:true}”> <a [routerLink]=”[‘/contact’]”>Contact Us</a> </li> </ul> PS: By making { exact: true } in routerLinkActiveOptions will activate the route only when the whole path matches. References: https://angular.io/api/router/RouterLinkActive

Continue reading →

MongoDB Import JSON Error – Unmarshalling Bytes

While importing data from a JSON file into MongoDB using following command  – mongoimport –db my_db –collection my_collection –file json_file.json if you encounter following error – Failed: error unmarshaling bytes on document #0: JSON decoder out of sync – data changing underfoot? Solution: Mos probable reason is some parts of JSON Objects are not properly formatted. […]

Continue reading →

Application development in the world of PaaS, Faas and CaaS – Training

  Join us at FREE training on “Application development in the world of PaaS, FaaS, CaaS” to kick start with Microsoft Azure. This is a hands-on training which covers Cloud development Strategies,  Introduction to Azure, different offerings, what it means for developer etc. You can register for the event using this link – https://www.microsoftevents.com/profile/form/index.cfm?PKformID=0x2982773abcd   Happy Learning!

Continue reading →

Responsive Font Sizes using Xamarin.Forms

When developing a cross-platform application, it is common for us to target multiple form factors like Phones, Tablets, iPads etc. But in a Xamarin.Forms application we will define the control in a layout only once for all the targeted devices (iOS/Android/Windows Phone). There is no direct way to specify different font-sizes based on the form-factor/resolution of the […]

Continue reading →