2016-10-25 42 views

回答

1

你也可以用角来为你做这个:

<button ng-click="doSomething(withSomebody)"> Submit 
</button> 

你就需要有一个控制器和定义DoSomething的( )

$scope.doSomething=function(somebody){ 
    ...insert code here 
} 

如果您需要改变你的状态时,注入$状态到您的控制器,并使用$ state.go(Statename的)

裁判:https://github.com/angular-ui/ui-router/wiki

-1

这是我在TS文件中使用

<ion-nav-buttons side="right" > 
     <a href="templates/yourpage.html"> 
     <button class="button"> 
      Show your page 
     </button> 
     </a> 
    </ion-nav-buttons> 
3

anotherPage: AnotherPage;

HTML:<ion-label [navPush]="anotherPage">Button</ion-label>

相关问题