Yep, got it.
> On Dec 11, 2015, at 10:14 PM, Jonathan Dryhurst Roberts > <[email protected]> wrote: > > Did you bother to read the guidelines to this board? Please read them and > knock it off with the self deprecating nonsense too in the hopes we feel > sorry for you. > > On Friday, December 11, 2015 at 10:00:15 PM UTC-8, Jonathan Price wrote: > What am I missing?! > > My html: > > <div class="container-fluid" ng-controller="DashboardCtrl as dash"> > <input ng-model="dash.customerId" /> > {{ dash.customerId }} > </div> > > My Controller: > > (function () { > > 'use strict'; > > angular > .module('ngXmdDashboard') > .controller('DashboardCtrl', DashboardCtrl); > > DashboardCtrl.$inject = [ 'Customers' ]; > > function DashboardCtrl( Customers ) { > var vm = this; > vm.customerId = 1; > > var updateCustomers = function() { > vm.customerId = 2; > }; > > Customers.subscribe(updateCustomers); > })(); > > My Service: > > (function () { > > 'use strict'; > > angular > .module('ngXmdDashboard') > .factory('Customers', Customers); > > Customers.$inject = [ 'Data' ]; > > function Customers( Data ) { > > return { > subscribe: subscribe > }; > > function subscribe(cb) { > cb(); > } > } > })(); > > > When I load the page, I'm not seeing 1 as my bound value in the view. When I > look in dev tools, I see that dash.customerId is set correctly to 2. > > I'm just getting back to using angular, and I'm stumping my toe on something > dumb here. Sorry to bog down the board with a likely dumb questions. Thanks. > > -- > You received this message because you are subscribed to a topic in the Google > Groups "AngularJS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/angular/GdzTx2beZ7g/unsubscribe > <https://groups.google.com/d/topic/angular/GdzTx2beZ7g/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/angular > <https://groups.google.com/group/angular>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
