Problem Linking to an external template (hyperlink)

hello Everyone
Please help , what am i missing I have a problem linking to an external template in a tab view. Every other templates are working fine from the tabs. But now i just want to hyperlink a text or button to an external template.

Html code to link to another external template

<button class="button button-icon icon " href="/templates/addreceipe.html">
        Add item
    </button>

here is my directive

.state(‘addreceipe’, {
url: “/myreceipes/:addreceipe”,
views:{
‘myreceipes’: {
templateUrl: ‘templates/addreceipe.html’,
controller: ‘AddItemCtrl’
}
}
});

controller is:

.controller('AddItemCtrl', function($scope) {});

Please what am I missing here, i cant seam to link this button to the template in templates folder
@mhartington @Calendee @Ionic
Thanks Everyone

thats not working…
you can link a “state”.

you called a state “directive” what is wrong… a directive is something like a dom-component which transforms the dom or is wokring with a dom-element

if you want to link another view you have to linkthe state

<button class="button button-icon icon " ui-sref="addreceipe({addreceipe: HERE YOURE ADDRECEIPE PARAMETER VALUE})">
    Add item
</button>

or

<button class="button button-icon icon " ng-href="/myreceipes/YOURPARAMETERHERE">
    Add item
</button>

Please do not use href in angularjs… use ng-href:
https://docs.angularjs.org/api/ng/directive/ngHref

or ui-sref from ui-router

1 Like

Thanks a million, let u know if i fail or succeed, Ionic is great. Great!!! Support.