Skip to content

Default behaviour should name the module and $templateCache identifier by the full template path #38

@javoire

Description

@javoire

The default behaviour (as described in #37) seems unintuitive to me. Instead I would propose a behaviour like this:

var angular = require('angular');

require('ui-router');

angular.module('myApp', [
  'ui.router',
  require('./templates/home.html') // the module name would be '/templates/home.html' by default
]).config(function($stateProvider){
  $stateProvider.state('home', {
    url: '/',
    templateUrl: '/templates/home.html' // full path by default
  });
});

The name of the generated module would be the full path to the template instead of just the filename. This is currently achieved with baseDir: "src/js" // optionally specify base directory for filename.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions