These are chat archives for angular/material

29th
Sep 2015
Paul Bailey
@pizzapanther
Sep 29 2015 00:43
@jcortes the demo for that component has a validation example: https://material.angularjs.org/latest/#/demo/material.components.select
Jorge Cortes
@jcortes
Sep 29 2015 12:59
@pizzapanther thanks
adilogin15
@adilogin15
Sep 29 2015 13:41
Hi there I want to have an dialog open on clicking terms and conditions link on a webpage
how can I achieve that in angular layout ?
Paul Bailey
@pizzapanther
Sep 29 2015 13:55
Cemre Çevik
@nolines
Sep 29 2015 13:57
hi there , i have an jquery and angularjs mix project . it is really big project, and i want to use angular material or lumx on these. i like lumx multiselects and other form demos but angular material has many other options to use component variately. can someone tell me which is the best practice for projects like mine?
Paul Bailey
@pizzapanther
Sep 29 2015 14:02
you've just stumbled upon the eternal programmers dilemma , "which frameworks to choose?"
Best thing is to just choose one
i'm partial to Angular Material of course
but maybe test one out for a couple days, often times I'm able to see pretty quickly which one is for me after using it for a couple days
you'll end up hitting a road block that the other framework does easily and you'll have your answer
Vinay Agarwal
@vinkaga
Sep 29 2015 14:09
Hello, is there an example of FAB button that actually floats over content? The buttons in demos are inline with the content not over it.
adilogin15
@adilogin15
Sep 29 2015 14:47
@pizzapanther : I have seen that angular documentation , the problem is since terms and conditions is a big page , so I have made a seperate handlebars file for it and and even after following all procedures it doesnt shows anything.
Paul Bailey
@pizzapanther
Sep 29 2015 15:30
if it is that big you should just make it a separate page, a dialog is maybe not a good choice for that much content
also as a dialog that means you'll be loading that large amount of content on every page. Where if you just link it to another page, it could reduce your page load time
adilogin15
@adilogin15
Sep 29 2015 15:36

for example : This is my code

 <md-checkbox flex="50" ng-model="signupInfo.termsAndConditions" required>
                I Agree to <a href="/terms-and-conditions" ng-click="showtacdialog($ev)">Terms and Conditions</a>
            </md-checkbox>

Do I need to use ng-href ?

Paul Bailey
@pizzapanther
Sep 29 2015 15:36
with an a tag no
adilogin15
@adilogin15
Sep 29 2015 15:37
the other file is an handlebars file and I have made a controller for that
Paul Bailey
@pizzapanther
Sep 29 2015 15:37
but you can add target="_blank" so it opens in a new tab
adilogin15
@adilogin15
Sep 29 2015 15:37
the problem is that it is directing to new page instead of opening a dialog in same page
dialog should open in same page
Paul Bailey
@pizzapanther
Sep 29 2015 15:38
for a dialog you need to use ng-click
adilogin15
@adilogin15
Sep 29 2015 15:38
then on ng-click use a controller function
Paul Bailey
@pizzapanther
Sep 29 2015 15:39
yep
adilogin15
@adilogin15
Sep 29 2015 15:39
which I have done as mentioned in angular documentation
adilogin15
@adilogin15
Sep 29 2015 15:49
what are the main things which I should mention in controller? , I think the problem must be in controller

for example : I have assigned

$scope.showtacdialog = function(ev) {
           function showtacdialog() {
                $mdDialog.show({
                  templateUrl: 'terms-and-conditions',
                  parent: angular.element(document.body),
                  targetEvent: ev,
                  clickOutsideToClose:true
                });
              }
            };

I mean I have defined scope an url , and event , Is it the correct format , sorry just new to these things.