Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /www/wwwroot/dev.zhalaotie.com/wp-includes/wp-db.php on line 3215

Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /www/wwwroot/dev.zhalaotie.com/wp-includes/wp-db.php on line 3215
angular2 权限 – 扎老铁
Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /www/wwwroot/dev.zhalaotie.com/wp-includes/wp-db.php on line 3215

Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /www/wwwroot/dev.zhalaotie.com/wp-includes/wp-db.php on line 3215
Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /www/wwwroot/dev.zhalaotie.com/wp-includes/wp-db.php on line 3215
class="post-51979 post type-post status-publish format-standard has-post-thumbnail hentry">

angular2 权限

功能/页面 权限定义配置:

MembershipService.ts

userPermissions: { [id: string]: { [id: string]: number } } = {

    ‘1’: {

      ‘url:///iot/scene/create’: 1,  // 页面(路由)权限

      ‘act://scene/create’: 1 // 功能(按钮,可见区域等)权限

    }

  };

功能权限界面使用:

<div class="col-xs-1 col-xs-offset-11" *ngIf="hasPermission(‘scene/create’)">

    <a [routerLink]="[‘/iot/scene/create’]" [queryParams]="{ projectId:projectProvider.projectId }"

             routerLinkActive="active">

             新增

    </a>

</div>

页面(路由)权限使用:

const routes: Routes = [

    …

    {path: ‘iot/scene/create’, component: SceneCreateComponent,canActivate: [AuthGuard] },

]

登录&基础权限控制,参考

http://localhost:4200/#/iot/scene/create?projectId=1

配置路由权限即可。

分页

  <nh-list [loadHelper]="sceneListLoader()">

客户端一句话。

实现本地模拟服务端提交&响应功能,页面上的写法无须改动

let url = UrlInfo.parse("/iot/scene/create?projectId=1");

发表评论

电子邮件地址不会被公开。