Я использую toastr-ng2 и хочу, чтобы местоположение тоста находилось под заголовком моей веб-страницы (например, style="margin-top: 30px"
).
Кажется, я не могу найти настройки для этой опции. Это возможно?Angular 2 - Toastr Custom Location
0
A
ответ
1
Я нашел простой способ сделать это. Проверяя элемент страницы при отображении тоста, вы можете получить css, который используется. Затем измените код и добавьте его в файл styles.css, который может перезаписать настройки toastr по умолчанию.
E.g.
#toast-container.toast-top-center .toast,
#toast-container.toast-bottom-center .toast {
margin-top: 50px;
}
Смежные вопросы
- 1. Custom Search in Angular 2
- 2. NativeScript - Angular 2 Custom AppDelegate
- 3. Custom sidenav in angular 2
- 4. Angular 2 Custom Pipe Пояснение
- 5. Невозможно импортировать модуль toastr с помощью Angular 2
- 6. Vim .vimrc custom location
- 7. magento custom pages location
- 8. Angular $ location undefined
- 9. Angular 2: Custom ExceptionHandler Change Detection Lag
- 10. Custom Validator Angular 2 - Get Return
- 11. Angular 2 - Custom Form Control - Disable
- 12. Angular JS navigate with $ location
- 13. Rails 3 Custom Method Location
- 14. Wikitude: Custom Heading and Location
- 15. gwt mvp custom settings location
- 16. Durandal Custom View Location Strategy
- 17. Wro4j Custom XML Model Location
- 18. $ location не работает в Angular
- 19. Angular $ location возвращается после изменения
- 20. Строка url с параметрами запроса для Angular 2 Location
- 21. toastr undefined with requirejs
- 22. Refresh custom Angular директива
- 23. angular $ http custom methods
- 24. Spring Boot custom static location location за пределами проекта
- 25. Угловой Toastr: отправить на путь на toastr скрыты?
- 26. Struts 2 location
- 27. Vue 2 Laravel 5.3 vue-toastr
- 28. NativeScript с Angular 2 custom html с тегом страницы
- 29. Chart.js & Angular 2 - ng2-charts Custom on Click Event
- 30. HTTP Angular 2?
Для полноты его также хорошо упомянуть, что есть список классов позиции, которые подходят для большинства нужд: https://www.npmjs.com/package/ng2-toastr#positionclass-string – Jayyf9