Angular 2 router no base href set

I am getting an error and can’t find why. Here is the error: EXCEPTION: Error during instantiation of LocationStrategy! (RouterOutlet -> Router -> Location -> LocationStrategy). angular2.dev.js:23514 EXCEPTION: Error during instantiation of LocationStrategy! (RouterOutlet -> Router -> Location -> LocationStrategy).BrowserDomAdapter.logError @ angular2.dev.js:23514BrowserDomAdapter.logGroup @ angular2.dev.js:23525ExceptionHandler.call @ angular2.dev.js:1145(anonymous function) @ angular2.dev.js:14801NgZone._notifyOnError @ angular2.dev.js:5796collection_1.StringMapWrapper.merge.onError @ angular2.dev.js:5700run @ angular2-polyfills.js:141(anonymous … Read more

How/when to use ng-click to call a route?

Suppose you are using routes: // bootstrap myApp.config([‘$routeProvider’, ‘$locationProvider’, function ($routeProvider, $locationProvider) { $routeProvider.when(‘/home’, { templateUrl: ‘partials/home.html’, controller: ‘HomeCtrl’ }); $routeProvider.when(‘/about’, { templateUrl: ‘partials/about.html’, controller: ‘AboutCtrl’ }); … And in your html, you want to navigate to the about page when a button is clicked. One way would be <a href=”#/about”> … but it seems … Read more

No route matches “/users/sign_out” devise rails 3

I’ve installed devise on my app and applied the following in my application.html.erb file: <div id=”user_nav”> <% if user_signed_in? %> Signed in as <%= current_user.email %>. This cannot be cheese? <%= link_to ‘Sign out’, destroy_user_session_path %> <% else %> <%= link_to ‘Register’, new_user_registration_path %> or <%= link_to ‘Sign in’, new_user_session_path %> <% end %> </div> … Read more