Error no provider for navController

i created a common function that check drawer is opened or not .so i created one class and constructor.

below is the code

@Injectable()
export class AllFunctions {

constructor(private alertTag:AlertController,nav:NavController,private loading:LoadingController,menuCtrl:MenuController)
{
this.navController = nav;
this.menu = menuCtrl;

}

close() {
if(this.menu.isOpen())
{
this.menu.close();
}
else
{
this.navController.pop();
}
}
}

when i run my code i got error : No provider for NavController.
i also add class AllFunction in app.ts file

ionicBootstrap(MyApp,[WebService,AllFunctions,
provideForms(),
disableDeprecatedForms()], {
platforms: {
android: {
tabsPlacement: ‘top’,
tabsHideOnSubPages: true,
tabsHighlight: true
}
}
});

You wrote

constructor(nav:NavController) {}

in constructor

and calling this.navController.pop(); in else

You have to write this.nav.pop(); in else instead.