티스토리 뷰
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
- 자바스크립트
- 태그
- 리프래시토큰
- JsDoc
- interceptors
- 아이콘 폰트 만들기
- IntrinsicElements
- Vue3
- react-router-dom
- svg모션
- git checkout -b
- cordova
- Aptana
- anime.js
- icon font
- 반복문
- 내장요소
- Angular
- svg icon font
- 앵귤러
- react
- for of 구문
- svg 폰트
- Intrinsic
- git
- React.StrictMode
- vue-router
- CSS
- RefreshToken
- 코도바
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함