Thanks I will give this a shot...
Frank
On Thursday, April 16, 2015 at 12:05:56 AM UTC-5, Luke Kende wrote:
>
> Just as plain-ol-javascript would use window.document.title... angular has
> a safe reference to $window
>
> $window.document.title
>
> Just inject it into your controller to use it.
>
> BUT... you're example looks like a different question. You just need to
> keep up with a reference to the current nav's current selected index and
> set $scope.pageTitle = basicNav[index].label.
>
> ...if I understand your code correctly.
>
> On Wednesday, April 15, 2015 at 1:08:02 PM UTC-6, Frank Tudor wrote:
>>
>> This might be elementary but I am treading water and cannot find a good
>> example from Google Search.
>>
>> The problem I have is I need to populate the page title to the
>> app-template page-title parameter using {{pageTitle}} It is part of the
>> scope but some how I need to fish out the basic nav current page (that I am
>> on and pop that puppy here.
>>
>> How do I do this?
>>
>> Thanks,
>> Frank
>> ....
>>
>> <html ng-app="VizMe" hover-stop="" class="ng-scope">
>> <body ng-controller="ctrlr" class="ng-scope">
>> <macc-app-template
>> app-title="Visualize"
>> page-title="{{pageTitle}}" <<< How???
>> nav-content="nav"
>> class="ng-isolate-scope">
>> ....
>>
>>
>> <script>
>> angular.module('VizMe', ['macc']).controller('ctrlr', ['$scope',
>> function($scope) {
>> var basicNav = [
>> {label:'Home',
>> url:'index.cfm?template=a'},
>> {label:'MACC Gear',
>> url:'index.cfm?template=b'},
>> {label:'Alatus',
>> url:'index.cfm?template=d'}, <<<< the lbael from this needs to get
>> to a the pageTitle variable below....
>> {label:'Osteons',
>> url:'index.cfm?template=e'}
>> ];
>> var noNav = [];
>> $scope.showNav = true;
>> $scope.nav = basicNav;
>> $scope.setNav = function(showNav) {
>> $scope.nav = showNav ? basicNav : noNav;
>> };
>> $scope.pageTitle = 'Need label of the current page to populate here?';
>> <<< How???
>> }]);
>> </script>
>>
>
--
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.