#69

Product support

Visit this product's website for support.

Categories

  • Frameworks
  • Miscellaneous

WARNING
It's an advanced theme for Angular Applications based in OctoberCMS.

This theme is a Angular Skeleton that allows you to build amazing web applications using OctoberCMS as your backend system.

Requirements

Code structure.

Configuration

Edit your October's .htaccess file from your root project and change the line as indicated below.

From:
RewriteCond %{REQUEST_FILENAME} !/themes/.*/(assets|resources)/.*

To:
RewriteCond %{REQUEST_FILENAME} !/themes/.*/(assets|resources|app)/.*

Also, for security reasons, you'll need to add the following lines at the the Block all PHP files, except index section:

RewriteRule ^([0-9]+.chunk.js)$ /themes/angular2/app/$1 [R,L]
RewriteRule ^(themes/.*/app/index.html) - [F,L,NC]

It'll prevent the users to access the themes/(theme-name)/app/index.html and redirect the chunk files. Not that'll be a problem, but it's not nice.

The approach

We are talking about advanced theme development. So, there's no easy way to do it. You'll keep in mind that it's necessary to learn how angular-cli works and also, sometimes execute its commands to build your application.

For now, what you need to know is that your angular application is inside the ./angular folder, on your theme. And all your angular-cli commands will start from there.

An example, to build your application and keep it in the watcher:

ng build --watch

After that, you'll notice that we created a ./app folder on your theme root. It means that your angular application is compiled and, for now, everything is a file.

You'll never need to change nothing inside the ./app folder. 'Cause it's gonna be created by the angular-cli command. All your implementation I'll happen inside the ./angular/src folder, as a normal angular-cli generated application.

Using

  1. Using your favorite terminal, access your Angular application folder inside your theme ((theme-name)/angular)
  2. Then download the dependencies using npm: npm install
  3. Build your application: ng build --watch

And that's all...

1.0.4

Adding angular-cli.json file

Apr 04, 2017

1.0.3

Angular-cli problem

Apr 04, 2017

1.0.2

Fix some bugs

Apr 04, 2017

1.0.1

Upgrade to Angular 4

Apr 04, 2017

1.0.0

Initial release

Mar 08, 2017