Problem with IONIC view

0

I want a view that I designed to appear every time I start the application.

index.html

<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title></title>

    <link rel="manifest" href="manifest.json">

    <!-- un-comment this code to enable service worker
    <script>
      if ('serviceWorker' in navigator) {
        navigator.serviceWorker.register('service-worker.js')
          .then(() => console.log('service worker installed'))
          .catch(err => console.log('Error', err));
      }
    </script>-->

    <link href="lib/ionic/css/ionic.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
    <link href="css/ionic.app.css" rel="stylesheet">
    -->

    <!-- ionic/angularjs js -->
    <script src="lib/ionic/js/ionic.bundle.js"></script>

    <!-- cordova script (this will be a 404 during development) -->
    <script src="cordova.js"></script>

    <!-- your app's js -->
    <script src="js/app.js"></script>
  </head>
  <body ng-app="starter">

    <ion-pane>
      <ion-header-bar class="bar-stable">
        <h1 class="title">Ionic Blank Starter</h1>
      </ion-header-bar>
      <ion-content>
      </ion-content>
    </ion-pane>
  </body>
</html>

I made a view in a folder called 'templates'

var miapp = angular.module('starter', ['ionic'])
miapp.config(function($stateProvider,$urlRouterProvider){
    $stateProvider


    .state('login'{
    url:'/login',
    templateUrl:'plantillas/login.html',
    controller: 'login'
    }) 

    $urlRouterProvider.otherwise('/login');
});

and in the template login.html

         my login view     

But when I started the application, it does not show my view

I'm using IONIC v1

    
asked by Ernesto Emmanuel Yah Lopez 26.08.2017 в 01:48
source

1 answer

1

It seems that your code is missing a comma:

.state('login'{

add a comma between the selector and the key:

.state('login',{
    
answered by 09.11.2017 в 13:55