R
R
Roma272017-11-19 21:10:31
Angular
Roma27, 2017-11-19 21:10:31

Adding ngResource?

After adding ngResource, the application is not displayed in the browser.
Look at the code, maybe I'm doing something wrong?

angular
.module('app', ['ui.router', 'ngResource','templates'])
.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('home', {
  url: '/home',
  templateUrl: 'main/_home.html',
  controller: 'MainCtrl'
});
$urlRouterProvider.otherwise('home');	
}])

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Sashatexb, 2017-11-19
@Sashatexb

Have you downloaded angular-resource.js ?
https://docs.angularjs.org/api/ngResource

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question