2017 © Pedro Peláez
 

yii2-extension yii2-angular

Yii2 angular extension

image

deesoft/yii2-angular

Yii2 angular extension

  • Tuesday, September 8, 2015
  • by mdmunir
  • Repository
  • 13 Watchers
  • 46 Stars
  • 18,936 Installations
  • PHP
  • 20 Dependents
  • 0 Suggesters
  • 19 Forks
  • 6 Open issues
  • 6 Versions
  • 3 % Grown

The README.md

yii2-angular

Yii2 angular extension, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require deesoft/yii2-angular "~1.0"

or add, (*4)

"deesoft/yii2-angular": "~1.0"

to the require section of your composer.json file., (*5)

Usage

In view file, (*6)



= NgView::widget([
    'name' => 'myapp', // default dApp
    'routes'=>[
        '/'=>[
            'view' => 'index',
            'js' => 'index.js',
        ],
        '/view/:id'=>[
            'view'=>'view', 
            'js'=>'view.js',
            'injection'=>['$location', '$routeParams'], // $scope and $injector are always be added              
        ],
        '/edit/:id'=>[
            'view'=>'edit',
        ],
        '/create'=>[
            'view'=>'create',
        ],
    ]
])?>

Then index.php, (*7)





index.js, (*8)

Rest = $injector.get('Rest');

query = function(){
    Rest.query({},function(r){
        $scope.items = r;
    });
}

$scope.deleteItem = function (id) {
    Rest.remove({id:id},{},function(){
        query();
    });
}

Use GII to generate crud

Install deesoft/yii2-gii then add config, (*9)

...
if (!YII_ENV_TEST) {
//     configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = 'yii\debug\Module';

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'generators' => [
            'angular' => ['class' => 'dee\gii\generators\angular\Generator'],
        ]
    ];
}

The Versions

08/09 2015

dev-master

9999999-dev

Yii2 angular extension

  Sources   Download

BSD-3-Clause

The Requires

  • yiisoft/yii2 >=2.0.4
  • bower-asset/angular ~1.3
  • bower-asset/angular-route ~1.3
  • bower-asset/angular-resource ~1.3
  • bower-asset/angular-bootstrap ~0.13
  • bower-asset/angular-validation ~1.3

 

by Misbahul Munir

yii2 angularjs

03/09 2015

1.3

1.3.0.0

Yii2 angular extension

  Sources   Download

BSD-3-Clause

The Requires

  • yiisoft/yii2 >=2.0.4
  • bower-asset/angular ~1.3
  • bower-asset/angular-route ~1.3
  • bower-asset/angular-resource ~1.3
  • bower-asset/angular-bootstrap ~0.13
  • bower-asset/angular-validation ~1.3

 

by Misbahul Munir

yii2 angularjs

25/08 2015

1.2

1.2.0.0

Yii2 angular extension

  Sources   Download

BSD-3-Clause

The Requires

  • yiisoft/yii2 >=2.0.4
  • bower-asset/angular ~1.3
  • bower-asset/angular-route ~1.3
  • bower-asset/angular-resource ~1.3
  • bower-asset/angular-bootstrap ~0.13

 

by Misbahul Munir

yii2 angularjs

23/08 2015

1.1.1

1.1.1.0

Yii2 angular extension

  Sources   Download

BSD-3-Clause

The Requires

  • yiisoft/yii2 >=2.0.4
  • bower-asset/angular ~1.3
  • bower-asset/angular-route ~1.3
  • bower-asset/angular-resource ~1.3
  • bower-asset/angular-bootstrap ~0.13

 

by Misbahul Munir

yii2 angularjs

23/08 2015

1.1

1.1.0.0

Yii2 angular extension

  Sources   Download

BSD-3-Clause

The Requires

  • yiisoft/yii2 >=2.0.4
  • bower/angular ~1.3
  • bower/angular-route ~1.3
  • bower/angular-resource ~1.3
  • bower/angular-bootstrap ~0.13

 

by Misbahul Munir

yii2 angularjs

04/06 2015

1.0.0

1.0.0.0

Yii2 angular extension

  Sources   Download

BSD-3-Clause

The Requires

 

by Misbahul Munir

yii2 angularjs