티스토리 뷰
728x90
반응형
간단한 알림창~
좋네~
github: https://github.com/Foxandxss/angular-toastr
demo: http://codeseven.github.io/toastr/demo.html
- bower 로 설치
bower install angular-toastr
- npm 으로 설치
npm install angular-toastr
1. success
app.controller('foo', function($scope, toastr) { toastr.success('Hello world!', 'Toastr fun!'); });
2. info
app.controller('foo', function($scope, toastr) { toastr.info('We are open today from 10 to 22', 'Information'); });
3. error
app.controller('foo', function($scope, toastr) { toastr.error('Your credentials are gone', 'Error'); });
4. warning
app.controller('foo', function($scope, toastr) { toastr.warning('Your computer is about to explode!', 'Warning'); });
5. no title
app.controller('foo', function($scope, toastr) { toastr.success('I don\'t need a title to live'); });
Closing toasts programmatically:
app.controller('foo', function($scope, toastr) { toastr.clear([toast]); });
커스터 마이징~
app.config(function(toastrConfig) { angular.extend(toastrConfig, { autoDismiss: false, containerId: 'toast-container', maxOpened: 0, newestOnTop: true, positionClass: 'toast-top-right', preventDuplicates: false, preventOpenDuplicates: false, target: 'body' }); });
728x90
반응형
'Programming language > Angularjs(1.x)' 카테고리의 다른 글
gulpfile.js 설정. (0) | 2017.02.08 |
---|---|
Module.config / Module.constant / Module.run (0) | 2017.01.24 |
yeoman gulp설정 - generator-yo-gulp / gulp-ng-config/ (0) | 2017.01.24 |
ui-router 대강 정리 (1) | 2017.01.20 |
angularjs 에서 Service/Factory (0) | 2016.10.18 |
댓글
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 태그
- 자바스크립트
- svg모션
- Aptana
- Vue3
- 아이콘 폰트 만들기
- for of 구문
- anime.js
- 리프래시토큰
- svg 폰트
- IntrinsicElements
- 내장요소
- Intrinsic
- git
- React.StrictMode
- 코도바
- cordova
- icon font
- interceptors
- RefreshToken
- Angular
- 반복문
- JsDoc
- 앵귤러
- svg icon font
- vue-router
- react
- CSS
- git checkout -b
- react-router-dom
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
글 보관함