-
Notifications
You must be signed in to change notification settings - Fork 3k
How i can get current state name in templateProvider #1898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Unfortunately this is not yet supported, however it will be shortly. Your best bet in the meantime is to create a factory function into which you pass the state name, i.e.: {
// ...
templateProvider: templateProviderFactory("ap.articles.create");
}
function templateProviderFactory(stateName) {
return function function ($state, $http, $templateCache) {
console.log(state);
return getTemplate(state, $state, $http, $templateCache);
};
} Requires a little duplication, but should work until this is fully supported. |
|
+1 |
+1 |
This issue has been automatically marked as stale because it has not had This does not mean that the issue is invalid. Valid issues Thank you for your contributions. |
Please re-investegate |
This issue has been automatically marked as stale because it has not had This does not mean that the issue is invalid. Valid issues Thank you for your contributions. |
Is this now supported? |
这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
Output log()
The text was updated successfully, but these errors were encountered: