I need help figuring out how does ui-router works with meteor 1.3
This is my main.html
<head>
<title>Todo List</title>
</head>
<body>
<div ui-view ng-app="exampleApp">
<todos-list></todos-list>
</div>
</body>
this is my main.js
import angular from 'angular';
import angularMeteor from 'angular-meteor';
import uiRouter from 'angular-ui-router';
import todosList from '../imports/components/todosList/todosList';
angular.module('exampleApp', [
angularMeteor,
uiRouter,
todosList.name
]);
angular.module('exampleApp').config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/");
$stateProvider
.state('home', {
url: "/",
templateUrl: "client/login/login.html"
});
});
and login.html
this is login
I’m not sure if this is the correct way to do it, but I believe it’s not since when I add the uiRouter and try load the app I just see the login.html
template instead of everything inside the ui-view
EDIT
ehhh… had html syntax typos
<head>
<title>Todo List</title>
<base href="/">
</head>
<body ng-app="exampleApp">
<todos-list></todos-list>
<ui-view></ui-view>
</body>
Now it works.