M
M
Maxim Kapralov2015-04-15 13:50:38
Angular
Maxim Kapralov, 2015-04-15 13:50:38

How to transfer the value of a variable from the scope'a of the current state'a to $state.data?

Hello!
There is something like this state:

$stateProvider.state(
    'private-forum-topics', {
        url: '/private-forum/:forumId/topics',
        views: {
            content: {
                controller: "TopicsCtrl",
                templateUrl: 'topics/topics.tpl.html'
            }
        },
        data: {
            pageTitle: 'Список тем',
            breadcrumbs: [
                {
                    url: "#",
                    label: "Личный кабинет"
                },
                {
                    url: "#/private-forum",
                    label: "Форум"
                },
                {
                    url: "",
                    label: "Список тем"
                }
            ]
        }
    }
);

And, actually a question: how to transfer in data, for example, value of any variable from current scope'a?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Dedukhin, 2015-04-15
@Demetros

In data - no way.
I suppose you want to have this variable in breadcrumbs?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question