How to Get Current View Name in Ionic Framework

Hi. I needed current view name to dynamic css changing in ionic framework. I’ve tried document.URL but it’s not worked. Do not use document.URL or others because you don’t need.

Ionic’s $state (actually angular’s $state) has current.name property.

For Example:

I do not recommend but just example 🙂

Yes! it worked.

admin

Hi. I’m Ali. I’m 23. I graduated Mehmet Akif Ersoy University from CS Related Department.

I can code with all programming languages. But today I’m writing .NET and JavaScript.

You may also like...