NavController.length() giving 2 even after setting a page as root - Ionic 3



I am using ionic 3. I tried to manually put back button for some pages based on NavController length as defaultHistory in @IonicPage() is not working. But even after setting a page as root, if i print the navController length to console it is giving value 2. Isn’t this value supposed to be 1 for pages set as Root?

Please help.