Giter VIP home page Giter VIP logo

angular-pnotify's People

Contributors

jacqueslareau avatar livelazily avatar mhdsyrwan avatar rasmuslp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

angular-pnotify's Issues

remove the bootstrap dependency

Hi,

You define a dependency in your bower.json to bootstrap, but in a lots of case we don't use the official bootstrap package (for our case, we work with the SASS-Only or CSS-Only version)

Angular-Ui-Bootstrap require bootstrap CSS to be inserted, but they don't add this item to the dependency, letting us define the way we want to import bootstrap CSS.

Somethings could be done for that case ?

Thanks

Update angular variables inside notification text

Hello.

I know that this is only a wrapper for PNotify, but being built over AngularJS I thought it would be able to evalute angular $scope.

What I mean is: angular variables don't update inside the notification.

Isn't this service supposed to address this kind of thing?

Thanks in advance!

Issue with Latest version

Uncaught TypeError: Cannot read property 'prototype' of undefined
at pnotify.animate.js:1
at pnotify.animate.js:1
at pnotify.animate.js:1

"pnotify": "3.0.0" issue with this version, if i changed it to

"pnotify": "sciactive/pnotify#~2.0.1", I am not getting any error

pnotify.removeAll()

You could add

 removeNotifications: function() {
                        return PNotify.removeAll()
                    }

so it can be called by notificationService.removeNotifications().

At the moment, only way is window.PNotify.removeAll();

Dropping jQuery

It's meant to act as a quick, easy and reusable way to use PNotify's library inside Angular.

Not really sure about creating a PNotify clone in Angular for now, but it will happen. It would require substantial time though.

Return this in NotificationServiceProvider to chain the call

Hi,

I think it would be great to return 'this' when we use the NotificationServiceProvider in order to chain the call :

  notificationServiceProvider.setDefaults({
            history: false,
            delay: 5000,
            closer: false,
            closer_hover: false,
            nonblock: { nonblock: false },
            styling: "bootstrap3",
            icon: true
        });
        notificationServiceProvider.setStack('bottom_right', 'stack-bottomright', {
            dir1: 'up',
            dir2: 'left',
        });
        notificationServiceProvider.setDefaultStack('bottom_right');

would be great like that :

  notificationServiceProvider.setDefaults({
            history: false,
            delay: 5000,
            closer: false,
            closer_hover: false,
            nonblock: { nonblock: false },
            styling: "bootstrap3",
            icon: true
        }).setStack('bottom_right', 'stack-bottomright', {
            dir1: 'up',
            dir2: 'left',
        }).setDefaultStack('bottom_right');

Othewise, thanks for your tiny library, very useful !

support for angular-translate

When angular-translate module is loaded, check if token exists and display the filtered result. Useful in controllers to skip loading $filter and also cleaner code

before:
notify.succes($filter('translate')('SAVED'));

after:
notify.success('SAVED');

fails to set defaults

Using "angular-pnotify": "~0.1.2"

'use strict';

angular.module('MyApp')
  .config(['notificationServiceProvider', function(notificationServiceProvider) {
    notificationServiceProvider.setDefaults({
      styling: "bootstrap3",
      history: false
    });
  }])
  .factory('notification', ['notificationService', function (notificationService) {

    return {
      error: function(title, text, options) {
        var hash = { type: 'error', delay: 4000000 };
        if (text === null || text === undefined) {
          text = "";
        }

        angular.extend(hash, {title: title, text: text}, options);
        notificationService.notify(hash);
      },
      success: function(title, text, options) {
        console.log( PNotify.prototype.options ); /// <<< check defautls >>>>
        var hash = { type: 'success', delay: 2000 };

        if (text === null || text === undefined) {
          text = "";
        }

        angular.extend(hash, {title: title, text: text}, options);
        notificationService.notify(hash);
      }
    };
  }]);

Here is my notificationService. Where I set my default, particularly the styling to bootstrap3.

Then I see no styling in notifications. So I logged PNotify.prototype.options. And obtains this object:

Object {title: false, title_escape: false, text: false, text_escape: false, styling: "brighttheme"}

Also this exact code used to work with "angular-pnotify": "~0.0.6".

Is that a bug?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.