我開發離子應用程序,我在如何在離子中更改窗口打開url?
添加後續插件科爾多瓦插件添加https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git
當點擊上面的網址成功加載應用程序
<a href="#" onclick="window.open('http://192.168.8.157:8081/temp/001', '_system', 'location=yes'); return false;">
Open Application
</a>
但問題是,
如果我把http://192.168.8.157:8081/temp/{{id}}
錯誤
Error: [$compile:nodomevents] Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.
http://errors.angularjs.org/1.4.3/$compile/nodomevents
at http://localhost:8100/lib/ionic/js/ionic.bundle.js:13380:12
at attrInterpolatePreLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:21823:25)
at invokeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:21962:9)
at nodeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:21441:11)
at compositeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:20853:13)
at compositeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:20857:13)
at publicLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:20728:30)
at boundTranscludeFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:20872:16)
at controllersBoundTransclude (http://localhost:8100/lib/ionic/js/ionic.bundle.js:21489:18)
at ngRepeatAction (http://localhost:8100/lib/ionic/js/ionic.bundle.js:40504:15) <a class="item ng-binding" href="#" onclick="window.open('http://192.168.8.157:8081/temp/'{{id}}, '_self', 'location=no'); return false;">
,如果你不明確的評論,謝謝
謝謝你的回答,但這是控制器的實現,我需要查看器 –