These are chat archives for angular/material

31st
Mar 2016
Jatin Bhatti
@jatinhbhatti
Mar 31 2016 07:55
Any one Have carousel image slider example like shopping site
kunokdev
@kunokdev
Mar 31 2016 09:58

How do I change check status of md-checkbox from Angular material depending on the actual checkbox check status?

Here are my checkboxes. They are inside ng-repeat.

    <input type="checkbox" ng-checked="item.completed" ng-model="toDoItemCheckbox">
    <md-checkbox
      ng-change="toggleToDoItem({{item.createdAt}})" ng-model="toDoItemCheckbox" aria-label="todo-checkbox">
    </md-checkbox>
Heber Nobre
@zbrukas
Mar 31 2016 14:00
How can I use an angular material directive inside my own directives? It doesn't seem to compile...
James Ireland
@siteshackinc
Mar 31 2016 14:00
did you add it to your controller?
Sachira Chinthana Jayasanka
@SachiraChin
Mar 31 2016 14:02
@zbrukas i have done it before, it works without any issue, may be you can share your directives’ code?
Heber Nobre
@zbrukas
Mar 31 2016 14:03
angular.module 'oppaApp'
.directive 'sidenavItem', ($compile) ->
controller: ['$scope', sidenavItemCtrl],
controllerAs: '$sidenavItemCtrl',
replace: true
require: "^^sidenav"
restrict: 'E'
scope:
tooltip: "@"
svgSrc: "@"
template: '
  <div class="item">
    <md-tooltip md-direction="right">
      {{tooltip}}
    </md-tooltip>
    <a class="sidebar-item">
      <md-icon md-svg-src="{{svgSrc}}"></md-icon>
    </a>
  </div>'
link: (scope, element, attrs) ->
Sorry, I'm using coffeescript. I have no errors, although the output's not the expected.
Sachira Chinthana Jayasanka
@SachiraChin
Mar 31 2016 14:06
give me a second to try it out, i’m assuming you can’t see the tooltip, documentation of tooltip says it should be inside the control it describes..
does your div have a size?
angular/material#3124
it says toolstop only work inside interactive elements
Heber Nobre
@zbrukas
Mar 31 2016 14:08
Nop. The tooltip is not rendering correctly, but the md-icon isn't grabbing the svg src either.
Well, I've tried it inside the <a> tag, doesn't work either. I'm assuming I have to compile it somehow.
Sachira Chinthana Jayasanka
@SachiraChin
Mar 31 2016 14:10
i’m not sure what you meant by compile, i haven’t used coffee scripts before..
Heber Nobre
@zbrukas
Mar 31 2016 14:10
I meant angular compile, not cs compile :D
Sachira Chinthana Jayasanka
@SachiraChin
Mar 31 2016 14:11
:D okay, did u try adding breaking point inside link method to see it gets the values?
Heber Nobre
@zbrukas
Mar 31 2016 14:15
Yes, everything seems right
Sachira Chinthana Jayasanka
@SachiraChin
Mar 31 2016 14:28
Mmm..trying to get same in my machine..
Sachira Chinthana Jayasanka
@SachiraChin
Mar 31 2016 14:57
this is JS, but it seems works without any issue
if u can what’s difference in ur code and this, may be we can find solution
Heber Nobre
@zbrukas
Mar 31 2016 15:23
@SachiraChin thx. I'm checking it out :)
Sachira Chinthana Jayasanka
@SachiraChin
Mar 31 2016 15:24
sure.. :)
Christopher Huey
@bchuey
Mar 31 2016 21:56
I'm having trouble displaying a 'SELECT' field. I'm using Angular as well. I have the $('select').material_select(); in $(document).ready(function(){}); after loading materialize.js
Christopher Huey
@bchuey
Mar 31 2016 22:01
Nvm. Found it. Had to use class="browser-default"