These are chat archives for angular/material

13th
May 2015
Miloš Stanić
@MilosStanic
May 13 2015 07:02
I was toying with angular-meteor and when I use mdDialog it warns me about being unable to handle the event that is tied to the function that opens the dialog. And it only does so when the code is minified. So I'm guessing the DI pattern is not observed very well somewhere in the code. I will investigate.
Rares Golea
@rgolea
May 13 2015 18:40
Hello! Does anyone know what’s up with md-chips? I can’t really use it. It doesn’t find the placeholder...
it keeps sending
TypeError: Cannot read property 'length' of undefined
    at MdChipsCtrl.getPlaceholder (script.min.js:10)
    at script.min.js:6
    at Object.<anonymous> (script.min.js:5)
    at n.$digest (script.min.js:5)
    at n.$apply (script.min.js:5)
    at script.min.js:5
    at g (script.min.js:4)
    at script.min.js:4
here is my view:
<md-chips ng-model="newPost.tags" placeholder="Hello" secondary-placeholder="world"></md-chips>
This message was deleted
And here is how it looks
what am i missing?
Ed Pelc
@epelc
May 13 2015 18:46
This message was deleted
@rgolea I think newPost.tags needs to be initialized as an array
Rares Golea
@rgolea
May 13 2015 18:48
@epelc it is
@epelc I am editing this in codepen in the demo version… it still doesn’t work
Ed Pelc
@epelc
May 13 2015 18:50
does codepen load master or 0.9.0?
Rares Golea
@rgolea
May 13 2015 18:50
master
Ed Pelc
@epelc
May 13 2015 18:51
try it with 0.9.0 they probably broke something. master is inherently unsafe
Rares Golea
@rgolea
May 13 2015 18:52
in my project i have 0.9.0
Ed Pelc
@epelc
May 13 2015 18:53
you didnt initialize n and I think you referenced it incorrectly anyways
Rares Golea
@rgolea
May 13 2015 18:57
I’m trying to do it in the scope
in the $scope
i am initializing it in $scope.n
like $scope.n = []
and it still doesn’t work
Ed Pelc
@epelc
May 13 2015 18:59
@rgolea just remove ctrl. from the html and switch self.n to $scope.n(also inject $scope into the ctrl) http://codepen.io/anon/pen/qdZjvR
Rares Golea
@rgolea
May 13 2015 19:07
thanks! @epelc