Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 11 2016 19:26

    Splaktar on master

    fix(toast): apply theming corre… perf(icon): better handling of … fix(list): copy ng-show, ng-hid… and 49 more (compare)

  • Jun 15 2016 16:14

    Splaktar on v1.1.0-rc.5

    release: version 1.1.0-rc.5 (compare)

  • May 14 2016 05:55

    Splaktar on master

    feat(panel): initial implementa… update(panel): promise logic im… update(panel): add and remove p… and 44 more (compare)

  • May 05 2016 20:47

    Splaktar on v1.1.0-rc4

    release: version 1.1.0-rc4 (compare)

  • May 05 2016 20:47

    Splaktar on v1.1.0-rc3

    release: version 1.1.0-rc3 (compare)

  • May 03 2016 22:28

    Splaktar on es6-tutorial

    Prepare clean start Remove bow… install angular-material And i… working version of starter-app and 19 more (compare)

  • May 03 2016 22:22

    Splaktar on master

    Tutorial Readme updates Updates for Tutorial #2 Update README with tutorial ste… and 56 more (compare)

  • May 01 2016 22:56

    Splaktar on fixBlurryRightNavIe11

    fix(sidenav): rightNav button a… (compare)

  • May 01 2016 22:37

    Splaktar on master

    fix(dialog): don't clobber md-d… update version number in packag… update(changelog): sort so 1.1.… and 1 more (compare)

  • May 01 2016 22:34

    Splaktar on fixSideNavDemo

    docs(sidenav): leftNav text isn… (compare)

  • Apr 27 2016 04:14

    Splaktar on fixSideNavDemo

    docs(sidenav): invalid `md-whit… (compare)

  • Apr 27 2016 03:54

    Splaktar on master

    update(changelog): add missing … fix(toolbar): remove transition… fix(tests): Cleans up the DOM a… and 2 more (compare)

  • Apr 23 2016 01:32

    Splaktar on master

    update(docs): improve docs for … update(docs): renamed `md-text-… fix(list): clickable list-items… and 71 more (compare)

  • Apr 11 2016 03:20

    Splaktar on improveExtendThemeDoc

    update(docs): improve docs for … (compare)

  • Apr 11 2016 03:15

    Splaktar on improveExtendThemeDocs

    update(docs): improve docs for … (compare)

  • Apr 11 2016 02:57

    Splaktar on updateThemingDocs

    update(docs): renamed `md-text-… (compare)

  • Apr 11 2016 02:48

    Splaktar on master

    fix(demo, codepen): use secure … fix(build, layout): remove depr… update(build): remove stale bow… and 72 more (compare)

  • Apr 11 2016 02:48

    Splaktar on v1.1.0-rc2

    release: version 1.1.0-rc2 (compare)

  • Mar 19 2016 03:00

    Splaktar on master

    fix(checkbox): pointer events d… update(tests): remove disabled/… fix(datepicker): enable scrolli… and 20 more (compare)

  • Mar 13 2016 05:41

    Splaktar on v1.0.6

    Revert "fix(select): made selec… update(layout): add layout-nowr… fix(whiteframe): update breakpo… and 57 more (compare)

jmls
@jmls
mmm, ok, so that looks "simpler" than the examples .. especially the filtering
Ludwig Behm
@lbehm
which uses the visible input as search-text and if you select a item in the dropdown (updates tmpModel), it updates (with md-selected-item-change) the input-field (model)
jmls
@jmls
thx
Ludwig Behm
@lbehm
but I have to mention that I have currently a problem with that if 2 md-autocomplete input elements are present in the same form: the first on-change doesn't triggers...
jmls
@jmls
ok
Ludwig Behm
@lbehm
which results in a missing dropdownbox if the user clicks in the input field. after a input change everything is fine
jmls
@jmls
now, I am also trying to implement validation ("please select a state") if the user enters an incorrect value
            <div ng-messages="$ctrl.form.State.$error">
                <div ng-message="itemMissing">select item</div>
            </div>
my $ctrl.form.State is this:
{
    "$viewValue": "Alaska",
    "$modelValue": "Alaska",
    "$validators": {},
    "$asyncValidators": {},
    "$parsers": [null],
    "$formatters": [null, null],
    "$viewChangeListeners": [],
    "$untouched": false,
    "$touched": true,
    "$pristine": false,
    "$dirty": true,
    "$valid": true,
    "$invalid": false,
    "$error": {},
    "$name": "State",
    "$options": null
}
and when I select an invalid state, the $error becomes
"$error":{"itemMissing":true}
the line turns red, but the message never shows
I must be missing something really obvious
I have <form name="$ctrl.form" novalidate ng-submit="$event.preventDefault()">
jmls
@jmls
and md-input-name="State" on the auto-complete
jmls
@jmls
ah, ffs
all that time messign about trying to get it working
I missed the closing > of md-autocomplete ....
grrrr
jmls
@jmls

@devimplode : sorry, but I'm still kinda confused about mapping to a model : using md-select as an example, I have a table of state codes [{code: "AL", name: "Alaska"},{..}]

        <md-select ng-model="$ctrl.data.stateCode">
            <md-option ng-repeat="item in $ctrl.states" value="{{item.code}}">{{item.name}}</md-option>
        </md-select>

so, on startup, this if $ctrl.data.stateCode is "AL", the selection displays "Alaska". When I browse the selection, I see the list of state names, and when I choose the state, then $ctrl.data.stateCode is set to the code, not the name of the select item

how do I replicate this, but using autocomplete instead of select ? I think that I can set the value of the model whenever the item is changed, but how do I get it to display the current value on startup like selection does ?
Ludwig Behm
@lbehm
This message was deleted
just provide your value in md-search-text="$ctrl.data.stateCode"
jmls
@jmls
i thought the search was on the "name"
but I'll try, thanks
Ludwig Behm
@lbehm
which name?
jmls
@jmls
I'm showing the state names in the auto-complete, just like the selection, but want to store the state code
so in the selection html above, I see the state names, but when I select one, it's the state code that is put into the ng-model
I want to do the same with auto-complete - show the names, store the code
perhaps i'll knock up a codepen to explain what I want ;)
jmls
@jmls
okies:
I have 2 states: one chosen by autocomplete and one by selection
as you can see, the one with selection defaults to the state in state2
and when I change the selection, state2 is updated accordingly
how can I replicate this functionality with the auto-complete ?
Ludwig Behm
@lbehm
add this to your constructor
    self.selectedItem = self.states.filter(createFilterFor('Alaska'))[0];
    self.searchText = self.selectedItem.display;
jmls
@jmls
I was afraid of that ... I only have the code, not the description. So I'm going to have to search the results for the code, once I find the appropriate state, get the name, then do what you suggest
That's an embuggerance ;)
thanks
especially as the selection directive does it all for you already :(
jmls
@jmls
fwiw, I used lodash to do the search for me
Ludwig Behm
@lbehm
@jmls can you give a example what the search does?
jmls
@jmls
sure, but it's nothing special ...
self.selectedItem= _.find(self.states,{code: self.data.stateCode});
Oscar Lagatta
@oscarlagatta
Does anyone know if current version of Angular Material 2 works with latest Angular 2 RC ?
Brad DeMorrow
@iarebatman
I'm having trouble setting an md-input to have focus via JavaScript.. Even just with the console.. Is there a trick to it?
Daniel Barrett
@dmbarrett
@iarebatman