These are chat archives for angular/material

25th
Feb 2015
Miloš Stanić
@MilosStanic
Feb 25 2015 10:09
Any plans for an expanding floating action button like here? http://ui.lumapps.com/css/fab
I didn't find any in the milestones
Simon Hampton
@simonh1000
Feb 25 2015 13:26
Slight off topic, but I want to use material design for a site that is basically a blog about restaurants and an app to find recommendations. The blog basically doesn't need angular, and so far I've been able to use Angular-material's CSS to get a grid. I will need Angular for the app though and plan to use Angular-material. But what Angular-material lacks is a navbar with touchable dropdown items. materializecss does have those however, but it has no grid. Any suggestions on best way forward?
Julien Renaux
@shprink
Feb 25 2015 13:29
@simonh1000 yeah dropdown menus are also missing so far but you can use specific modules such as https://github.com/jseppi/angular-dropdowns, demo: http://jsfiddle.net/jseppi/cTzun/53/embedded/result/
Dave Ackerman
@dmackerman
Feb 25 2015 16:27
anyone ever run into an issue with $mdDialog not showing a custom dialog the second time around?
for example if I call hide(), or press ESC - the second time I click my button the dialog doesn;t show.
Miloš Stanić
@MilosStanic
Feb 25 2015 16:29
I just tried it, works every time for me
Dave Ackerman
@dmackerman
Feb 25 2015 16:29
oh...I think it's because it's destroying my scope.
Miloš Stanić
@MilosStanic
Feb 25 2015 16:29
:)
Dave Ackerman
@dmackerman
Feb 25 2015 16:29
and I want to use the same scope as the controller.
preserveScope - {boolean=}: whether to preserve the scope when the element is removed. Default is false
Miloš Stanić
@MilosStanic
Feb 25 2015 16:30
where can you set this?
Dave Ackerman
@dmackerman
Feb 25 2015 16:31
$mdDialog.show({
            templateUrl: 'organization/ideas/link-goal/link-goal-dialog.tpl.html',
            targetEvent: ev,
            scope: $scope,
            preserveScope: true
        });
that didn't work actually. i think it's another issue
Miloš Stanić
@MilosStanic
Feb 25 2015 16:31
cool, good to know
Dave Ackerman
@dmackerman
Feb 25 2015 16:35
hmm something with the custom dialog. if I use a standard one from the docs it works.
Miloš Stanić
@MilosStanic
Feb 25 2015 16:37
btw @dmackerman , where do you put your closeDialog function if you don't use a controller for your custom dialog?
Dave Ackerman
@dmackerman
Feb 25 2015 16:38
good question. it appears that if you don't specify a controller, it just fails opening the second time.
guess I need to seperate out the logic into its own controller
Miloš Stanić
@MilosStanic
Feb 25 2015 16:38
want my snippet?
Dave Ackerman
@dmackerman
Feb 25 2015 16:38
sure
it appears that passing scope makes it fail
which is odd anyway, because i'm using controllerAs
Miloš Stanić
@MilosStanic
Feb 25 2015 16:39
var dlgCtrl = function (scope, aPath, aFilename, fileView, aDelete) {
                    scope.aDelete = aDelete;
                    scope.fileView = fileView;
                    scope.aPath = aPath;
                    scope.aFilename = aFilename;
                    scope.closeDialog = function(){
                      $mdDialog.cancel();
                  };
                };

                $scope.openDialog = function(ev) {
                $mdDialog.show({
                    title: 'Save or Update Sheet',
                    controller: dlgCtrl,
                  templateUrl: '/mcalc/views/partials_md/attachment.dlg.tpl.html',
                  targetEvent: ev,
                  locals: { aPath: $scope.aPath, aFilename: $scope.aFilename, fileView: $scope.fileView, aDelete: $scope.aDelete }
                });
Dave Ackerman
@dmackerman
Feb 25 2015 16:39
ah, locals
i'll use those then
Miloš Stanić
@MilosStanic
Feb 25 2015 16:40
not sure you need to pass them to the controller fn as arguments, though. But I just hated testing
Dave Ackerman
@dmackerman
Feb 25 2015 16:46
aweomse. using a controller works just fine.
Miloš Stanić
@MilosStanic
Feb 25 2015 16:46
cool, glad to help
Dave Ackerman
@dmackerman
Feb 25 2015 16:47
cleans up my code anyway :)
Dave Ackerman
@dmackerman
Feb 25 2015 18:24
I wish you could just set a "base" color for a theme color and have all the hues automatically calculated
unless I'm missingsomething, you need to configure each hue manually?