PHPackages                             php-angular/php-angular - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. php-angular/php-angular

ActiveLibrary[Templating &amp; Views](/categories/templating)

php-angular/php-angular
=======================

php angular view engine

2.0.3(7y ago)917.0k↓50%52Apache-2.0PHPPHP &gt;=5.4.0

Since Mar 13Pushed 7y ago3 watchersCompare

[ Source](https://github.com/php-angular/php-angular)[ Packagist](https://packagist.org/packages/php-angular/php-angular)[ Docs](http://kancloud.cn/shuai/php-angular)[ RSS](/packages/php-angular-php-angular/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (15)Used By (2)

\#php-angular

> 仿angularjs的php模板引擎

目前实现了以下几种标签和用法
--------------

[](#目前实现了以下几种标签和用法)

**标签**

1. php-if php-elseif php-else
2. php-for
3. php-foreach
4. php-repeat
5. php-show
6. php-hide
7. php-include
8. php-init
9. php-exec
10. php-after
11. php-before
12. php-function
13. php-call
14. php-switch
15. php-case
16. php-default
17. php-extends
18. php-block

**变量输出**
{$var}
{$array.name}
{$array\['name'\]}
{$var ? '' : ''}

**函数调用**
{:func()}

结合框架使用
------

[](#结合框架使用)

> 具体的框架驱动可以在  中找到

使用说明
----

[](#使用说明)

此模板引擎针对能够使用angularjs的php开发者编写, 主要特点是 不需要额外的标签定义, 全部使用属性定义, 写好模板文件在IDE中不会出现警告和错误, 格式化代码的时候很整洁, 因为套完的模板文件还是规范的html

注: 一个标签上可以使用多个模板属性, 属性有前后顺序要求, 所以要注意属性的顺序, 在单标签上使用模板属性时一定要使用`/>`结束, 如 `, ` 等等, 具体可参考后面章节的解析结果

文档
--

[](#文档)

看云文档托管平台:

示例代码
----

[](#示例代码)

参考/test目录

直接使用方法 /test/index.php
----------------------

[](#直接使用方法-testindexphp)

```

        如果title的值为空, 则可以显示这条消息, 否则不显示

            foreach by [1,2,3,4,5]

                foreach

            repeat by [1,2,3,4,5]

                foreach

            foreach by $list as $item

                name: -- email:

            repeat by $list as $item

                name: -- email:

            foreach by $list as $key => $item

                 -- name: -- email:

            for by ($i = 1; $i

            $list 不为空

```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~69 days

Recently: every ~204 days

Total

14

Last Release

2817d ago

Major Versions

1.0.10 → 2.0.12018-04-24

PHP version history (2 changes)1.0.1PHP &gt;=5.3.3

2.0.1PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8de7cad794f207e3d59edeb9fd8795cbffc43f04408ef416109a313179beaf90?d=identicon)[shuai](/maintainers/shuai)

---

Top Contributors

[![zhaishuaigan](https://avatars.githubusercontent.com/u/6310602?v=4)](https://github.com/zhaishuaigan "zhaishuaigan (42 commits)")

### Embed Badge

![Health badge](/badges/php-angular-php-angular/health.svg)

```
[![Health](https://phpackages.com/badges/php-angular-php-angular/health.svg)](https://phpackages.com/packages/php-angular-php-angular)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
