I am trying to create an HTML5 / JS / CSS3 application with angularJS on Windows 8.1 with visual studio 2012. I am now stuck when sending parameters to other views.
When googleing, I see a few examples using <a href="#/page/{{:pageId}}">link</a> When I do this in my Windows 8 application and clicking on the link, I get the following error.
No applications installed to open this type of link (unsafe)
When I put the code {{:pageId}} between the tags A, it shows my identifier.
app.js
var myApp = angular.module('myApp', ['ngRoute', 'ngResource']); myApp.config(['$routeProvider', function($routeProvider) { $routeProvider.when("/", { templateUrl: "views/home.html" }) .when("/page/:pageId", { templateUrl: "views/page.html" }) .otherwise({ redirectTo: "/" }); }]);
What is the solution to solve this problem?
- update -
I debugged a bit more. Everything works fine in the browser. In visual studio, I found the following:
<a class="ng-binding" href="unsafe:ms-appx://3595d292-0235-47cd-8db7-cb3019f29114/www/index.html#/page/1" data-ng-href="#/page/1">Select</a>
It looks like VS is adding some code. In the source, I did not include the href element
I changed the link and everything seems fine, the correct variable is also loaded. Only VS continues to add "unsafe:" in the second part of the link.
source share