Altough我加载的每个文件都没有显示任何angularjs组件。 我有点失落,因为它没有返回任何错误或任何东西。 我真的被卡住了。 webpage
root.module.js
import {suggestions} from './suggestions/suggestions.module';
import {commons} from './commons/commons.module';
import {rootComponent} from './root.component';
import {templates} from './root.templates';
import {i18n} from './root.vendors.module';
export const root =
angular.module('root', [
templates,
commons,
suggestions
//vendors
])
.component('rootComponent', rootComponent);
suggestions.module.js
import {suggestionsComponent} from './suggestions.component';
import {suggestionComponent} from './suggestion/suggestion.component';
import {suggestionActionComponent} from './suggestion/suggestion-action/suggestion-action.component';
import {suggestionViewerComponent} from './suggestion/suggestion-viewer/suggestion-viewer.component';
export const suggestions =
angular.module('suggestions', [])
.component('suggestions', suggestionsComponent)
.component('suggestionComponent', suggestionComponent)
.component('suggestionActionComponent', suggestionActionComponent)
.component('suggestionViewerComponent', suggestionViewerComponent)
.name;
suggestions.component.js
export const suggestionsComponent = {
bindings: {},
templateUrl: 'suggestions/suggestions.html'
};
suggestions.pug
h1 soy suggestions
suggestion
root.pug
h2 hi from root
suggestions
root.html(哈巴狗渲染)
<h2>hi from root!</h2><suggestions></suggestions>
root.component.js
export const rootComponent = {
templateUrl: 'root.html'
};
唯一被渲染的是h1而不是组件。