These are chat archives for angular/material

23rd
Mar 2016
uday
@udaysingh010788
Mar 23 2016 10:13
how to use third party library with angular 2.0 opentok.js
Rahul Patil
@r4hulp
Mar 23 2016 14:54
@udaysingh010788 wrong group mate :)
jmls
@jmls
Mar 23 2016 16:48
theming - I know that I can change the theme using the mdThemingProvider, but is it possible to define a css color to match a material theme color ? I want to try and sync the ui-grid header row color with the theme used by mdThemingProvider
James Ireland
@siteshackinc
Mar 23 2016 16:49
you should via css
jmls
@jmls
Mar 23 2016 16:49
well, I can obviously define the ui-grid css manually
blob
but if the theme is changed to say, an orange theme, I wouldn't want to have to go through the ui-grid css and change it all
James Ireland
@siteshackinc
Mar 23 2016 16:55
depends on how you code your css to the element
or just add .md-theme-name .mycustom, .md-theme-name2 .mycustom {}
so name and name2 theme will apply your mycustom color
jmls
@jmls
Mar 23 2016 20:00
ok, can a css expert tell me how to theme a side-nav ?
I've tried
<md-sidenav class="md-sidenav-left md-warn"
no joy
Manuel Pacheco
@ShadowManu
Mar 23 2016 20:19
you should use the class md-warn in the elements inside (like md-toolbar and md-button)
Kingsley Simon
@boyfunky
Mar 23 2016 20:55
how to maintain values on a page upon refresh? suggestions were to put in localStorage or sessionStorage but these variables cannot be applied on my view. e.g if i hv a variable $sessionStorage.name = 'alice'. In my view if i do {{alice}}. It will appear as null.
is there anyway else to do this?
Manuel Pacheco
@ShadowManu
Mar 23 2016 21:02
@boyfunky if its initial data, in an angular controller function. If its not, you may have 2 first approaches:
1) Browser storage: its what you tried to do, but used wrong code. You can do somewhere in your controller $scope.storage = $sessionStorage; $sessionStorage.name = 'alice', and then {{storage.alice}}.
2) URL params: wether you're using angular router or ui-router, if a user reloads with a url full of stuff, you could use some of the services to grab that data: $route, routeParams, $state, stateParams, etc...
In option 1, if you're using the controller as, then swap the $scope for this and add the name in the binding i.e. {{name.storage.alice}}
Manuel Pacheco
@ShadowManu
Mar 23 2016 21:09
but just now I noticed that this is not a problem to be discussed on this channel xD
Aviv Rosental
@avivr
Mar 23 2016 21:34
Hello, I'm trying to create a menu header for a site using md-tabs. I need navigation between 3-4 pages.
Is it the right control for it?
how can I add another elements (like logo align to left, or logout button align to right) in the same row as the tabs?
Dixit Thareja
@dixitthareja
Mar 23 2016 21:35
Hi anyone have idea that after debugging my app with no errors on VS 2015....on the browser I am getting only Loading..
jmls
@jmls
Mar 23 2016 21:40
@ShadowManu : I have tried class="md-warn" on all elements within the sidenav, but none of them work except the toolbar
Manuel Pacheco
@ShadowManu
Mar 23 2016 21:41
@jmls which ones don't work?
jmls
@jmls
Mar 23 2016 21:41
md-content, md-list, md-list-item
and div within md-list-item
Manuel Pacheco
@ShadowManu
Mar 23 2016 21:43
they are NOT configured to be md-warned, as far as I know.
jmls
@jmls
Mar 23 2016 21:44
so, I can't change the background color of the sidenav by using a theme color ?
(without using css)
Manuel Pacheco
@ShadowManu
Mar 23 2016 21:45
use $mdThemingProvider
be aware that themes change things for a lot of components (not only sidenav). So CSS looks the simpler alternative.
jmls
@jmls
Mar 23 2016 21:47
I was looking at this
from the looks of it, it styles an element based on the current theme
so the best of both worlds ;) css & md-theme
Blake Danson
@truthstands
Mar 23 2016 21:53
I'm working with MEANjs.org boilerplate. If I add this to the view <input type="text" ng-model="name" /> {{ name }} , It doesn't work. The reason for me doing this is that I am just learning Angular, and it was trying to visualize the changes. If this is just added to the view is there a reason why this would not work according to MEANjs structure?
It doesn't seem to recognize the data binding expression. Just prints out to the view.
Manuel Pacheco
@ShadowManu
Mar 23 2016 21:56
@truthstands material gitter, not angular ;) but to point in some direction: if this is inside something using controller as X, then you need to put {{X.name}}.
Blake Danson
@truthstands
Mar 23 2016 21:59
thanks @ShadowManu. I'm still learning the ropes. Honestly, I'm not even sure what material is referring to, but I'll look that up. And thank you for the direction.
Aviv Rosental
@avivr
Mar 23 2016 22:08
@ShadowManu , can you help with my question?