I'm currently working on a phone app. We support two lines on the phone so 
there are two views in the app for each phone line. I'd like to be able to 
use the same controller and view files for both views and track the state 
of each line separately. 

I'm using the following code to configure my $routeProvider:

.when('/line:lineNum', {
  templateUrl: 'views/line.html',
  controller: 'LineCtrl',
})

Then in my LineCtrl I access it's line number as follows: 

app.controller('LineCtrl', function ($scope, $routeParams, $location) {
  $scope.model = {
     'title': ST.format('Line {0}', $routeParams.lineNum)
  }
  ...

So far so good, /line1 or /line2 show their respective views. What I'm 
looking for advice on is how now to best store the each line's state 
information. 

Thanks

-- 
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to