0
I have the following code:
<!-- define-pageTitle -->
<div id="shareContent">
<p class="subtitle-app mt30">Define title page</p>
<form onsubmit="return false">
<label>Who can browse this hotel:</label>
<br>
<input type="text" id="inputPageTitle" placeholder="Define here the title of the page" class="ng-valid ng-dirty">
</form>
<br>
<input class="btnSubmit" type="submit" value="Save" ng-click="saveTitlePage()" hyatt-focus-invalid-field>
<hr class="silverLinemt30">
</div>
I need to take the title value of this Ubmit and change my DOM (title) through the Angularjs.
The idea is that a user changes the value of the title when they want through a form where he customizes.
the business is that the ng-model will bring according to what I type. But it would be something in time that the customer clicked on Save. would trade up there.
– Edmo
there is ok, I will fix it for you then. 1 min, by chance you are using some controller?
– vmontanheiro
Add this to your controller Document.title = $Scope.title; Remember that you need to pass the title value in ng-model. abrs
– vmontanheiro
Thanks @Vinicius worked super well :)
– Edmo
Nothing, my friend. Abrs
– vmontanheiro