Expose shell.openExternal in NavigationController

`.open()` was previously exposed in the `AppController`, however after
the router refactoring, this controller is no longer instantiated on the
footer, and therefore the links that live there stopped working.
This commit is contained in:
Juan Cruz Viotti 2016-03-02 12:28:42 -04:00
parent dbb4ee6a5a
commit bd009a75b0
2 changed files with 4 additions and 5 deletions

View File

@ -195,8 +195,6 @@ app.controller('AppController', function(
});
};
this.open = shell.openExternal;
});
app.controller('SettingsController', function(SettingsService) {
@ -205,6 +203,7 @@ app.controller('SettingsController', function(SettingsService) {
app.controller('NavigationController', function($state) {
this.isState = $state.is;
this.open = shell.openExternal;
});
app.controller('FinishController', function($state, SelectionStateService, SettingsService) {

View File

@ -37,16 +37,16 @@
<main class="wrapper" ui-view></main>
<footer class="section-footer row between-xs middle-xs">
<footer class="section-footer row between-xs middle-xs" ng-controller="NavigationController as navigation">
<div class="col-xs">
<div class="box text-left">
<hero-icon path="images/resin.svg" width="85px" height="auto" ng-click="app.open('https://resin.io')"></hero-icon>
<hero-icon path="images/resin.svg" width="85px" height="auto" ng-click="navigation.open('https://resin.io')"></hero-icon>
</div>
</div>
<div class="col-xs">
<div class="box text-right">
<hero-caption><span ng-click="app.open('https://github.com/resin-io/etcher')">AN OPEN SOURCE PROJECT</span> BY <span ng-click="app.open('https://resin.io')">RESIN.IO</span></hero-caption>
<hero-caption><span ng-click="navigation.open('https://github.com/resin-io/etcher')">AN OPEN SOURCE PROJECT</span> BY <span ng-click="navigation.open('https://resin.io')">RESIN.IO</span></hero-caption>
</div>
</div>
</footer>