Add a route in Angularjs

83 views Asked by At

I am trying to add the detail view in Angularjs

this is my app.js file

angular.module('frontendApp', ['ngAnimate', 'ngCookies', 'ngResource', 'ui.router', 'ngSanitize', 'ngTouch']).config ($stateProvider) ->
    $stateProvider.state('home',
      url: "/"
      templateUrl: "home.html"
    ).state('services',
      url: "/services"
      templateUrl: "services.html"
    ).state('detail',
      url: "/detail"
      templateUrl: "detail.html"
    )

And I created the file detail.html, but this is not working, I can't access the view in http://localhost:3000/#/detail. I have to do something else ?

0

There are 0 answers