问题描述:

I am building a single page application using Zurb's Foundation for Applications and Angular.

What is the recommended way to display different text in the top bar (nav bar) based on the current route?

For example, I would like to have the page title associated with current route appear in the Top Bar (a simple form of breadcrumbs).

I am following the standard app structure provided Zurb's CLI tool. My Top Bar is defined in index.html.

网友答案:

The Foundation for Apps framework uses ui-router. Therefore, to access router state information, for example, the name of the current route/page, use the following in an HTML template:

{{$state.current.name}}
网友答案:

is there an alternative to the above suggestion . I have an app with multiple language so the title will change base on which one you select.

The Ionic framework using the following code

in the nested views to control the page title. Is there something similar in foundation

相关阅读:
Top