These are chat archives for angular/material

27th
Nov 2015
sunny
@sunnynegi
Nov 27 2015 07:01
need small help guyz
toast is not working in material 0.11.2
sunny
@sunnynegi
Nov 27 2015 07:06
$scope.toastPosition = angular.extend({},last);
$scope.getToastPosition = function() {
return Object.keys($scope.toastPosition)
.filter(function(pos) { return $scope.toastPosition[pos]; })
.join(' ');
};
$mdToast.show(
$mdToast.simple()
.content('Simple Toast!')
.position($scope.getToastPosition())
.hideDelay(3000)
);
here is the code that i am using any help
Tim
@4tron
Nov 27 2015 07:07
plunkr it!
\o/
sunny
@sunnynegi
Nov 27 2015 07:07
\o/ what is that
4tron
Kriss
@kritsanut
Nov 27 2015 07:11
Hi
Tim
@4tron
Nov 27 2015 07:11
or codepen .. yeah that will work .. is that your code , oh no right that is a working example
any console errors?
sunny
@sunnynegi
Nov 27 2015 07:14
no
Tim
@4tron
Nov 27 2015 07:14
This message was deleted
$scope.toastPosition = angular.extend({},last);
    $scope.getToastPosition = function() {
    return Object.keys($scope.toastPosition)
      .filter(function(pos) { return $scope.toastPosition[pos]; })
      .join(' ');
    };
    $mdToast.show(
      $mdToast.simple()
        .content('Simple Toast!')
        .position($scope.getToastPosition())
        .hideDelay(3000)
    );
just want to look at it a bit better
sunny
@sunnynegi
Nov 27 2015 07:15
after changing the material version it's stop working
Tim
@4tron
Nov 27 2015 07:15
you say "changing" like you have a previous implementation?
sunny
@sunnynegi
Nov 27 2015 07:16
yes
Tim
@4tron
Nov 27 2015 07:17
where is the code for the actual click event?
or is it onload?
sunny
@sunnynegi
Nov 27 2015 07:18
no
on success result of api
but it's not working
Tim
@4tron
Nov 27 2015 07:21
yeah maybe write up a plnkr or codepen on the code you currently have , its super hard to tell what might be the problem here. Take out the pos unless you are passing a pos param through for the position
sunny
@sunnynegi
Nov 27 2015 07:24
ok let me check
Al Pagan
@wayfarerboy
Nov 27 2015 08:02
I got stuck on this one yesterday. Try changing. `content
Sorry, pressed enter by accident
@sunnynegi Try changing .content('Simple toast') to .textContent('Simple toast')
sunny
@sunnynegi
Nov 27 2015 09:29
ok let me check
undefined is not a function
not work
Al Pagan
@wayfarerboy
Nov 27 2015 09:31
D'oh. Sorry, that api change caught me out yesterday so I presumed it was the same problem.
sunny
@sunnynegi
Nov 27 2015 09:32
np :)
avs2001
@avs2001
Nov 27 2015 12:10
hello there
I tried ngmaterial a while ago and I had problems with memory leak
It is someone who routinely uses?
Johannes Pichler
@joeherold
Nov 27 2015 13:16
@avs2001 what kind of? detached dom tree elements?
angular1 + angularmaterial is what made me switch to angular2… :smile: