大佬教程收集整理的这篇文章主要介绍了Angular 2 Universal – 服务器端渲染与手写笔和帕格模板,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
问题是我使用ts节点来运行我的服务器代码,每当我导入我的App组件时,都会发生错误.
server.ts(node / express):
import 'angular2-universal/polyfills'; import * as path from 'path'; import * as express from 'express'; import * as bodyParser from 'body-parser'; // Angular 2 Universal import { provide,enableProdMode,expressENGIne,requEST_URL,ORIGIN_URL,BASE_URL,NODE_ROUTER_PROVIDERS,NODE_http_PROVIDERS,ExpressENGIneConfig } from 'angular2-universal'; // Application import {App} from './app/modules/app';
发生错误:
app.ts
import {Component,ViewEncapsulation} from '@angular/core'; import {RouteConfig,Router,ROUTER_DIRECTIVES} from '@angular/router-deprecated'; import {HomE} from '../home'; /* * App Component * Top Level Component */ @Component({ SELEctor: 'app',pipes: [ ],providers: [ ],directives: [ ],encapsulation: ViewEncapsulation.None,styles: [ require('./app.styl') ],template: require('./app.pug') })
app.styl
input margin-bottom: 10px
以上是大佬教程为你收集整理的Angular 2 Universal – 服务器端渲染与手写笔和帕格模板全部内容,希望文章能够帮你解决Angular 2 Universal – 服务器端渲染与手写笔和帕格模板所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。